I unplug my toaster at night

by Francois Joseph de Kermadec

Yesterday, user Yacko asked me why I keep closing and re-opening applications on my Mac, especially since Mac OS X has been built from the ground up for multitasking and features many a way to hide, minimize, tuck away and generally forget about unused processes, applications or even documents. Now, my personal preferences matter little to the world but, giving the question a bit of thought, I realized there is more to it.

33 Comments

Hal
2007-10-12 05:03:36
It has always stumped me why so many Unix/OSX users seem to think that never rebooting, leaving their Mac running for months on end, is some kind of macho gesture...without a thought for the huge accumulated waste of energy.


Do they leave their cars idling in the driveway too?

Simdude
2007-10-12 05:16:55
Better yet, have your mac shut down and startup on it's own. You can set a schedule right in the energy preference panel. I have a cron job run a backup around 11, then have the machine shut down around midnight. The machines boot so fast now, it's almost not worth having them automatically start up, but I do that for my work machine so if I don't make it to work, I can connect in through a VPN and VNC connection and still work.
Dana
2007-10-12 05:36:18
We have a Linux X server running continuously since June of 2000 without any random errors or warnings. This box has hosted quite a few Gnome desktops its whole lifetime.


My desktop at home runs months at a time without a problem. Unfortunately, I do have to restart Firefox every couple of days.

Steve
2007-10-12 05:39:26
The only points I will bring up as a counter-argument to this:


1.) The are scheduled maintenance jobs in OS X that run nightly/weekly/monthly which might not get executed if you shutdown each night - yes, they can be reconfigured to run during the periods when your system is running (or manually executed - many fine programs for doing that), but many (most, more likely) consumer users might not be aware of it.


2.) UNIX was an OS specifically designed to run full-time. Applications? No way - and I'm like you there and only have apps running that are currently in use. However, OS X is based on an architecture built with the purpose of always being available as a resource. Consequently, I actually would figure that the idle-management processes receive much more QA than the initialization processes and would be more dependable.


I'm not completely disagreeing with you. There are plenty of machines in my home office that get shut down every day. However, I think there is plenty of persuasive evidence on both sides of the fence in this debate, and I think we need to make sure we aren't falling back on the peace of mind we get knowing that a device that is turned off can't malfunction.

Nick
2007-10-12 07:24:06
Bizarre...I leave my work machine (Mac Pro) up for _months_ at a time (it does work-related computations overnight, too, so I don't even put it to sleep). I only reboot for software updates.


At home, my Macbook Pro goes to sleep fairly often but also very rarely gets rebooted.


I've never had any problems of the sort you are describing.

Derek Hagen
2007-10-12 07:34:47
Keep it on once a week. The Mac needs to index late at night once in a while and it helps to keep things running smoothly.
Steve
2007-10-12 08:15:14
I was eating breakfast with my parents once (at their house) when, to our utter astonishment, the toaster spontaneously burst into flames. We were able to unplug it and extinguish the fire easily, but it was chilling to think that it might have happened when no one was around. Now the (replacement) toaster gets unplugged whenever it's not being used.


Draw your own conclusions ;-)

Reproman
2007-10-12 08:32:59
Actually the iMacs use less power that the average PC when sleeping so leaving it on doesn't burn much more power than shutting it down. I have an old PB 3500 that stays on 24/7, it is also our fax server. I use it every day with out any problems. The only issue I run into is memory, so every so often I have to quit some apps to make room. Not bad for a machine that is 8 years old.
artMonster
2007-10-12 08:46:04
My Grandmother's refrigerator once burst into flames so she started unplugging it every night. Her electricity bill went down, but unfortunately she died from a bad case of food poisoning.
Noibs
2007-10-12 09:05:49
I totally agree. And with my 2.16ghz C2D Macbook booting in 23 seconds (without rebuilding caches), it's so easy to just restart every day.


Here's a test: Have a unencrypted VIDEO_TS folder on your hard drive (not on a DVD). Reboot your Mac and don't open any applications. Then, use Handbrake to make an iPOD or Apple TV video file from your VIDEO_TS folder. Don't do anything else and note the average number of frames per second that Handbrake is processing.


Then, do the same thing (with the same Handbrake settings) after your Mac has been on for a week or so. Or, do the same thing with a variety of applications open in the background. I think you'll find that the average framerate is not as high.


The VIDEO_TS folder needs to be on your hard drive because if its on a DVD, the throughput from the DVD drive is the bottleneck on speed.


Finally, I not only shut down my MacBook at night, but I also turn off power to the MagSafe AC adapter. Even with the computer off, the AC adapter still consumes at least some power.

Noibs
2007-10-12 09:09:07
One other item. I use Macaroni to automatically run my system maintenance routines.
Ethan
2007-10-12 09:22:09
This seems like 1/2 dozen of one, 1/2 of the other. I have several machines and most of the time they are powered down. The one exception is my iMac, which I use constantly (and which is often torrenting or seeding).


My Windows/Linux PC is used for games and streaming media to my receiver/television and thus doesn't need to always be available. Plus, as I built it for gaming, it tends to devour more power than necessary.


