Each week a member of the World of Apple team will attempt to offer a tip to help expand our readers’ knowledge. Do you have a tip or even a problem you need solving? Send it in using our contact form or leave a comment below.
Over the past months I’ve had two issues and after some research I’ve not only solved both of them but also discovered that they were loosely related.
My first issue was my ever narrowing amount of hard drive space, with Aperture and iTunes libraries growing out control I have piles of external hard drives but still find it necessary to carry around a large amount of data. I used a useful tool called Disk Inventory X to help me identify what was taking up hard drive space and could either be moved or deleted.
After some success I discovered a system file taking up a whopping 2GB of space, the file named “sleepimage” was hidden away in private/var/vm/ not a folder easily navigated to.
My second problem was noticeable sleep times when I closed the lid of my MacBook Pro, I found myself always waiting around 20-30 seconds for it fully sleep and settle down before sweeping it off the desk (avoiding potential hard drive damage).
So a bit of investigation and I discovered that the “sleepfile” image is an effect of Safe Sleep which creates an exact clone of my RAM when I put my Mac to sleep and in the event that power is lost when sleeping nothing will be destroyed because a perfect image is saved on the hard drive.
I decided that this was fairly useless to me so I went about disabling Safe Sleep and removing the 2GB image file.
To do the same perform the following commands in the Terminal:
sudo pmset hibernatemode 0
sudo rm /var/vm/sleepimage
A restart later and I had 2GB extra of hard drive space and my MacBook Pro sleeps in under 3 seconds, perfect!


Comments and Trackbacks
All comments made are owned by their authors. Please keep discussion clean and relevant to the main article. Basic HTML tags can be used for formatting comments, and avatars are provided by the Gravatar service.
Trackback link for this entry | RSS Feed for comments
The following comments have been added by readers:
BH
22nd May 2008, 05.25 am
This isn’t a good idea. The safesleep function is amazingly useful in the event of power loss. With safesleep, you can pull out your battery while the computer is sleeping (or lose power) and once power is restored or the battery put back in, you have an unchanged work environment. If 2gigs is really that much of an issue, you should look into a larger harddrive. If you’re concerned with the time it takes for the laptop to go to sleep after closing the lid, you should check out SmartSleep at http://www.jinx.de which only enables safesleep when the battery is under 20%.
Quote | Comment
Alex Brooks
22nd May 2008, 09.52 am
I appreciate that it’s not wise for everybody but I’ve never lost power when my MBP has been sleeping and I’ve never had an inclination to swap batteries.
It is a personal choice and it works for me, thanks for the link to the SmartSleep app, looks interesting.
Quote | Comment
Darcy Fitzpatrick
23rd May 2008, 05.13 am
This is definitely a cool tip and definitely a matter of personal preference.
All the same, it’s a bit like deciding to take your Time Capsule and use it as a regular external drive simply because you’re running out of space on the system drive.
Like backup systems such as Time Capsule in conjunction with Time Machine, SafeSleep is there to bail you out of the unforeseen.
I like that you’ve empowered us to have a choice in the matter of SafeSleep, because far too often Apple limits our choices in these matters, but I’d conclude by mentioning that it’s risky business to switch off a safety feature such as this.
I can’t count the number of times I’ve shuddered to find a dead sleep light on my MacBook only to be relieved by the sight of that pasty white screen you get when you plug the power back in and the SafeSleep backup goes to work restoring your session…
Quote | Comment
Victor Espina
23rd May 2008, 17.04 pm
Good tip, but ujust usefull for laptops users. For desktop users, like me, safe sleep is the ONLY way to go, so there is no way I can get raid of that space (3 GB in my case).
Quote | Comment
Larry Purcell
23rd May 2008, 19.44 pm
On laptops I would be concerned about the periodic battery calibrations we all should be doing as part of our preventative maintenance getting screwed up. For any unaware of Apple’s battery calibration recommendations (and how to) see:
http://docs.info.apple.com/article.html?artnum=86284
I fully agree with BHs comments too. Too me this is not a good “tip” at all.
Quote | Comment