On Wed, Jun 26, 2002 at 07:58:24PM +0000, Aton wrote: > I typically find that no matter how much memory I throw at a Linux box, > that the system RAM will usually only have 7-10M (meg) free, even with > configurations of 1 GIG of RAM. I know that the filesystem uses a vast > amount of this RAM as cache and buffers, but how do I set this so that it > uses UP TO a certian amount. Some non-vital componets get swapped to disk > (viewable via TOP), and I'd prefer that if I had 1 GIG of RAM in a system, > and the only thing running is samba, that 500M be FREE! =) As has been mentioned already, free RAM is wasted RAM. The kernel knows what it's doing. All those buffers are being used to maximize the chance that, the next time you go to read a file, it can be read from memory instead of going to disk. Most of the cache is being used to cache swap space - this may not make sense at first, but think about it: If more physical RAM is needed for something, that data is already swapped out, so the memory can be freed without delay. If the swapped (but cached) data is needed, all the kernel has to do is mark that page as 'used' instead of 'cache' and you've got it without going to disk. It's the best of both worlds. -- When we reduce our own liberties to stop terrorism, the terrorists have already won. - reverius Innocence is no protection when governments go bad. - Tom Swiss