Memory Creeping Up
Tim Seufert
yellowdog-general@lists.terrasoftsolutions.com
Mon Sep 15 22:14:01 2003
On Monday, September 15, 2003, at 12:49 PM, Patrick Larkin wrote:
> Well, like I said, the "Free" portion was at 4000K this morning after
> the first weekend of service. I'm paranoid that the machine will come
> to a halt. I suppose I'll just keep a close eye. Thanks again.
The usual cause of not having much "free" memory is simply the
operation of Linux's cache. As you access more and more files, Linux
(or MacOS X for that matter) will cache more and more data for faster
access. This has the side effect of reducing the apparent amount of
free memory. Both operating systems can shrink the cache as necessary.
Both also usually try to keep a few megabytes free rather than
allowing cache to fill everything.
The Linux 'free' command shows you how much memory is used, and it also
shows you how much of that memory is operating system buffers and
cache. Reboot your server and monitor its memory usage growth that
way; there's a very good chance you'll find that the true memory usage
is staying the same as the cache grows.
You shouldn't worry about halting, by the way. If free memory goes to
0 and there isn't any cache left to shrink, the system will begin
swapping, not just halt. Even if swap space fills up and the system
completely runs out of free memory of all forms, Linux still tries to
survive by choosing a memory hog process to kill (in which case it
might kill something you'd rather it didn't, but the system won't halt).