[gllug] Memory Available
Steve Nelson
sanelson at gmail.com
Thu Apr 21 12:24:45 UTC 2005
Hello Chaps,
Interesting memory usage question. The following is output from a
production proxy server:
3:12:55 up 74 days, 19:21, 2 users, load average: 0.00, 0.04, 0.09
94 processes: 93 sleeping, 1 running, 0 zombie, 0 stopped
CPU states: cpu user nice system irq softirq iowait idle
total 0.0% 0.0% 0.3% 0.0% 0.0% 0.0% 99.6%
cpu00 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 100.0%
cpu01 0.2% 0.0% 0.4% 0.0% 0.0% 0.0% 99.4%
cpu02 0.0% 0.0% 0.4% 0.0% 0.0% 0.2% 99.4%
cpu03 0.0% 0.0% 0.4% 0.0% 0.0% 0.0% 99.6%
Mem: 2055472k av, 1908592k used, 146880k free, 0k shrd, 144056k buff
1395804k actv, 287124k in_d, 32712k in_c
Swap: 2097112k av, 13212k used, 2083900k free 1616664k cached
# free
total used free shared buffers cached
Mem: 2055472 1908656 146816 0 144056 1616668
-/+ buffers/cache: 147932 1907540
Swap: 2097112 13212 2083900
# vmstat 5 5
procs memory swap io system cpu
r b swpd free buff cache si so bi bo in cs us sy wa id
0 0 13212 146816 144060 1616680 0 0 1 0 1 0 0 0 0 0
0 0 13212 146816 144060 1616684 0 0 0 22 168 82 0 0 0 100
0 0 13212 146816 144060 1616684 0 0 0 48 137 47 0 0 0 100
0 0 13212 146816 144060 1616684 0 0 0 2 114 21 0 0 0 100
0 0 13212 146816 144060 1616684 0 0 0 10 117 26 0 0 0 100
cat /proc/meminfo
total: used: free: shared: buffers: cached:
Mem: 2104803328 1955205120 149598208 0 147517440 1662750720
Swap: 2147442688 13529088 2133913600
MemTotal: 2055472 kB
MemFree: 146092 kB
MemShared: 0 kB
Buffers: 144060 kB
Cached: 1616780 kB
SwapCached: 7000 kB
Active: 1395412 kB
ActiveAnon: 10980 kB
ActiveCache: 1384432 kB
Inact_dirty: 287240 kB
Inact_laundry: 54048 kB
Inact_clean: 32712 kB
Inact_target: 353880 kB
HighTotal: 1179596 kB
HighFree: 122672 kB
LowTotal: 875876 kB
LowFree: 23420 kB
SwapTotal: 2097112 kB
SwapFree: 2083900 kB
HugePages_Total: 0
HugePages_Free: 0
Hugepagesize: 2048 kB
There were a number of Java processes using a load of memory
(monitoring agents). I killed the application to see if the memory
would reappear as available, but it is still cached, and so not
reported as available.
This behaviour is redolent of Solaris 7 (before the priority paging
patch) - in that cached pages were not made available to the page
reclaimation daemon. In Solaris 8 and 9, cache is reported on the
freelist. If I recall correctly there was an fs_flush function to
make this memory available on solaris 7.
How is this working under Linux? Is this memory available? If so why
is it not reported as free?
# uname -a
Linux paul 2.4.21-20.ELsmp #1 SMP Wed Aug 18 20:46:40 EDT 2004 i686
i686 i386 GNU/Linux
Thanks,
Steve
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list