PDA

View Full Version : To Sleep Or Not To Sleep?


OCOTILLO
May 20, 2005, 10:20 AM
I read on these posts of those who never shut down their computers and in fact brag about how many days their notebook has been on. My question is Why?

What are the advantages (or disavantages) of not shutting down or sleeping.

Are there technical reasons?

I have had computers for over 20 years and have always shut down the system at night or when away from the computer for extended periods. I have not had any problems resulting from this practice.

crazzyeddie
May 20, 2005, 10:36 AM
I believe there are a bunch of threads on this that were just started recently.

shadowmoses
May 20, 2005, 10:38 AM
Apparently macs go on overnight janitor duty cleaning things up and chcking on the overall health of your computer, but i would also like to know more about this as i always switch my computer off at night mainly due to the fact that its tooo noisy to sleep near to.

Shadoww

Applespider
May 20, 2005, 10:52 AM
Here's the most recent thread on this dilemma

http://forums.macrumors.com/showthread.php?t=127298

The main advantage for me is the speed that it wakes up at. I like being able to open the lid on my Powerbook and everything just be there so I can use it immediately.

Bad_JuJu
May 20, 2005, 10:56 AM
Don't confuse sleeping with rebooting - sleeping means that parts of the cpu or other chips are either turned off or in low power state and the HD and monitor are shut down -- the OS image is in "suspended animation" waithing for either you to wake it up or for an interrupt to wake the system to do something. Biggest bonus of sleep is that it reduces your power draw ($) by a huge factor - and resume time is very fast

I use sleep mode - and these days all displays and HDs are designed to use and respond to sleep mode ---- using sleep mode IMHO does not take away from "up time" --- up time is the time between total reboots

The only real importance of up time is that it is ONE indicatator of how stable an OS is --- meaning the OS can handle a lot of activity and keep all of its registers - memory areas - and buffers organized and under control.

If an OS has "issues" - than over time it will eventually need to be rebooted which effectively resets everything --- and then again small micro-errors began to accumulate forcing a reboot or the system crashes.

fedora
May 20, 2005, 11:42 AM
The reason I never put my macs to sleep, and don't shut them down is I don't like waiting for it to start up. Thats like wasting time.

OCOTILLO
May 20, 2005, 12:55 PM
The reason I never put my macs to sleep, and don't shut them down is I don't like waiting for it to start up. Thats like wasting time.
So, I guess "To Sleep Or Not To Sleep" is just a matter of personal preference.

buryyourbrideau
May 20, 2005, 12:58 PM
i really almost never sleep my ibook

i have the screen saver set to go black after 15 minutes and the hd to stop running when applicable so i can download things while i am sleeping and then 15 mins after it is done downloading and the computer is idle, it goes to sleep

it is a beautiful thing, shake your mouse and there is your OS :p

James Philp
May 20, 2005, 01:30 PM
best to leave you mac running (not sleeping) 1 night a week to run its "janitor" processes. (ps did i invent that term?)
I do not shut down unless i am told to (after an update, security thing etc).
I either sleep or lock the screen (available if you open keychain access>preferences and check "show status in menubar" - see screenshots)
If there is a problem a log out/in usually solves it.

mipsmonsta
May 21, 2005, 09:48 PM
bragging about uptime is just a mac phenomen. Having used PC for the last 20 years, can only say that sleep or hibernate on PC laptops are buggy and crash-proned.

One think about my ibook is that the booting of mac osx is slow, so sleep is a very fast alternative to getting t my work. Also, imagine having dashboard and having to boot into the OS everytime u need fast access to dashboard. That just doesn't give. Clearly dashboard is a natural transition from the sleep function of mac. Apple just have to make dashboard faster in its refreshment of data. But I guess that's our internet speed to blame?

Aeronautical
May 22, 2005, 03:58 AM
Hi all, what are the janitor processes? Where in OS X can you set them up/schedule them? I think the only reason the computer would do them at night is if that was the time you scheduled it to go through them.

barneygumble
May 22, 2005, 04:47 AM
Personnally i always turn my computers of. I have two at home and three at work that are on when i am there and i always shut them down. How much energy is wasted becasue people are too lazy to turn of or what it instanlty activated when they get there in the morning. I think i read that 5% of the energy use in the US is from compouters that have been left on all night. Imagine all the CO2 that would be saved if we turned them off edpecially in office buildings :eek:

Applespider
May 22, 2005, 04:53 AM
Hi all, what are the janitor processes? Where in OS X can you set them up/schedule them? I think the only reason the computer would do them at night is if that was the time you scheduled it to go through them.

They are the cron tasks that OS X runs to flush out logs etc. Unix runs them early in the morning around 3am. There's a daily, weekly and monthly one. They get run automatically if you reboot too so unless your uptime is months, it's unlikely to do your Mac much harm if it misses them.

