Project: Suspend (Was Hibernate)


NAS

Recommended Posts

I know hibernate in Linux is problematic at best but whats peoples views of its usefullness in the context of the unRAID NAS?

 

I spend alot of time making sure my inode table is full each day only to have it wiped for the nightly power down.

 

Anyway opinions on a post card :)

Link to comment

I see standby being useful, hibernate slightly less.

I do use hibernate allot on my laptops. Windows takes so long to come up and initialize.

unRAID comes up pretty fast once the kernel and ramdrive are loaded. So I'm not sure hibernate buys much.

All the drives have already been spun up anyway if you were to come out of hibernation.

So a refresh of the directory entries is minimal effort on power.

Link to comment

I think "hibernate in Linux is problematic at best" says it all.  Why waste effort implementing something that will be "problematic at best"?  Doesn't seem worth discussing until it is completely reliable.

 

And as he said, the time savings will be very small, probably only slightly useful for those who boot daily or more often, of little use for those who leave it on 24/7 and rarely shut down.  Hibernate makes a lot more sense for machines used as workstations, not servers.

Link to comment

So you dont see any benefit not having to repopulate ls -R then?

 

Does the benefit of not having to run ls -R out weigh the problematic nature of hibernation and/or Tom's time implementing it?

 

From my perspective, I don't see that much of a benefit. If you come out of hibernation, all of the drives are going to spin up from the power on.  So they are already running.  At least one drive is going to read the memory footprint (2G, 4G, or 8G in my case).

 

Is it worth it to load the directory cache from real disks or via the loaded memory footprint?

How much have you saved?

 

I'll say again, Standby may be more worthwhile the hibernate.

Link to comment

What's the difference?  From my simple understanding, Hibernate stores the RAM contents while standby leaves everything in RAM.  Is that right?

 

Does resuming from standby spin up all the drives?  I leave my puter in standby mode all the time but I'm not sure all the drives spin up.  Standby mode is one function I'm really hoping Tom will implement in unRAID as I'd like the ability for the server to power down into standby, then wake once it gets the nod from the network - but I don't want all the drives to spin up.  I know I've wanted this function more than anything else since I've had unRAID. I guess an UPS is on a par as well.

Link to comment

Standby leaves contents in ram and puts whatever parts are compliant into a very low power state.

When coming out of standby it takes mere seconds.

There is rarely a post (possibly just for video).

 

Hibernate saves the whole state of the system to a file on disk. Then it powers the system off completely.

When coming out of hibernation the bios must post, all the hardware is initialized, then the operating system's state is loaded from the disk.

 

Considering all involved, there is not much improvement here vs loading a kernel from scratch.

What you may save is the work in initializing packages and the directory cache, however this is minimal compared to the whole power on sequence.

 

Standby is a worth while investment in time as it could save many dollars and yet still provides very rapid access to your server.

 

I don't see hibernation saving much. I suppose where it could save you is that it shuts the machine totally down when it sees long periods of inactivity.  I bet we could come up with a daemon to do that on our own.

 

Link to comment

Thx for the input.  That certainly has helped clarify it for me. 

 

Suspend to S3 is something I haven't wanted ever since I built my unRAID server.  Is it a difficult thing to do - and can it be done by some of the very clever people here (I'll take myself of that statement :D).  Would all the drives spin up waking the machine from S3?  And...I can only assume the machine can WOL if in this state.  The unRAID project seems to be focused elsewhere.  To me this is important because it reduces the cost of running the machine (Hence environmentally friendly), and, at least in theory, increase longevity of hardware.  Maybe sometime in the future it will become a reality.

 

PS - I was reading another thread about WOL, but I think this was more about waking the machine from "OFF" as opposed to standby?

Link to comment

One hurdle we are going to face (and this is one we keep coming up on), is how to automatically tell if unRAID has been in use recently. Currently the only automatci trigger we could defin is "are all the disks spun down and is the time between these hours". The problem is the act of checking the state is rumoured to keep the disks up (TBC).

 

For this to be really useful we need to be able to say diskxx was used 35 minutes ago for 2kB of transfer or diskxx was spun down xx hours ago. Once we have access to that information we can do so much more along with this e.g. diskxx is over 45C and hasn't been used for 35 mins so spin it down etc

Link to comment

Yeah...it's all these things that one not too versed in puter stuff doesn't think about.  Most thoughts stem from, Gimme, gimme, gimme - without real though as to the processes required.  Thankfully, such discussion helps to build an awareness of the true nature of the problem - especially for me.  Thx.

Link to comment

One hurdle we are going to face (and this is one we keep coming up on), is how to automatically tell if unRAID has been in use recently. Currently the only automatci trigger we could defin is "are all the disks spun down and is the time between these hours". The problem is the act of checking the state is rumoured to keep the disks up (TBC).

 

For this to be really useful we need to be able to say diskxx was used 35 minutes ago for 2kB of transfer or diskxx was spun down xx hours ago. Once we have access to that information we can do so much more along with this e.g. diskxx is over 45C and hasn't been used for 35 mins so spin it down etc

Actually, you have access to the number of blocks read, and the number of blocks written to the disks... and you can do it without spinning them up.

 

The usage statistics are available in /proc/diskstats

 

Therefore, a process that looks at the stats every minute or so, and looks at the blocks written/read, detects when they change from the prior stat, records the most recent time a read/write value changed on a disk, you can then detect the most recent time any disk was accessed.  When all disks are not accessed in an interval desired, you can suspend the array.  This works even when doing maintenance tasks on the array, if you are initializing a dlsk, or computing parity, there will be plenty of reads/writes, even if no activity via samba, so the array will not hibernate.

 

Joe L.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.