3829 Views Previous 1 2 Next 19 Replies Latest reply: Mar 6, 2008 2:36 PM by MrHoffman Go to original post
Virtual memory is implemented using the available physical memory and backing disk storage, and some fakery.
What memory is actively being written or read is resident in physical memory, and what is not active is often paged out and onto disk. When the application needs to touch any memory data that is currently resident in the disk storage, the operating system pages the disk data into physical memory, and continues the processing. As the system runs, the contents of physical memory is also transfered (back) out (paged out) to disk, to make room.
The more virtual memory required -- whether more applications running, bigger applications, applications with memory leaks, or otherwise -- means you need more physical memory and (for the seemingly inevitable overflow) more backing disk storage.
And the swapfiles can be the disk files that contain what data doesn't fit into the available physical memory.
A reboot should clear these files out within the Mac OS X memory management processing, but -- when you load the box back up -- they'll be back. These files should go away if system load drops (sufficiently precipitously); that the files will also disappear if virtual memory requirements drops. (My system load seems to always go the other way; toward increased load.)
145 days is NOT a long time between reboots (at least the world of Linux, I come from). 4GB ram just for a mail server. That should be plenty. Are you running imap on this machine? I've recently starting using OS X Server 10.5.2 10-client version (in the lab still) and I'm loosing 45GB of disk space in a matter of days - lost is still not explained or identified. I found a similar post to os x server mailing list which seems to point to cyrus IMAP. Hopefully more light will be shed on this problem.
You might already have done this, but if not... Do ls or find (eg: +sudo find / -size n -print+), and try to locate where your large files are, or (based on dates) where you are stacking files up. Certainly suspicions are goodness, but I'd gather a little evidence, too.
45 gigabytes of disk consumed over a few days is a moderate leak, and should be visible somewhere. I'd wonder about a run-away look, monstrous incoming spam, or (as you suspect) a bug somewhere. Or maybe SUS is piling up the updates? (+find /usr/share/swupd -ls+)
Consider starting a new thread here, as this might or might not be related to the base thread, too. Leaks can be common, but there can be many triggers.