You can force them to run by using the Terminal. There is a application called MacJanitor (http://www.versiontracker.com/dyn/moreinfo/macosx/10491) which will run these on demand for you. You can also use something like Cocktail to schedule these for a time when your computer is more likely to be on.

Abstract
May 22, 2005, 05:22 AM
Personnally i always turn my computers of. I have two at home and three at work that are on when i am there and i always shut them down. How much energy is wasted becasue people are too lazy to turn of or what it instanlty activated when they get there in the morning. I think i read that 5% of the energy use in the US is from compouters that have been left on all night. Imagine all the CO2 that would be saved if we turned them off edpecially in office buildings :eek:

Your LCD is off. Your HD is off. In sleep mode, pretty much everything is off. The only thing that's still working is RAM and a part of your logic board somewhere. You use more power booting up then you do leaving your computer in sleep mode.

People who talk about "uptime" aren't talking about how long their computer has been left on. They're talking about time between reboots, so these same people who brag about uptime put their computer to sleep as well.

UNIX has an automatic function where it checks files out. Don't know the specifics, but it performs a task daily, one weekly task (the daily task is still performed that day as well), and a bigger monthly task (the daily and weekly tasks are performed as well on that day).

Or you can just go into TERMINAL and paste this into it: sudo periodic daily monthly weekly

You don't "need" MacJanitor to do this, although the graphics are nice, I guess. ;)

Also, update your prebindings: sudo update_prebinding -root / -force

edesignuk
May 22, 2005, 05:24 AM
I never shutdown my macs. The amazing ability to sleep and wake quickly is one of their best features, which I take full advantage of :D

risc
May 22, 2005, 05:46 AM
Unix already has a great tool to make sure cron jobs run if a machine is put to sleep, or turned off: http://www.apple.com/downloads/macosx/system_disk_utilities/anacronformacosv104tiger.html

EGT
May 22, 2005, 08:28 AM
They get run automatically if you reboot too so unless your uptime is months, it's unlikely to do your Mac much harm if it misses them.

I've just found out, daily scripts run at 3:15am every morning. Weekly scripts every saturday morning at 4.30am and monthly scripts, the first day of every month at 5.30am. I didn't realise they run automatically if you reboot.

Do these scripts still run if you just log out at night or do you have to be logged in?

yg17
May 22, 2005, 11:49 AM
I've yet to get in the habit of sleeping my PowerMac. I just leave it running 24/7, its quiet enough at night for me to sleep. I just turn off my monitor whenever I leave my computer. My iBook is closed and in sleep if I'm not using it however.


I remember when I had my first PC, I would turn it off if I left the room for 30 minutes and be starting the dumb thing up several times a day.

Aeronautical
May 22, 2005, 01:31 PM
Thanks for the MacJanitor link Applespider!

risc
May 22, 2005, 05:46 PM
Do these scripts still run if you just log out at night or do you have to be logged in?

The cron jobs will run as long as the machine is on, no one needs to be logged in. Once again get anacron if you want to make sure they run as expected.

EGT
May 22, 2005, 06:23 PM
The cron jobs will run as long as the machine is on, no one needs to be logged in. Once again get anacron if you want to make sure they run as expected.

Not part of the Tiger pride yet.

Pride, Gaggle, herd, school, brood, plague, litter, flock, whatever it is.

Thanks anyway! :p

friarbayliff
May 22, 2005, 06:24 PM
The cron jobs will run as long as the machine is on, no one needs to be logged in. Once again get anacron if you want to make sure they run as expected.

thanks for the anacron tip - this should allow me to be sure that my cron jobs are getting done, even though my powerbook spends most of its idle time asleep. The convenience factor of being able to close the lid and set my pb down wherever I happen to be in my house is huge.

risc
May 22, 2005, 07:21 PM
Not part of the Tiger pride yet.

http://www.alastairs-place.net/anacron.html <--- Anacron for 10.2/.3

osprey54
May 23, 2005, 01:06 AM
I heard that sleeping adds to fragmentation?

Oh well, I either leave my computer running if there are some heavy downloads overnight or sleeping if I'm not doing anything.

I last rebooted on the 10.3.9 update.

Maxiseller
May 23, 2005, 02:21 AM
I find that from cold, my macs can be quite cold and unresponsive - but then after an hour or so of runtime, they're fine. For this reason alone I tend to keep mine on. Plus of course it's just so blissfully easy to simply close the lids on the ibooks and powerbooks!

Mechcozmo
May 23, 2005, 02:21 AM
I heard that sleeping adds to fragmentation?

OS X auto de-fragments files if needed. Panther and Tiger do this.

Platform
May 23, 2005, 07:17 AM
I never shutdown my macs. The amazing ability to sleep and wake quickly is one of their best features, which I take full advantage of :D

And does your iMac handle the heat OK :confused:

Applespider
May 23, 2005, 07:52 AM
Pride, Gaggle, herd, school, brood, plague, litter, flock, whatever it is.


I think it's an ambush of tigers...

shadowmoses
May 23, 2005, 08:46 AM
Agreed, if my powermac wasnt so noisy i would keep it on all the time, at the moment it stays on from when i wake up until i go to bed, that means it suptime is never more than about 14-15 hours.

krunch
May 23, 2005, 09:05 AM
2 questions...
what are prebindings?
when the computer goes to sleep, does that interrupt downloading?

Applespider
May 23, 2005, 09:23 AM
2 questions...
what are prebindings?
when the computer goes to sleep, does that interrupt downloading?

Don't worry about prebindings. Basically, it's optimising your system so that applications open more quickly. When you install applications that have an installer (rather than drag and drop), you'll often see a progress optimising bar - part of this updating the prebindings.

Detailed information on prebinding (http://radio.weblogs.com/0100490/stories/2002/08/24/prebindingExplained.html)

Yes, if you put your computer to sleep, it will also kill its internet connection and stop downloading. However if you are downloading something and leave your computer sitting, it won't go to sleep until it's finished (even if it usually does at the 15 minute mark)

PaRaGoNViCtiM
Jul 5, 2005, 10:52 PM
I shut down my PB every night and every time I'm not using it, even if it's only for an hour. Also, when I'm not using my PB I keep it in a sleeve, so would me leaving it in sleep mode, drain my battery?

Linkjeniero
Jul 5, 2005, 11:22 PM
I shut down my PB every night and every time I'm not using it, even if it's only for an hour. Also, when I'm not using my PB I keep it in a sleeve, so would me leaving it in sleep mode, drain my battery?

I was just as paranoid as you when my PB was new (it was my first laptop, after all), but one day I decided to put my fears aside and give sleep a shot; and since then, I've never looked back. If the PB is sleeping unplugged it does drain battery, but at a really slow rate. To prove this, I left my PB sleeping unplugged one night, and 6:30 hours afterwards, a mere 2% had been consumed... at that rate, the battery would take roughly two weeks to be completely drained. If you think about it, 2% of the battery life is a very small price to pay to have your computer in working condition one second away all day... it's even MORE power efficient to keep it sleeping for a couple of hours than shutting it down and then having to reboot! So my advice is to take advantage of this great feature... after a couple of days, you wonder how you managed to live without it ;)

PaRaGoNViCtiM
Jul 5, 2005, 11:52 PM
I was just as paranoid as you when my PB was new (it was my first laptop, after all), but one day I decided to put my fears aside and give sleep a shot; and since then, I've never looked back. If the PB is sleeping unplugged it does drain battery, but at a really slow rate. To prove this, I left my PB sleeping unplugged one night, and 6:30 hours afterwards, a mere 2% had been consumed... at that rate, the battery would take roughly two weeks to be completely drained. If you think about it, 2% of the battery life is a very small price to pay to have your computer in working condition one second away all day... it's even MORE power efficient to keep it sleeping for a couple of hours than shutting it down and then having to reboot! So my advice is to take advantage of this great feature... after a couple of days, you wonder how you managed to live without it ;)
Hey, thanks, your reply was very useful, and it's nice to know you were in the same situation! I will give sleep a try.
Thanks again!!

