May 2024
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

Categories

May 2024
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

free -m

free -m

Use 'free -m' utility to get REAL memory usage.

[u...@server /]# free -m
             total       used       free     shared    buffers     cached
Mem:          3876       3557        319          0        212       1083
-/+ buffers/cache:       2261       1615
Swap:            0          0          0
That means I have 3876MB total used memory. 2261MB of it is allocated and needed. 
1083MB is cached (mostly filesystem) and total free memory is 1615MB.
If you want, you can clear linux cache (but it doesn't do any good. Because since it's not cached anymore,
it will be read from disk which is a lot slower (and well, cached again). 
It might be good only if you just read something really big..and
know that you will never need to get it again and need room for something else to cache.
The cache itself is working automagically throwing out older items and caching new items). 
just to experiment use this command:
|sync; echo 3 > /proc/sys/vm/drop_caches

|To clear cache. Beware that it might bump your load average for a sec.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>