[OSX-Users] Re: lion -or something - eating gigs?

Hugh Glaser hg at ecs.soton.ac.uk
Sat Dec 17 12:34:16 GMT 2011


Further to the VM question, now I am back at my machine, there is of course the sleepimage question.
My normal state is that it doesn't hibernate(*footnote), as I rarely let my battery get very low.
I use "Smart Sleep" Pref Panel to manage this.
This does sleep only unless the battery is quite low (I set to about 20%), in which case it does both sleep and hibernate.
At the worst case, where the battery is getting below 5%, it hibernates.

Of course, since I currently don't have a battery (it swelled to three times its normal size, which strangely seemed to mean it no longer functioned as a battery, but makes a decent doorstop), I have set "sleep" to hibernate only, which means I am always seeing a sleepimage.

Below is my vm directory, as it looks less than 24 hours after my new Lion installation.
7G used, 4 of which is the sleepimage.

So it may be that if you restart, and then do a close or whatever that requires hibernation, you will immediately lose 4G.
(Not sure that the disk audit software actually shows stuff in /private/var/vm.)

Hope that helps.

[Rover:/private/var/vm] hg% ll
total 14680064
-rw------T  1 root  wheel   4.0G 16 Dec 13:10 sleepimage
-rw-------  1 root  wheel    64M 16 Dec 18:00 swapfile0
-rw-------  1 root  wheel    64M 17 Dec 12:01 swapfile1
-rw-------  1 root  wheel   128M 17 Dec 12:01 swapfile2
-rw-------  1 root  wheel   256M 17 Dec 12:01 swapfile3
-rw-------  1 root  wheel   512M 17 Dec 12:01 swapfile4
-rw-------  1 root  wheel   1.0G 17 Dec 12:01 swapfile5
-rw-------  1 root  wheel   1.0G 17 Dec 12:01 swapfile6

(*footnote)
There are different ways a machine can be when closed, so that it can come back in the same state when opened.
Sleep, where the state is kept in RAM only.
Hibernate, where the state is kept on disk.
Sleep means that there is no need for disk activity when you close it, but if the battery runs out the state is lost.
Hibernate means that it writes the state to disk when you close it, and reads it back when you open it.
Sleep of course uses some battery all the time; hibernate uses more battery on open and close, but none the rest of the time.


More information about the Osx-users mailing list