How to power off drives after certain amount of time of inactivity

mhweb

Explorer
Joined
Aug 4, 2019
Messages
67
Hello,
I know that a server is meant to run 24/7, but as much as I need the storage on my network, it's not something that I use constantly, so to reduce energy usage, try to expand the lifespan of the drives, and to reduce the noise level at night, I would like to spin down or turn off the drives after certain time of inactivity, however, I can't seem to find such option.

Does anyone know how to accomplish this behavior?
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,079
Does anyone know how to accomplish this behavior?
They may have removed the options for that from the UI because the general consensus was that it is a bad idea. It doesn't save much power because drives use more power on initial spinup than they do when idling. Also the constand starting and stopping actually increases wear on the drives which makes them fail faster, not last longer. There are a lot of changes to the default configuration of FreeNAS that would need to be made to allow this to work. I did it once, several years ago, on my backup server, but I have not heard much on the forum about it in the last couple years.
If they took the option to spin the drives down out of the GUI, you don't have a place to start. I will need to get more familiar with the new GUI. They are taking the legacy GUI away with the next version release.
 

mhweb

Explorer
Joined
Aug 4, 2019
Messages
67
I get what you're saying, but then I'm wondering, why Windows has spin down feature and companies sale external drives that will automatically go to sleep with the marketing campaign that will save power and help to reduce wear?

Thanks,
 

subhuman

Contributor
Joined
Nov 21, 2019
Messages
121
mhweb said:
I get what you're saying, but then I'm wondering, why Windows has spin down feature and companies sale external drives that will automatically go to sleep with the marketing campaign that will save power and help to reduce wear?
Despite evidence to the contrary. Big case in point, the WD Greens about 7-8 years ago that were failing by truckloads due to being set to spin-down after 10-20 seconds of idle time. The semi-offical fix from WD was them making available a utility that was intended to change the firmware setting for spin-down idle time. It also allowed more, like changing the error retry count to a lower value to make those Greens behave more like Reds...
I've seen it personally, in the field- go to upgrade a computer that's been running for a decade or more, shut it down, do the upgrade, and the HDs never spin up again.
As for external drives you mention, I can almost agree with powering them down when they're idle, as most of them are in plastic boxes with no ventilation. Powering them down may actually extend their life by not cooking them to a premature death. And, bear in mind that an external drive usually has a shorter warranty than otherwise-identical drive sold to be used internally.
And finally, do you really think you should be basing your decisions on what Microsoft has set to defaults in Windows?
 

MikeyG

Patron
Joined
Dec 8, 2017
Messages
442
The option for HDD standby seems to be present in 11.3. If it doesn't work, or is against best practice maybe it should be taken out?

I've been using the spindown timer to great effect on my backup server. However, I use it to reduce heat and noise, not just electricity usage, and as a backup server, the drives only spin up once per day, not every few minutes.
 

mhweb

Explorer
Joined
Aug 4, 2019
Messages
67
@subhuman It's not that I'm basing my decision on that company X says. I haven't built many storage servers to know every brand. Also, it's just that there is so much information out there and different opinions that sometimes make things confusing.
 

subhuman