shadowmoses
Jul 6, 2005, 05:59 AM
Putting it to sleep is the most convienient way to operate all macs, only shut down when you wont use it for a long time like a holiday etc...

ShadOW

Jo-Kun
Jul 6, 2005, 06:22 AM
Mine is shutdown every evening...

and automatically rebooted every weekday @ 8... so when I wake up and come downstairs... my mac is allso up and running... no need to wait... all my commonly used progs are up and running, so when I arrive with my fresh cup of coffe I sit down and see what e-mail there is and I can start working...

I don't use sleep because I don't get up in the middle of the night to check something... so no need for it to be asleep... and as mentioned... whe have the same alarmclock... only I can decide to turn over for another 10min my G5 can't :p hahaha

Sharewaredemon
Jul 6, 2005, 07:04 AM
Personnally i always turn my computers of. I have two at home and three at work that are on when i am there and i always shut them down. How much energy is wasted becasue people are too lazy to turn of or what it instanlty activated when they get there in the morning. I think i read that 5% of the energy use in the US is from compouters that have been left on all night. Imagine all the CO2 that would be saved if we turned them off edpecially in office buildings :eek:

This is most likely due to PCs and not Macs Abstract said, Mac's power virtually everything down when they sleep.

PCs on the other hand, don't sleep easily. You have to tell it to Hibernate, and it doesn't come out of that right away, so I'm assuming that most people wouldn't like that, so they simply leave their computer running all the time.

Which is why they take up so much power.
I have a question about cron tasks.

My computer is on, but asleep at 3 in the morning. Does this mean that the cron tasks won't run?
I've currently got about 13 days of uptime and I'm not noticing anything wrong with my computer, but I was just wondering.

mariahlullaby
Jul 11, 2005, 02:21 AM
I hate sleeping my PB because the sleep light keeps me awake, as well as the power cord light. I'm always looking for sweatshirts to put over them to go to sleep (I would unplug it, but I've forgotten to replug it in the morning sometimes). Ah well.

bartelby
Jul 11, 2005, 02:43 AM
The only time my Quicksilver was shutdown (excluding restarts) was if I was away for more than 1 night.
That was until recently.
It now refuses to sleep so I have no option but to shut it down.
Very annoying!