Starting up and shutting down too quickly

Discussion in 'all things UNIX' started by Andz, Jan 16, 2013.

Thread Status:
Not open for further replies.
  1. Andz

    Andz Registered Member

    Joined:
    Jan 9, 2013
    Posts:
    75
    Is it possible to mess anything up by starting up a computer and shutting it down too soon? This might happen when I only need to make a small revision to a document in LibreOffice.

    My operating system is Ubuntu. I usually let my computer run for fifteen minutes even if I don't need it that long. Am I being overly cautious?
     
  2. twl845

    twl845 Registered Member

    Joined:
    Apr 12, 2005
    Posts:
    4,186
    Location:
    USA
    No, only if you shut down and then restart it before the hard drive has completely stopped and the fan has stopped etc. I was always told to wait about 20 seconds before restarting. As for your question, why don't you put it to sleep rather than shut down. then when you need it again just hit the space bar. I boot up in the morning and do the above all day. I will only shut down during the day if I go out.
     
  3. Kerodo

    Kerodo Registered Member

    Joined:
    Oct 5, 2004
    Posts:
    7,779
    You can shut down anytime you like without harming anything. I usually wait till I don't see any disk I/O and then shut down, but I'm sure that doesn't even matter. Ubuntu will finish up what it's doing and shut down properly.
     
  4. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    8,695
    There are two theories:

    One that says you should be up 24/7.
    Another that says wear & tear is cumulative.

    So some might say short up/down cycles cause heat cycles and wear on components and whatnot, better to run steady. Others might say you're saving your devices for whenever you need them.

    My approach is: Desktops 24/7, laptops on demand.

    It's all magical voodoo anyhow.

    Mrk
     
  5. ComputerSaysNo

    ComputerSaysNo Registered Member

    Joined:
    Aug 9, 2012
    Posts:
    1,413
    I don't think it matters with today's technology. What ever you feel like is my tip.
     
  6. NGRhodes

    NGRhodes Registered Member

    Joined:
    Jun 23, 2003
    Posts:
    2,331
    Location:
    West Yorkshire, UK
    Linux is generally very good when it comes to startup/shutdowns.
    And won't do any harm to the OS.
    When it comes to hardware yes it does shorten life start/stopping the machine, but they will of been designed to do a number of on/offs throughout their lifetime, as it is such a common function.

    IMHO you should trade that off against energy usage, if the machine is only used once a day, probably worth turning off, if its once every hour or so you could always suspend your system.

    I'd just switch off your machine rather than waiting 15 minutes if you leave it for long durations. But I would check for updates manually if you do this as Ubuntu does seem to delay checking for new updates by a fair few minutes after startup.

    I leave my workstation on 24x7 (but it does act as my network file store as well), laptops I usually suspend. I do power machines down if I know I wont be using them for a day.

    Cheers, Nick
     
  7. tgell

    tgell Registered Member

    Joined:
    Nov 12, 2004
    Posts:
    1,073
    I turn my desktop computer on in the morning and turn it off at night and have done this for over 8 years on the same computer. I don't turn it on and off during the day though. I know, it's old but still does the job and still runs fine.
     
  8. Andz

    Andz Registered Member

    Joined:
    Jan 9, 2013
    Posts:
    75
    Is Linux better than Windows in this regard?
     
  9. NGRhodes

    NGRhodes Registered Member

    Joined:
    Jun 23, 2003
    Posts:
    2,331
    Location:
    West Yorkshire, UK
    In my experience on the desktop yes. I've had Windows fail to shutdown due crashed program dialogs during shutdown (I have a screenshot of an example somewhere). Linux has more robust structure and tools for handling crashing programs.

    Cheers, Nick
     
  10. Wild Hunter

    Wild Hunter Former Poster

    Joined:
    Oct 13, 2012
    Posts:
    1,375
    In my experience, nope. (Latest) Windows simply takes a conservative approach and let you decide between waiting for a slow app to close itself or forcing its closure.
     
  11. NGRhodes

    NGRhodes Registered Member

    Joined:
    Jun 23, 2003
    Posts:
    2,331
    Location:
    West Yorkshire, UK
    In Windows its possible for an app crashing to prevent a clean shutdown.

    In Linux this will never prevent a clean shutdown.

    Cheers, Nick
     
    Last edited: Jan 22, 2013
  12. Theoretically it depends on the filesystem. ext3 should be very safe; ext4, XFS, and JFS, somewhat less safe; and ReiserFS, hazardous (by default at least).

    In my own experience, I've only ever had data loss on JFS and ReiserFS.

    - JFS seems to be badly bugged on some older kernels. I've seen large numbers of open files corrupted during a improper shutdowns, and complete filesystem corruption as well. More recent kernels seem to fix these issues, but I would still be very weary of this filesystem on anything without a backup power supply.

    - Last time I used ReiserFS, a crash resulted in the entire root partition being lost. A quick check of the man page indicates that this is probably because ReiserFS turns off write barriers by default; if you want to use it without a backup power source, you should always mount it with the 'barrer=flush' option.

    BTW, a bit of advice: on Linux you don't need to hit the interrupt switch unless the kernel has panicked. If you set the sysctl variable kernel.sysrq to 1, you can use the Alt+SysRq keys (specifically the sequence 'reisub') to sync all filesystems, remount them read-only, and cleanly reboot. Do be aware though that "magic SysRq" is a minor security risk, since it makes it easier to tamper with a computer physically.
     
  13. NGRhodes

    NGRhodes Registered Member

    Joined:
    Jun 23, 2003
    Posts:
    2,331
    Location:
    West Yorkshire, UK
    Worth mentioning you are talking about how safe a filesystem is when Linux is not cleanly rebooted/shutdown.

    If Linux is cleanly shutdown (like usual) it does not matter about the filesystem.

    EXT4 and XFS are as safe as EXT3 nowadays, what EXT4 XFS loose out with delayed writing they make up for with more durable metadata handling.

    Cheers, Nick
     
    Last edited: Jan 22, 2013
  14. Wild Hunter

    Wild Hunter Former Poster

    Joined:
    Oct 13, 2012
    Posts:
    1,375
    I sincerely don't know what you're talking about. I'm keeping my opinion for now.
     
  15. Andz

    Andz Registered Member

    Joined:
    Jan 9, 2013
    Posts:
    75
    Is it true that sleep is mechanically very similar to a full shut down? I understand that when a computer enters sleep mode, its hard disk drive gets turned off. So it seems like one might as well just use a full shut down (notwithstanding the longer delay when turning on again, but I'm willing to wait). In other words, sleep mode does not really prevent wear and tear on the storage device. Am I missing something?
     
  16. NGRhodes

    NGRhodes Registered Member

    Joined:
    Jun 23, 2003
    Posts:
    2,331
    Location:
    West Yorkshire, UK
    Your right for the storage device.
     
Loading...
Thread Status:
Not open for further replies.