I have my MacBookPro for 1 year now, and recently I had to often the message that my mac os x HDD is running out of space, and effectively finder said ZeroKB, df -h 0 available. As I was installing quite a lot of apps for test during the last year, I have decided to reinstall snow leopard.
I have formated the 50G partition and did a clean install. The problem still persist. I have downloaded couple of apps to clean cache, and fine tune snow leopard, but the problem still occured, and get back too often. 30G of free space gone in 8 hours.
OMG, so I did all my checks with used disk space, whatever was the free space on the HDD all my files had the same size around 20.3G, so where in the hell my free space is going? Around 2G every hour.
Let's start the Activity monitor and check all process one by one. It turned out that the mds process and its child mdsworker is running continuously. This process is responsible for spotlight – never used for now BTW – which settings were on default. I decide to exclude my 200G partition from spotlight, on the privacy tab added the /Volumes/Storage.
Great 200G that will not be indexed. So I needed do delete the cache too. Follow this step to do so:
Turn off indexing
sudo mdutil -i off /
Empty the cache
sudo mdutil -E /
Turn on indexing
sudo mdutil -i on /
Back to Activity Monitor, mds process ran for around 5 minutes (time to rebuild the cache of /) than went to idle state, and the Virtual Private Memory size is no longer growing and is 80M against the tons of G that was earlier.
My free space is now normal and not exceeding the avarage 3-4G of loss between 2 restarts.