That seems to be the biggest argument. Sure it's more convenient to have the machine always on, but it is always drawing power. With ethanol, rising oil and natural gas prices, the increase in coal power globally and all the other oh so comforting stories in all the news channels...every little bit helps.


My roommates complain that I always am unplugging the toaster, the coffee grinder, the power strip for the entertainment center, but that extra second of activity never hurt anyone and our utility bill had never been lower.

KBeat
2007-10-12 09:22:55
I never shut down my desktop G5 or my MacBook Pro. I'll restart them on occasion when an update calls for it, but they run 24/7. The MacBook does sleep regularly of course, but it's always on.


What I do do from time to time however, is log out and log back in. That quits all the apps, and takes care of any nagging little problem like a memory leak.

Simdude
2007-10-12 09:52:41
I was curious just how much electricity we might be wasting so I did a little googling. Someone may have to check my math but here are some quick calculations:


Mac Mini:
Idle: 23 W
Idle BTU: 79


Mac Pro:
Idle: 171 W
Idle BTU: 584


Ignoring the BTU usage, let's say 500,000 mini owners and 500,000 Mac Pro owners leave their machines on at night from 11-7 basically in idle (background tasks only)


so for the mini that's 23*500000 = 11,500 KW


for the pro 171*500000 = 85,500 KW


so, we use 97,000 KW each hour in idle. at 10 cents a kilowatt/h average that would be $9700/H or $77,600 for the night.


Of course, you have to add cooling for the extra BTU's, and many of these machines are not truly idle but running night time jobs. Even so, this is lower than I would have expected.

Troy
2007-10-12 10:00:04
For those of us who are culturally / geographically ignorant, the phrase "power cuts - which, in a city like Paris, are about as common as acts of selfless generosity" is an interesting double-meaning, which I'd like to understand: Does Paris have reliable power or denizens who are selfless?
FJ
2007-10-12 10:05:35
Troy,


Paris so far enjoys a pretty reliable electrical system. I can't recall a power cut in any of the offices or homes I have been in for at least ten years, although of course, there are other variables to take into account to declare the system as a whole to be "good." As usual, your mileage may vary if there are extensive works in your area or if it just isn't your day.


City lights are more susceptible to issues but power cuts remain very uncommon and any such event will usually cause a dispatch of police, firemen and city workers in a matter of minutes, all scratching their heads and phoning whoever is in charge so that they jiggle the switch a couple times.

R Brown
2007-10-12 10:06:08
Another opinion on leaving your Mac running:


I leave my PB G4 on 24/7. When I'm not using it, it's running one of those massive scientific calculation problem screen savers - in my case, one that is working on protein folding. So I get the convenience of instant on, and give something back to society.


Then there is the issue of overnight cron jobs. My preference in the area of tools to run the cron jobs manually is MacJanitor. I have a friend with a PB identical to mine. She was complaining of running out of disk space. She is someone who shuts down overnight. Running MacJanitor freed close to 10 GB of disk space. So yes, those cron jobs matter!


I find that some apps - Safari in particular - get weird ifthey run to long. So quitting the app helps that. Again with Safari, sometimes that doesn't help. However, logging out and logging back into my account, without rebooting, always seems to fix things. I have long assumed it might have something to do with fragmented virtual memory - any other opinions?

Craig
2007-10-12 10:48:54
Nuts. My desktop Macs routinely run for 100+ days between reboots with no major issues. My Macbook is showing an uptime of 77 days right now, with nothing but sleep/wake cycles. I have never, ever seen a downside to doing this since 10.3 and later OSes.


The main issue is what works for your particular workflow and habits. If you can work in 8-12 hour cycles, then reboot every night. Since most of my projects span weeks and months, that is the scale I run computers on. That means that many apps and documents stay up for extended periods of time. After days and weeks working on a project, the computer itself takes on a custom work environment that is hard to get back to if interrupted by a reboot. I just couldn't imagine starting over every morning.

Simdude
2007-10-12 11:06:24
Re: R Brown


I've noticed the kernel_task increases in real memory usage the longer the machine is up. I don't think logging in and out changes as this is not a user task.


Some apps do seem to leak badly. When you start Safari, it's a in the 30 M or memory usage. After just a couple hours, I'll be over 200M of real memory used. Pretty soon, the page swaps start and things will slow down. Even if you close all the Safari windows, it won't free this memory. You have to completely quit. I wish Apple would fix this instead of giving us a transparent menu bar for Leopard. :-(

SpinPapi
2007-10-12 12:05:19
Nick's comment is about his own personal experience. Thanks, Nick! But others' mileage may differ, as does the author's mileage, as does my own. I restart every few days and it _does_ speed and clear things up for me. So thanks for this article! =]


Just because one person doesn't have a particular problem doesn't mean no one does. I never understand these kinds of comments. It's like saying, "Wow, I do single handed pushups all the time and it never hurts me! What's wrong with you?"

