mangeli
12-27-2001, 09:45 AM
Does anyone know of a program that can be run to free up memory from dead programs?
|
Click to See Complete Forum and Search --> : Memory Freeeruper? mangeli 12-27-2001, 09:45 AM Does anyone know of a program that can be run to free up memory from dead programs? jdctx 12-27-2001, 10:53 AM I'm not too sure on actually freeing ram but as far as swap 1. logon on as root 2. ps -e 3. kill process id # (all not usefull at time proccess if any one at a time) 4. swapoff /dev/hd? && swapon /dev/hd? TacKat 12-27-2001, 11:33 AM What do you mean by "dead programs"? Programs that have finished their execution normally will have their resources freed automatically (unless they were written by a bad programmer). Programs which have crashed or are otherwise no longer responding to input should have most of their resouces freed after you kill them (previous post). I suspect what you are really seeing here is the amount of memory that the kernel uses to increase its efficiency. If there's some free memory lying around that the kernel can make use of it will grab that and use it until some other program says it needs that memory. This usually means that a large portion of your system memory is being used by the kernel at any given time, but rather than impairing performance this actually improves it. mangeli 12-27-2001, 03:01 PM Isn't there a way to regain the lost memory? (memory lost from leakage...) snivlle 01-03-2002, 07:49 AM Hi there: Linux is naturally very, very good at managing it's resources. I have a couple of quick suggestions that you can try. Firstly, try turning off any services which may be getting loaded at start-up that your particular system doesn't need to have running. (If you're unsure about these different services, don't tamper with anything until you've learned a little more about Linux's services (daemons) Secondly, use init 3 as your default run-level. Automatically booting into "gui" mode can use extra resources; I have found that starting 'X' manually -"startx" at the command prompt - is a little less convenient but more nearly stable. To free up some of the memory used by X and your windowing manager - in my case "KDE" - try logging out of graphical mode ( init 5) and log back in. It only takes a few seconds to do, and it can free up "sticky" memory leakage. It should be noted, however, that newer versions of KDE (versions 2.x.x) are not nearly so guilty of memory leakage. I'm currently using Mandrake 8.1; after a few nips, tucks & tweaks, my system is running very smoothly. If you have less than 96 megs of ram, I would suggest that you upgrade to anywhere from 96 - 128. Increasing the amount to 160 - 256 or greater will enable you to realize even greater performance gains. Try running a process monitoring utility while running a few applications (KPM, for example); take note of any application or process using unusually high percentages of memory. mrBen 01-03-2002, 08:02 AM Also, kill off the number of virtual terminals you have running at any one time - most of can do with X running in one and a couple of others. You can do this by commenting out the lines in one of the files that I don't remember at this precise moment :( It's in /etc and it's one of the init type files, and it has a list of respawning terminals, normally about 8. Just comment (#) out the ones you don't need. Strike 01-03-2002, 01:02 PM Originally posted by mangeli: <STRONG>Isn't there a way to regain the lost memory? (memory lost from leakage...)</STRONG> All allocated memory has to belong to a process. If a process doesn't deallocate memory that it allocates before exiting, generally the kernel will be able to clean it up anyway because it removes the process that was using the memory from the process queue and marks all the memory pages for that process as "free" (well, cached, but whatever). The problem comes when you have processes with memory leaks that don't exit gracefully and end up offloading their problems on their parent processes. Eventually this can get all the way back to "init", or the parent of all processes, at which point nothing will free that memory short of a clever kernel hack or a reboot. This rarely happens though. TacKat 01-03-2002, 02:27 PM It's in /etc and it's one of the init type files, and it has a list of respawning terminals, normally about 8. Just comment (#) out the ones you don't need. That's /etc/inittab. Using mingetty/rungetty can lower the resources that you do use for existing virtual terminals. justlinux.com
Copyright 2007 Jupitermedia Corporation All Rights Reserved. |