Jump to content
Covecube Inc.
  • Announcements

    • Christopher (Drashna)

      Login issues   11/07/17

      If you have issues with logging in, make sure you use your display name and not the "username" or email.  Or head here for more info.   http://community.covecube.com/index.php?/topic/3252-login-issues/  
    • Christopher (Drashna)

      Getting Help   11/07/17

      If you're experiencing problems with the software, the best way to get ahold of us is to head to https://stablebit.com/Contact, especially if this is a licensing issue.    Issues submitted there are checked first, and handled more aggressively. So, especially if the problem is urgent, please head over there first. 
Christopher (Drashna)

StableBit Scanner Power Mode and Idling

Recommended Posts

Getting the correct power state of the disk is a little tricky. There are really 2 separate mechanisms that control whether a disk has spun down or not, the OS and the disk's firmware.

 

Here are the tricky parts:

  • The disk's firmware can spin a drive down at any time without the OS's knowledge. But this is typically disabled on new drives. This behavior can be modified under Disk Control in the StableBit Scanner.
  • In order to get the actual power state of the drive we can query it directly, instead of asking Windows. The problem here is that, to Windows, this appears as disk access and it will prevent the OS from ever spinning down the drive.

What the StableBit Scanner does by default is it always asks the OS and it never queries the drive directly. This ensures that the OS will spin the drive down correctly. even though we're querying it for the power state. But the issue here is that just because the OS thinks that the drive is active doesn't mean that it's actually spun up. If the disk's firmware has spun down the drive, the OS has no way to know that. The StableBit Scanner deals with this by reporting in the UI that the drive is Standby or Active. Since we can't attempt to query the drive directly without your explicit permission (this will upset Windows' power management), this is the best answer we can give you.

 

The Query power mode directly from disk option, which is found in Disk Settings, is there to work around this shortcoming. When enabled, the StableBit Scanner will attempt to query the power mode directly from the disk. Keep in mind that this can fail if it can't establish Direct I/O to the disk, in which case we fall beck to relying on the OS.

 

The way it works is like this:

  • Query the OS.
    • If the disk has spun down then this must be the case. The disk is in Standby.
    • If the disk is Active (spun up) then we can't trust the OS because the disk firmware could have spun it down.
      • If the user has not explicitly allowed us to query the power mode from the disk, we must assume Standby or Active.
      • If the user has allowed us to query the power mode from the disk, query the power mode.
        • If the query succeeds, set the mode to Active or to Standby (not both, because we know the power state for sure).
        • If the query fails, fall back to the OS and set the mode to Standby or Active.

So when should you enable Query power mode directly from disk?

 

When you don't want to use the OS's power management features to spin the disk down. Why would you do this?

 

Pros:

  • You can control the spin down on a per disk basis.
  • You get exact disk power states being reported in the StableBit Scanner with no ambiguity.
  • Avoid disk spin up issues when querying SMART (I will explain below).

Cons:

  • Requires Direct I/O to the disk.
  • To the OS (and to any other program that queries the OS) the disk will appear to be always spun up.
  • When the OS spins down a disk it flushes the file system cache prior to spinning it down. This ensures that the disk is not spun up very quickly after that because it needs to write some additional data to it from the cache. When the firmware spins a disk down, this does not happen and there is a chance that the disk will be spun up very quickly after that to perform another write. From my experience, this is not common in practice.

What about S.M.A.R.T. queries?

 

In the StableBit Scanner, by default, SMART is queried from WMI first. If Direct I/O is not available then all the SMART data has to come from WMI. Typically this would not spin up a disk.

 

If Direct I/O is possible to the disk then at least some additional SMART data will come from Direct I/O (and if WMI doesn't have the SMART data then all of the SMART data comes from Direct I/O). One potential problem here is that Windows considers any communication with the disk, disk activity. So if you're communicating with the disk to retrieve SMART every couple of minutes then Windows will not spin the disk down.

 

You can avoid this problem in 2 ways:

  1. Don't let Windows control your disk spin down and set up a Standby timer in Disk Control (this has the pros and cons as outlined above).
  2. Set Throttle queries in Settings -> Scanner Settings -> SMART -> Throttle queries. Set the throttle minutes to something higher than the Windows disk spin down time (which can be examined in Power Options under the Windows Control Panel).

The option Only query during the work window or if scanning controls SMART queries and has no effect on power queries. Again, by default power queries do not spin up a disk unless you've manually enabled Query power mode directly from disk (in which case you are effectively saying that you don't want the OS to ever spin down a disk).

Share this post


Link to post
Share on other sites

You had me all the way to the very last sentence when you say...

 

Again, by default power queries do not spin up a disk unless you've manually enabled Query power mode directly from disk (in which case you are effectively saying that you don't want the OS to ever spin down a disk).

 


 

Which confuses me.  Doesn't that contradict your Pro above?

 

Pros

  • Avoid disk spin up issues when querying SMART (I will explain below).

 

 

 

It said a Pro is to avoid disk spin up issues.

 

But at the end, you said the default power settings do not spin up a disk unless you've manually enabled Query power mode directly from disk.  

 

Which, implies it does spin up a disk?

 

:)

 

I'm trying to decide if this effort is worth it to me... Right now, my setup with 20+ something odd disks works well with the default OS power settings.  I don't know the exact state of the disks, which is annoying yes.  But, I know things power down because my server goes from 210 watts usage down to ~85 watts of usage - which is a tad higher than the "no drive, just 1 SSD" power reading I was getting during setup of around 75 watts.  As soon as Balancing starts or something, all drives become active and the watts shoots up to 240 or so before settling down to around 210.  

 

So should I look into direct access mode like this?  Any other benefit besides seeing the actual state?

 

Seeing that some people have to copy a manual file to get Direct I/O working, and my Windows power settings currently work, I think the effort may not be worth it?

Share this post


Link to post
Share on other sites

×