Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Will quitting (Cmd+Q) large apps before closing the MacBook lid make getting up and running again faster?

I have the impression that my MacBook needs more time to recover from sleep if I have large, memory-hungry (LibreOffice, heh) applications open, but that doesn't make much sense from what I believe sleep mode is (e.g., powering down disk and screen but not memory).

share|improve this question
1  
It might seem quicker if the apps ae closed but the time ti measure is from wake up until you have all your apps started with documents in - is that quicker to wake up and then manually restart everything? –  Mark Jun 9 '11 at 12:08
1  
If you add a comment or edit the question to provide the approximate percentages of ram that is free and is inactive when you sleep the mac - I can be more specific in my answer. support.apple.com/kb/HT1342 –  bmike Jun 9 '11 at 17:13
add comment

4 Answers

up vote 4 down vote accepted

Yes and no.

Without knowing the model of MacBook and level of Mac OS X - you may have safe sleep enabled by default. Safe sleep writes the entire contents of RAM to the hard drive, so anything that is still hitting the hard drive for IO might slow things down until the OS has suspended all the active applications in preparation for this write. It is theoretically possible this suspending process could take more time - but in practice I have never seen reports that it is measurable.

Recovering from sleep is the same since that means that power was not removed and the RAM contents were maintained. I would guess that the number of apps running does affect greatly how long it takes for the mac to become responsive again. Every app will start processing events (keyboard, mouse, periodic checks to save) so there will be a burst of activity to "catch" up to the current time. Newer OS also use launchd to kick off processes that should have been started while the machine was asleep. For example, the daily clean up script runs daily at 3:15 AM - so if the mac was asleep at that time, waking it up at 10am means the 3:15 script gets started as part of the waking from sleep which might slow things down. Add in several other processes on a full mac - and you get the slowness you are observing.

The no would be if you don't have it asleep over a time when events are started by launchd and if your apps are efficient or don't need to "catch up" - it really depends on your mac and the specific programs running.

In the end - if you want a more responsive mac when waking it and quitting apps makes that happen - do it! Don't worry of other people have different experiences. The apps you quit are most likely still in virtual memory (which is saved during sleep) so launching them again will be faster than an initial launch which is the entire reason why sleep exists. (unless you have less than 1/4 total RAM listed as inactive RAM in Activity Monitor).

share|improve this answer
    
Thanks for the clear and extensive answer! –  Wander Nauta Jun 10 '11 at 9:20
add comment

IMO That defeats a bit the purpose of the sleep.

When going to sleep, the mac saves the RAM content to the HD and depending on the HD speed and also the RAM speed it may be slower in your mac.

Obviously if the RAM content isn't very full it will probably take less time to sleep and wake up but as I said, for me sleeping doesn't make sence if you have to quit the apps beforehand.

Other thinks can be slowing down your mac, maybe you could do some maintenance (ex: repair permissions).

share|improve this answer
1  
@jm666 you're right, it does still power the RAM. But AFAIK the RAM is indeed saved to HD. –  jackJoe Jun 9 '11 at 14:24
1  
@jm666 true when you say it doesn't read the RAM from the HD after a normal wake up, but I think it writes it to HD as a backup when sleeping. My HD is very silent, but I do hear it working harder after I close the lid. –  jackJoe Jun 9 '11 at 15:05
1  
@jm666 : @jackJoe is correct, since the October 2005 revision of the PowerBook G4, Mac portables have used Safe Sleep, writing RAM to the HD when going to Sleep. This is why Mac OS X does not have a "hibernate" option. This is only a backup, and not used normally. You see the bar when the battery is depleted because RAM is being refreshed from the hard drive. support.apple.com/kb/HT1757?viewlocale=en_US –  ghoppe Jun 9 '11 at 16:34
1  
Well, to be clear, by default on portables Safe Sleep is enabled, on desktop, it isn't. Type pmset -g | grep hibernatemode into the terminal. 0: ram powered on when sleeping, wake up fast, safe sleep disabled. 1: hibernation. system shut down, ram dumped, wake up slow. 3: ram powered, wake up fast, safe sleep enabled so RAM is dumped to disk. Use sudo pmset -a hibernatemode X to set mode. –  ghoppe Jun 9 '11 at 17:31
1  
But yes, jackJoe was correct and my MBP is somewhat strange. With the hibernatemode 0011 (3) macs save the memory into hdd when going to sleep. –  jm666 Jun 9 '11 at 17:48
show 2 more comments

If you don't intend to restart the app when you wake your Mac then yes, your overall time could be shortened.

If you're just going to launch the app again on wake with the same documents and such then no, you're not saving time overall and are likely losing a bit of time.

share|improve this answer
add comment

I think the long and short of this is that it is going to be about the same amount of time to either sleep with the applications running and restarting or sleeping with no applications running and then having to restart each application (I would actually bet that this is more time consuming). Both approaches will take about the same amount of time in non-scientific testing and closing all the applications does sort of defeat the purpose of sleep. Either way this is probably well under a minute...

If it is taking more time than that, then I too would recommend running maintenance on the macbook.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.