I have a MacBook Pro Retina 13" (Late 2013) with 16 GB RAM/512 GB SSD running Mac OS X 10.10.3. There are 20 GB free space on the SSD according to the Finder.
Despite the relatively huge amount of available disk space I constantly get the "Your startup disk is almost full" alert after waking up the MacBook from sleep. I can then observe in the Finder that only approx. 100-300 MB are available in that very moment, but that within seconds space is freed again, though not the entire space (for example 6 GB become available). It requires a restart/reboot to make the entire 20 GB to reappear.
I'm a hardcore Safari user (a dozen windows open with 1 to 25 tabs in each) and also have ten thousands of mails in my 10 email accounts in Mail.app. I'm also aware that Mail.app retrieves mails while the MacBook is closed, yet I still can't believe that this is what eats up all the disk space. The interesting point is that it only gets dramatically low during/after sleep. When actively using the machine the free space decreases, but never to that degree that the said alert pops up.
I got the strange feeling that one of the various extensions might be the responsible resource hog. How can I nail down who or which app (or if Safari: exactly which browser tab) is responsible for this? Exactly how and where to look in Activity Monitor!?
Swap files? Uhm, yes... But which app and why during sleep!?
Just learned about the existence of a "Sleep image" which likely is to save the state in case the machine runs entirely out of power. Still I'm worried about a memory leak as there is dramatically less space available after a while of using the machine compared to the situation after any reboot.