Re: memory usage
At 12:51 PM 9/2/00 -0400, you wrote:
When I boot up, and launch, gdm, log in, it runs sawfish and I run licq,
netscape, some xterms, etc. When I type 'free' I'm told that about 40mb
ram is being used, and no swap. Over the course of a day, this number
grows to about 75 megs being used for the same stuff. Before starting
X, my box takes about 15mb ram, but if I simply log out of X, and do a
free in console mode, it's using 40 mb without running X! Top does not
report any processes that have run away with a bunch of ram, and x is
properly shut down... I want to know where my ram is going! Also,
eventually swap space gets used. After about a week of running, I'm
using on avg 70mb ram and 60 mb swap all the time. Maybe I'm missing
something about these numbers? Maybe I actually have more available free
memory than it's telling me? Could someone help me understand this?
Okay - memory is used for different things. Some background info on my
machine.
caffeine:~# uptime
9:56am up 8 days, 15:24, 2 users, load average: 1.00, 1.00, 1.00
caffeine:~# uname -a
Linux caffeine 2.4.0-test4 #8 Sun Jul 16 09:15:15 NZST 2000 i586 unknown
This machine does Masq, a little squid, samba file serving, and RC5 proxy
and client. Heres the output of free on my wee 32Mb home server.
caffeine:~# free
total used free shared buffers cached
Mem: 30556 29848 708 0 384 12216
-/+ buffers/cache: 17248 13308
Swap: 67028 12180 54848
Theres 30556 Kb total after the kernel has grabbed a couple of Mb for vital
(ie, unpageable) things. Of that, 29848 is used, and 708 Kb is
free. There is no memory used by shared libraries (?) and there are 384
files buffered in ram, which use 12216 Kb.
Line 2 says how much ram is free and used if the buffers were to be freed
up. Of the 29848 used, 12216 is buffers (thats like disk caching) so
theres really only 17248 used, and 13308 free.
Line three talks about swap space. I have 64 Mb of swap, of which 12180 Kb
is used and 54848 is free.
This machine needs a little more ram for comfort, but is perfectly
adequate. One of my work servers has 96 Mb of ram, and can have up to 50
Mb in buffers. Thats okay, because (heres the point) unused memory is
wasted... Linux uses any spare ram for file buffers.
Did that answer the question?
If not, then run
top
and press Shift-M to sort by memory usage. The hungriest processes on this
box are squid, ntpd, top, tcsh, and so forth.
--
Criggie
Reply to: