Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

boppin

macrumors regular
Original poster
Jun 14, 2008
173
17
Germany
Hello!

Today I've noticed that my OSX sleepimage is just 1 GB in size while having16 GB of RAM.

Is this normal to the Retina Macbooks or is my system damaged?

I am confused.
 
Hello!

Today I've noticed that my OSX sleepimage is just 1 GB in size while having16 GB of RAM.

Is this normal to the Retina Macbooks or is my system damaged?

I am confused.

What are you confused about? it needed 1gb to save the information you were using and the computer configuration sleep image before it slept that's all.
 
That's interesting because my white 2009 Macbook has 8 GB of RAM but uses an 4 GB sleepimage running on Sierra.

My old 2011 MBP had 8 GB of RAM and also used a sleepimage in 4 GB of size. (When it had 16 GB, the sleepimage was 8 GB)

So I was wondering that my 2012 Retina MBP just uses 1 GB.
 
That's interesting because my white 2009 Macbook has 8 GB of RAM but uses an 4 GB sleepimage running on Sierra.

My old 2011 MBP had 8 GB of RAM and also used a sleepimage in 4 GB of size. (When it had 16 GB, the sleepimage was 8 GB)

So I was wondering that my 2012 Retina MBP just uses 1 GB.
The mechanism of sleepimage have been changed for SSD optimize
 
With my MacBook Pro's, I DISABLE the sleep image using terminal:
sudo pmset -a hibernatemode 0

Then, I DELETE the existing image:
sudo rm /private/var/vm/sleepimage

Next, I create a NEW, "empty" sleep image:
sudo touch /private/var/vm/sleepimage

Finally, I "lock" the new image, so that it cannot be changed by the OS:
sudo chflags uchg /private/var/vm/sleepimage

Now, the sleep image is disabled, and cannot "grow in size" since it's locked "as a new, small file".

As you might have guessed, I don't care about having a sleep image, and I DON'T want it messing with my MacBooks!
 
  • Like
Reactions: maflynn
One thing I don't absolutely understand.

Before going to sleep there 10 GB RAM in usage; going to sleep. After wake there were over 3 GB in swap! Why?!

Never seen this on my 2011 MBP or my white MacBook.
 
One thing I don't absolutely understand.

Before going to sleep there 10 GB RAM in usage; going to sleep. After wake there were over 3 GB in swap! Why?!

Never seen this on my 2011 MBP or my white MacBook.
Are you mean your sleepimage file size ? It just normal.

Please notice that OS will create 1GB file size not mean it should require to write 1GB data in SSD, it can be just hold 1GB.

As Apple balance of SSD life and battery, nowadays the memory image will not save to disk immediately, it only save to disk unplugged of external power supply and when use battery after few hours or battery very low.
 
OP wrote:
"before sleep, no swap, after sleep several GB..."

With 16gb of RAM, you could -try- disabling VM disk swapping by using this terminal command:
sudo launchctl unload -wF /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist

Then use this command to remove the swap file:
rm /var/vm/swapfile*

I'd try that, and run that way a few days.
If you start getting crashes, it's easy enough to RE-ENABLE swapping with this command:
sudo launchctl load -wF /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist

Personal experience:
I've been running with VM swap DISABLED for a couple of years now, without a single crash.
This is on a 2012 Mini, 10gb RAM, OS 10.11.6.
I -do- quit apps I don't need, and don't load up browsers with dozens of pages...
 
How to recover old behavior?

Just type in Terminal

sudo pmset -a standby 0

now my sleepimage is 8 GB in size and my MBP Retina 2012 does not use swap at all.
 
Last edited:
sudo pmset -a standby 0

now my sleepimage is 8 GB in size and my MBP Retina 2012 does not use swap at all.

... and do not hibernate/standby at all, which means the battery drains faster when computer is left idle for some hours. For example, mine 2015 MBP's overnight drain is ~2% with standby on and ~20-30% without. Wakeup from such standby is only the matter of 1-2 secs (not mins like on PCs or old MBPs, before 2012) so you are robbing yourself from quite a handy power-saving feature.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.