That 5.3GB is without kernel caches. I see 5.7MB...
On Fri, Feb 01, 2002 at 11:24:16AM -0800, Adam McKenna wrote:
> Now top, on the other hand, has a very different idea about the amount of
> free memory:
> CPU states: 0.0% user, 0.1% system, 0.1% nice, 0.0% idle
> Mem: 5528464K av, 5523484K used, 4980K free, 0K shrd, 340K buff
> Swap: 2939804K av, 1082008K used, 1857796K free 5351892K
> cached
They actually agree. The line you're reading with 5.3GB in it subtracts
kernel caches from the memory in use.
The fun bit about swapping like mad is because kernel caches are not
being flushed and shrunk properly in response to growth of the working
set. In more concrete terms, the kernel is making decisions which prefer
to keep things like the page cache, the dentry cache, the inode cache,
and the buffer cache in memory over the working sets of your programs.
There is some tradeoff: it is probably also not desirable to allow the
working set to erode kernel caches to the absolute minimum (or at least
not very easily), but obviously what tradeoffs are happening here are
suboptimal for your workload (and generally insufficiently adaptive). It
appears that when the kernel caches are done with you you've got 172MB
out of 5.5GB of physical memory left for your programs' anonymous memory.
What kernel/VM are you using?
Could you follow up with /proc/slabinfo and /proc/meminfo?
Cheers,
Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/