Sleep/suspend to ram on 9.1.0?

Discussion in 'Feature Requests' started by Turboture, Feb 28, 2013.

  1. Turboture New Member

    Member Since:
    Feb 28, 2013
    Message Count:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Turboture, Feb 28, 2013

  2. cyberjock Forum Guard Dog/Admin

    Member Since:
    Mar 25, 2012
    Message Count:
    10,403
    Likes Received:
    456
    Trophy Points:
    83
    cyberjock, Feb 28, 2013

    I'm not sure if this will ever really work well.. some reasons off the top of my head:

    1. Alot of hardware doesn't do sleep/suspend to RAM very well.
    2. Sleep would require a thumbdrive with the required amount of disk space equal to your system's RAM. Then considering you'd be trying to write 16+GB of data to a thumbdrive during a shutdown, it would take far longer than just doing a shutdown and bootup.
    3. FreeNAS is designed with the expectation that your system has almost 100% uptime. So sleeping or suspend to RAM shouldn't be needed too often. This alone makes devoting resources to using it hard to do.
  3. Turboture New Member

    Member Since:
    Feb 28, 2013
    Message Count:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Turboture, Feb 28, 2013

    Thank you for your reply.

    Couldn't the feature be there so it would be up to us users do decide if we wanted to buy the hardware to support it?
  4. cyberjock Forum Guard Dog/Admin

    Member Since:
    Mar 25, 2012
    Message Count:
    10,403
    Likes Received:
    456
    Trophy Points:
    83
    cyberjock, Mar 1, 2013

    Of course, but you have to consider the other things I mentioned.

    Sleep seems like it would just never ever work well at all. Assuming you had 16GB of RAM and your thumbdrive was able to write at 25MB/sec, it would take almost 11 minutes to go to sleep, then another 11 minutes to wake up. Considering that a bootup shouldn't take more than 3-4 minutes it would be smarter just to shutdown and startup. If you had 32GB of RAM(which quite a few people have) then you are talking about almost 22 minutes! This would also put alot of wear and tear on the thumbdrive. Also using a 4GB thumbdrive would now never be an option. Plus the FreeNAS installer uses a static install and now it would have to allow you to setup the correct size. Then, if you upgraded your RAM later your thumbdrive suddenly would need to be resetup.

    What it comes down to is that this feature isn't something that alot of people would use, nor would it really be a smart feature to use for more than 99% of FreeNAS users. So spending developer resources on a feature that likely only a handful of people could really use seems like a waste. There's plenty of other features and bugs that affect a much larger number of people than this feature is ever likely to be used on.

    Of course, if you are a software developer you are welcome to download the source code and get it working. I know that I will never ever have a need for this on any server I build.
  5. nas2013 New Member

    Member Since:
    Apr 8, 2013
    Message Count:
    1
    Likes Received:
    0
    Trophy Points:
    0
    nas2013, Apr 9, 2013

    cyberjock, I stumbled upon your post as I have been trying to make 'suspend to RAM' work on my recently built system. I had assumed all along that this would be supported by FreeNAS out-of-the-box and discovered the hard truth about ACPI support in FreeBSD 8.x (apparently things have improved in 9.x since then).

    My end goal is to use FreeNAS in a power-efficient way. The idea of wasting 25W all day to keep my NAS idle really bothers me, both ethically and financially :( My ideal system would consume the adequate energy all the time, would be reenabled on WOL and would provide all the benefits of FreeNAS/ZFS. The lack of support for that capability will sadly be a show-stopper for me. I will most likely redirect my efforts to a more ad-hoc system, along the lines of what Paul Liu did (http://www.thev.net/PaulLiu/bsd-home-server.html).

    Sorry in advance for my noob question. Could you explain why suspend to RAM (S3) would require you to dump all of the RAM into the thumbdrive, the way you described? Isn't that what happens during suspend to disk (S4)?
  6. cyberjock Forum Guard Dog/Admin

    Member Since:
    Mar 25, 2012
    Message Count:
    10,403
    Likes Received:
    456
    Trophy Points:
    83
    cyberjock, Apr 9, 2013

    There is no reason on suspend to RAM. But typically if sleep isn't supported with the hardware neither is suspend-to-RAM. And as I said before so few people would use this function(I'd actively disable it just because of the extra wear and tear of the hard drives spinning up and down) as I discussed above it really doesn't matter.

    Big picture from my personal experience... I'd never go to sleep or suspend to RAM even if I could because the cost to the environment of shipping a hard drive all over the country/world because I saved a few watts makes it "greener" for the environment to leave the drives running all the time. I try to do my part for the environment myself. I have LED lights throughout my house. Even if I turn on every light in my house my total wattage from lighting is less than 400w!
  7. wtfuar New Member

    Member Since:
    Jun 25, 2013
    Message Count:
    24
    Likes Received:
    1
    Trophy Points:
    3
    wtfuar, Jun 28, 2013

    I'm all with you and thanks for the link. FreeNAS has some way to go to become a real SOHO NAS replacement for synology, thecus or qnap.
  8. dlavigne FreeNAS Core Team

    Member Since:
    May 24, 2011
    Message Count:
    1,705
    Likes Received:
    62
    Trophy Points:
    48
    dlavigne, Jul 11, 2013

    It has been a year since someone commented on the ticket. A bump that this is still a desired feature wouldn't hurt.
  9. cyberjock Forum Guard Dog/Admin

    Member Since:
    Mar 25, 2012
    Message Count:
    10,403
    Likes Received:
    456
    Trophy Points:
    83
    cyberjock, Jul 11, 2013

    LOL.. dlavigne.. I was gonna say "put in a ticket" but I think you know better. :p
  10. russnas Member

    Member Since:
    May 31, 2013
    Message Count:
    62
    Likes Received:
    2
    Trophy Points:
    8
    russnas, Aug 2, 2013

    it would be nice to suspend to ram and wake on lan or sleep when no users are connected, small ways to save power.
    but i rather have a remote to shutdown/start as i would prefer freenas to shutdown service than to save its state., havent tried it but it seems like something to look into

    has anyone tried them?
    http://www.frozencpu.com/products/16924/bus-317/Logisys_PC_Remote

    not trying to hijack thread but find ways to make it convenient to save power
  11. joeschmuck Old Man

    Member Since:
    May 28, 2011
    Message Count:
    2,094
    Likes Received:
    49
    Trophy Points:
    48
    Occupation:
    Electrical Engineer, Data Analysis, and Management
    Location:
    Virginia
    joeschmuck, Aug 2, 2013

    One major reason you will not see Suspend to RAM (S3 mode) is because FreeBSD doesn't really support it. I was actually reading about this earlier today because I was curious about it too when someone informed me FreeBSD doesn't support it. Go run down a google search on S3 and FreeBSD. You will find a ton of problems and very few motherboards work with FreeBSD S3 mode so it's not really implemented but you can test it from the CLI but I don't recall the command to enter. The problem is the computer may sleep, crash, reboot. If it gets into sleep then the majority of the time it will not wake and it's basically 80% failure due to video card drivers. It's an interesting read if you find it. This is a problem being worked on in the FreeBSD community however I doubt it will be solved by the next FreeBSD version.

Share This Page