Contributor
Joined
Nov 21, 2019
Messages
121
There's a lot of opinions on this, you're right, and not a conclusive study that I can find.
I can provide you only with my opinions and anecdotal evidence.
To be upfront, my general preference is to keep drives (and my computers, for that matter) running 24/7. I'll try to voice the following in a fairly unbiased way, but I'm not trying to hide that I do have a rather strong personal opinion on the subject.
There's also a ton of factors.
- what is the drive designed for? Does the manufacturer state it's designed for 24/7 operation like most NAS, CCTV and enterprise drives? Or is a drive designed to see periodic usage, like "green" drives? I'd be a lot less inclined to power off the former, than the latter category.
- how long will it be powered down for? If it's not going to be spun-down for hours before needing to spin up again, I wouldn't do it. For a lot of reasons.
--Electromigration- simple explanation, current flow through semiconductors causes erosion. The rate of this, rises exponentially with the amount of current flow. Spinning up a drive is when they draw the most current. The amount of electrromigration that occurs from a single spin-up may be equivalent to the same drive remaining powered-up for several hours.
--Thermal cycling. It's bad for electronics. Electronic devices are made out of lots of different materials- silicon, copper, gold, silver, almun(i)um, fiberglass, rubber, etc. All these different materials expand and contract at different rates as they heat up and cool down. As they're doing so, it puts mechanical stresses on parts that really shouldn't have mechanical stresses... such as rigid silicon dies, or drive platters, or drive read/write heads. I'd much rather get devices to operating temps, and let them maintain those temps, instead of letting them cycle between operating temp and ambient.*
* as I alluded to in my previous comment, this wouldn't apply for an external drive in an unventilated enclosure. In that scenario, I'd rather thermal cycle it than risk overheating due to nonexistent airflow.
-Counter-argument to power savings: It's negligible per drive. Even my highest-power-consuming 7200RPM drives are rated at 6.9W idle (HGST 7K4000 series). With my local electricity rates, that's around 50 cents per month per drive. That's the most extreme example: a drive that's powered on but not accessed for an entire month. More realistically, the drive is going to be used sometime during that month, meaning real-world power savings would be much less.
--If you're running for home or small business usage, the electricity cost probably shouldn't be a factor. You will hit some point (50 drives? 100 drives?) where it can be a big factor.
--further, this time of year I really don't care. It's winter. Electronics are really good at providing almost total conversion of consumed electricity into heat. Every penny spent on powering my toys is a penny less spent on my also-electric heat. (of course, during the summer the opposite is true: every penny spent on electronics is two or more pennies spent on cooling...)

I'm sure some people can provide other considerations.

Use cases where I would (consider) spinning down drives:
-- unventilated external enclosures. If someone held a gun to my head and forced me to use one, I would allow it to spin down. Call me crazy, but I'd be much more likely to just power off/disconnect it when I wasn't using it.
-- a backup server that I pushed backups to once per day, and only once per day. Sure, if it's gonna spend 20+ hours idle at a stretch, I'd have no qualms about it.

But, bare minimum, I'd want a drive to remain unused for at least an hour after spinning down before requiring it to spin up again. Can you predict that in your use case? Because inactivity timer cannot. They just know how long it's been since the last time the drive was accessed, they have no clue at all how long it will be until the next time the drive will be accessed. Meaning, if you have a server you're pushing backup to only once per day, and you know that it will only be accessed once per day, you may as well set the inactivity timer to a very small value. Once that backup is done, spin-down immediately. If you don't have predictable usage patterns however, then it becomes very likely that a drive will need to be accessed shortly after being spun down.

Back to anecdotal evidence, I have numerous drives that are 10+ years old with 90 thousand or more power-on hours. But, I also recognize that some people have had the exact same model drive die within months.
A lot of it's a lottery. You may get a great drive that lasts decades even if you don't try to take care of it, and you may get a crap drive that fails soon no matter how much you try to take care of it.


I ramble too much. Probably because there's no definitive answer.
 
Last edited:

subhuman

Contributor
Joined
Nov 21, 2019
Messages
121
Read this while doing something else, but it applies to this topic:
Specifically, section 2.12:
AFR and MTBF specifications are based on the following assumptions for business critical storage system environments:
• 8,760 power-on-hours per year.
• 250 average motor start/stop cycles per year.
• Operations at nominal voltages.
• Systems will provide adequate cooling to ensure the case temperatures do not exceed 40°C. Temperatures outside the specifications in Section 2.9 will increase the product AFR and decrease MTBF.
8760 POH per year is 24/7 operation. 250 start/stop cycles is less than once every 1.4 days. This is specifically for a Barracuda drive, so it may pay to read the full spec sheets of whatever drive you're using.

On an interesting (at least, to me) side-note is that here in 2.12 it says operating over 40C case temp will degrade the drive, but section 2.9 specifies case temp should not exceed 60C.
2.9.1Ambient temperature
Ambient temperature is defined as the temperature of the environment immediately surrounding the drive. Actual drive case temperature should not exceed 60°C (140°F) within the operating ambient conditions.
Clear as mud....
 
Top