Albert
2007-10-12 16:09:39
Thank goodness! I'm not alone.
David
2007-10-12 17:30:59
I put my G5 to sleep overnight. It's not as energy efficient as turning it off, but it's less wear and tear on the machine. Fewer heating/cooling cycles reduces the risk of catastrophic component failure. I'll take a larger electric bill to save me from having to buy a new computer. If Apple ever sells another consumer priced tower I'll have AppleCare and not have to worry about motherboards dying, but until then I have to protect my pre-owned towers.


I run the cron jobs manually with Onyx, usually weekly.


It's probably an old habit from my System 7 days, but I quit almost every app after I'm done with it. I restart when I notice page outs in Activity Monitor. Usually that's every 6 weeks or so.

Gazzer
2007-10-13 05:34:34
Big black boxes start appearing in random parts of random windows after a while, and the only thing is to reboot the machine. I have no idea whether this is to do with me leaving stuff on or a system/hardware problem.
Thomas Bjelkeman-Pettersson
2007-10-13 08:57:35
Computers use something between 3% and 9% of all US electricity use. Do us all a favour and turn your computer off when you don't need it on. On a laptop is saves the batteries and any Mac desktop boots so fast now that it IMHO is not worth putting them to sleep for other than short breaks.


Interesting discussion on the subject here:


http://uclue.com/index.php?xq=724

Dick Applebaum
2007-10-13 12:52:09
To be perfectly safe from spontaneous combustion, shouldn't you also turn off the UPSes, unplug all appliances, and remove the electrical wiring from the walls & building?


As to electrical usage and the effect of running continuously or powering off and on-- a potentially damaging (and expensive) power surge occurs when appliances are turned off and on.


Further, the electric utility companies must provide additional capacity to provide for these surges.


It reminds me of a study suggested by IBM in the 1960's: "What would happen if everybody in the United States turned on their (then mainframe) computers at the same time".


The firm that was to do the study looked around for a similar event to model. They came up with: "What would happen if everybody in New York City flushed their toilets at the same time?".


The consensus was: "Don't worry about the electricity-- you'll be covered with sh-- first"!


Hope this adds some perspective


Dick

Neil Anderson
2007-10-13 17:50:48
I just put my iMac to sleep at night and carry on the next morning. Practically the only time it gets rebooted is after a system update. Anyone remember OS 9? :)
SB
2007-10-13 18:15:04
About the daily, weekly, monthly scripts. If you upgraded your system from Panther or specifically added those or any jobs to the crontab they are actually launched and controlled by launchd. Launchd can be configured to execute launchd items when the system is next available and idle.
Tom Ward
2007-10-14 00:20:36
Personally I turn my machines off after I've used them - I find Final Cut Pro has trouble with external decks on the firewire bus if it has been up for a couple of days, and restarting the program doesn't solve the issue. The only thing that fixes it is restarting the computer. I understand some people may have specific tasks that run for extended periods of time, but for a lot of people re-starting each day is an opportunity to approach a fresh desktop with fresh ideas and fresh coffee.
Dean Mill
2007-10-14 16:53:54
Thanks for sharing your superstitions. The OS and hardware is just fine running all the time, thank you. In fact, the "shock" of constantly shutting it down and starting up does more to cause failure than leaving it running. Ask any gray beard, and they'll have stories of computers that ran forever, then failed to start back up when stopped. Hard drives, in particular, are subject to this type of failure.
Groovester
2007-10-15 03:53:24
You know, this reminds me of a long and ongoing ...disagreement between my parents and i. My parents are the type of folks that always switch of devices for good. Like with the TV, just hitting the 'OFF' button on the remote doesn't do the trick for them, no, they need to turn off the TV with the hardswitch as to turn off that little standby LED as well. I've never felt like that was a good idea, partially because i am too lazy to walk to the TV instead of just grabbing the remote from the couch table, partially....well..no..just because of the 'too lazy' part really.
Now call it divine intervention or whatever, but just a few months ago my parent's TV broke. And take a wild guess how and where? The on/off switch wouldn't turn the TV back on. A new switch was ridiculously expensive and on top of it cost my dad a few hours to get the old switch out and the new switch in.
Now more than ever do i believe: if there's a standby function --> use it. Unless, of course, as you've mentioned things start to become buggy. Then a reboot can't be so wrong. But unplugging my toaster? Only on those rare occasions when i toss it out of the window in an attempt to hit something, trying to set it into 'sleep' mode...


Cheers!


The Groovester

Greg
2007-10-15 06:03:41
About the daily, weekly, monthly scripts [2]. You should be aware that none of these scripts are excuted if the computer sleep (btw no scripts at all are executed in sleeping tate). So it is not a good reason not to shut down the mac. But the main advaantage for me to sleep the computer is to find it in the morning in the same stae as the day before.
And to be sure to have all the cron scripts executed better use anacron than any other utilitie. Mac version here. Or as SB said reconfigure launchd.
Robin
2007-10-17 10:15:11
"Thermal shock" is an old husband's tale, and a feeble excuse for wasting energy. If it doesn't need to be running, turn it off. Most modern electronics don't truly turn off; as long as they're plugged in they're drawing power. Wasteful and foolish.
anneclau
2007-12-13 02:12:25
I don't understand quite well the point in discussing whether to unplug or not inplug one's computer at night. Everyone does as she (he) feels, and that's it.