Mac Sleep Mode: Pros and Cons

Why would you sleep your mac? It’s built to be always on (with minimal power usage)

1 Like

Don't you think Apple has a good use case for providing a "sleep" mode?
For more info, just google it.

There are good reasons to sleep your Mac as it will use less power.

However if it causes other problems, for a desktop Mac I have never had any trouble turning off sleep - my Mac never fully sleeps, it just sleeps the display, so activities can run whenever they are required.

For a laptop on Battery, sleep obviously extends the battery life considerably. But for a desktop, this is irrelevant. And desktops doing not much don't use enough power to be worried about (almost certainly the combined standby power of other devices around the house far exceed the increase in power usage).

That said, if there is just a single pair of times that the Mac needs to be awake, then it should be relatively easy to write a pair of macros that trigger at those times and set the hardware wake time to be appropriate to wake the next macro.

Interesting. Do you have any references on this?

With a bit of quick research, I found many articles recommending to sleep rather than shut down.
But I did not find even one that recommended not sleeping Mac desktops.

What references? I quoted my (considerable) experience.

Did you find one recommending sleep rather than not sleeping?

When the Mac is idle, the screen is powered down, the processor will significantly power down, the spinning disk (if any) will power down, the USB will largely power down.

Why would there be any issue in that state? Most of the components in that state would be doing exactly what they would be doing if the Mac was asleep. Its not as if the processor and the DRAM will “wear out” from use, certainly not in the time frame of a computer’s life. Both of those will be in a low level idle state, most of the rest of the Mac will be shut down.

2 Likes

I think that might also be my setup come to think of it.
But I seem to remember setting the "sleep" slider to never.
Will check.

There are 2 sleep modes in the mac: sleep and safe sleep (hybernation)
I just meant to not let your mac hybernate, but let it sleep with adapted settings.

I (think I) have my iMac set to never sleep, only to sleep the monitor and not to spin down the harddisks.

I just checked, my mac is set to sleep the display after 15 minutes, never spin down drives and wake for network access. So minimal sleep settings.

I had this on my previous 2011 iMac for 8 years, and never had any issues. My current one is also set to this, and again: no issues whatsoever.

Even in the stock OS settings you can control the power management settings of your hard drives. When you couple that with the sleep settings of the display if you're running SSD drives as your main drive your power draw is going to be negligible.

I think even if you have a beefy graphics card, I have a 1080Ti in my main rig it's only hammering the GPU if you're running an app that will leverage it.

If you're interested in exact numbers and metrics I could probably whip some up for you over the weekend.

I have two different desktops I was going to do this on. I was curious the power impact of running my macros.

Also FWIW you can look at some of the power draw metrics inside the activity monitor.

Ahem... my Mac Pro uses almost 300W at idle. No way I am letting that run 24/7.
Just sayin' (c;

2 Likes

Nope. None of them even mentioned "not sleeping". That's what makes me curious.

I don't know -- I didn't design the Mac HW, or macOS. However, I do know that some apps have had memory leaks that get worse with time. Seems like something similar could happen with the OS.
But maybe only a restart will fix that anyway -- I'm not sure.

I just don't want to make any assumptions about long term effects.
I'm hoping someone has done some professional testing on this and has published the results.

Having said all that, I am going to run a trial of NO SLEEPING for at least a week, and see if I notice any benefits or adverse effects on my system. Started yesterday: "Time since boot: 1 day 5:50"
Can I get a "time since sleep"?

Sure, if you have some professional tests & results I'd love to see them.

Hey Peter,

What would that be? How many machines? How many years of experience?  :wink:

Please elucidate.


My primary reasons for NOT keeping a Mac running all the time:

  1. Raises the odds of getting hacked – small as they might be.

  2. Increases the odds of a process going rogue and doing something unexpected and untoward.

  3. Increases the wear and tear on the machine.

  4. Uses significantly more Power.


These would NOT stop me from running the machine for long periods of time if I needed it to be working though.

I welcome comments or additions.

-Chris

Some bash snippets to help with this: (explanatory notes added 2019-09-01 by request)

① The time (in seconds since the epoch) that your machine last woke up:

sysctl -n kern.waketime | awk -F '= |,' '{ print $2; }'
  • sysctl has a bunch of system info labelled by category (e.g. kern for kernel stuff), a period, and then an identifying name. sysctl -a will show the lot. sysctl -n followed by a specific label or a group under one category will get you those.
  • awk is one of a few ways that could be used to isolate just the first number of the result returned from sysctl -n kern.waketime. This number is the number of seconds that had elapsed since the epoch at the moment the machine last woke.

② The current [date and] time expressed in seconds since the epoch:

date +'%s'
  • This number is the number of seconds that have elapsed since the epoch at the present moment. This and ➀ provide two moments in time measured relative to the same fixed point, using seconds. Therefore, their (absolute) difference will tell us how many seconds have elapsed at the present moment since the machine last woke.

② minus ①:

printf $(( \
    $( date +'%s' ) - \
    $( sysctl -n kern.waketime \
     | awk -F '= |,' '{ print $2; }' ) \
))
  • A numerical calculation in bash is performed by enclosing it within $((...)), which I formatted above over multiple lines for clarity: the first and last lines are where the enclosing syntax can be seen; the three lines in between is what would look nicer written as $(➁) – $(➀), namely the (positive) difference between the two numbers.
2 Likes

In my case, it said the TuneIn app was causing coreaudiod to prevent sleep. Check that it is off. “pmset -g” can tell a lot! Also, add the “PreventingSleep” column to Activity Monitor.