Before you say "OH IT'S THE CACHE", please, please read what I'm about to write before you do.
I have 6 gigs of ram. Conky, System Monitor, htop and free all say I'm using 41% of my ram before cache/buffer.... But applications running are not using that much.
Here's free's output:
You can do the maths (used-buffer-cached)/total*100 and you'll end up close to 41%.Code:oli@bert:/tmp$ free -m total used free shared buffers cached Mem: 5975 4368 1606 0 164 1749 -/+ buffers/cache: 2455 3520 Swap: 1498 220 1278
This command adds up the memory percentage usage for all running processes:
It reports 23.5%, some 17.5% below the figure provided by everything else.Code:ps aux | awk '{sum +=$4}; END {print sum}'
Where is that 17.5%? It's not in cache, because my figures already account for cache. What else is RAM used for? How can I monitor it?
I should note that these values are after 8 days of uptime. Missing memory grows with time. After two weeks I start to run out of free memory completely even if I kill everything. It's really bad leakage.
On another, not wholly unrelated note, I have 3x 2048MB sticks of ram (6144MB total) but they're showing (in free) as 5975MB! I've lost 2.8% of hard RAM before I even boot up. Any ideas? This is a desktop with a dedicated video card so I don't think it's being used as shared vram.



Adv Reply




Bookmarks