S.M.A.R.T. Power Modes

eysimir

Dabbler
Joined
Jun 9, 2021
Messages
16
I'm using TrueNAS CORE 12.0-U8 and I'm trying to understand the Power Mode* setting in Services/S.M.A.R.T.
There are four options:
  • Never
  • Sleep
  • Standby
  • Idle
The help text says: "Tests are only performed when Never is selected.".
I don't understand why there are three choices where tests are not performed.
  1. Can someone please explain what the different options mean?
  2. Which option is best for a system that aims to use HDD Standby most of the time?
 

ChrisRJ

Wizard
Joined
Oct 23, 2020
Messages
1,919
Are you aware that regular spin-downs will have a negative impact on the lifetime of your disks?
 

eysimir

Dabbler
Joined
Jun 9, 2021
Messages
16
Yes. But I suppose one enters a longevity gray zone when the drives are spun down 90% of the time.
 

ChrisRJ

Wizard
Joined
Oct 23, 2020
Messages
1,919
Strictly speaking it's the number of spin-ups. If the disks wake up every day or even multiple times per day, I would personally not want this for my system. But at the end of the day the effective lifetime of the disks is only of several factors.
 

awasb

Patron
Joined
Jan 11, 2021
Messages
415
ad 1.:


Page 2.

But the problem is ... (as always) manufacturers develop quite different habits and opinions on implementing those states and features in the firmware.

ad 2.:

The "best" option (assuming you consider power management a good idea) for a storage machine with clearly defined operational times IMHO would be to disable all those fancy pants power management options on that machine — from BIOS to OS — and add a WOL-controller; over here some raspberry pi zeros do the job for offsite pull backup machines. On that given time the storage machines get a wake up call and start their pulling jobs. At the same time those storage machines implement a control script checking for local zfs activity. If there isn't any for more than 10mins, the machines power down.

The second "best" (again: assuming you consider power management a good idea) would be, to move system dataset (and logs) to boot-pool, enforce standby on the data pool disks after 5 minutes of inactivity and choose power level 1. Don't forget to cross your fingers hoping that nothing interferes and LCC stays down.
 
Last edited:

eysimir

Dabbler
Joined
Jun 9, 2021
Messages
16
Thank you sir for this well answered reply!

Regarding ad 2.:
I don't think I'll go down this route. Let me give you a little more background. I have a TrueNAS server (SSD boot + 10TB mirrored) and its purpose is to handle incremental backups of two other computers about once a week. The reason for dealing with power management and disk spin down is so that I can avoid starting the NAS manually every week for the backups, but I think I'd prefer that to dealing with a WOL-controller. I aim to have a simple setup.

Regarding ad 1.:
Great reference, but still not totally clear to me. Here's the interesting part:
The ATA8-ACS standard describes four modes of power consumption for SATA products
  1. Active – The device is fully powered up and ready to send/receive data.
  2. Idle – The device is capable of responding to commands but the device may take longer to complete commands than when in the Active mode. Power consumption of the device in this state is lower than that of Active mode. If a hard drive is present, it is spun up.
  3. Standby – The device is capable of responding to commands but the device may take longer (up to 30 seconds) to complete commands than in the Idle mode. Power consumption is reduced from that of Idle mode. If a hard drive is present, it is spun down.
  4. Sleep – This is the lowest power mode. The device interface is typically inactive and, if a hard drive is present, the drive is spun down. The device will exit the Sleep mode only after receiving a reset. Wake up time can be as long as 30 seconds.
This renders some additional questions:
  1. "Active" - Is this mode the same as the "Never" mode in the TrueNAS S.M.A.R.T. settings? I.e: "Active" as in "Never" shut down?
  2. In "Idle" mode the drive "is spun up" and in "Standby" mode the disk "is spun down". I'm confused. Does "Idle" mode mean an always spinning disk, but in some kind of power saving state? Does "Standby" mode mean a non-spinning disk that needs to spin up for operation?
  3. "Sleep" - When would a drive receive a reset? Would this happen as soon as you try to access the non spinning disk?
As of right now, I have my Power Mode set to "Never" but my disks still spin down after 5 min as configured on each disk. The problem is that they spin up again after a few minutes. I've tried the "Force HSS Standby" setting without luck.

Any ideas?
 

awasb

Patron
Joined
Jan 11, 2021
Messages
415
Did you move the system dataset to the boot pool?
 

eysimir

Dabbler
Joined
Jun 9, 2021
Messages
16
Actually, I have my System Dataset on a separate partition on the boot drive (see "evo" below). So it's not on the storage pool. Do you think I still need to move it to the boot pool?
Code:
root@truenas[~]# zpool list
NAME        SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
boot-pool  31.5G  2.38G  29.1G        -         -     1%     7%  1.00x    ONLINE  -
evo         184G   125M   184G        -         -     0%     0%  1.00x    ONLINE  /mnt
exos       10.9T  2.43M  10.9T        -         -     0%     0%  1.00x    ONLINE  /mnt
root@truenas[~]#
 

awasb

Patron
Joined
Jan 11, 2021
Messages
415
That should suffice, since you want to spin down the drives in exos. Is that exos pool encrypted?
 

eysimir

Dabbler
Joined
Jun 9, 2021
Messages
16
No, exos is not encrypted.
I have noticed that when using "Force HDD Standby" the drives spin up instantly after spinning down.
camcontrol identify tells me that "power management" is supported, but "advanced power management" is not.
Accordingly, setting "Advanced Power Management" to Disabled or Level 1 does not seem to make any difference.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,996
How much RAM do you have? How much SWAP space do you use? Where is your SWAP space? These are also important things to be able to answer. If you always have a zero SWAP space use value, all is good. If not and say you use a few KB or MB, then the location of your SWAP space becomes very important. SWAP space it typically created on each data drive. If your drives spin up and you don't know why, you will have some troubleshooting on your hands. Also look at the drive spinup count over a 24 hour period, that will help you know the frequency things are cycling up and down.

As @ChrisRJ stated, sleeping the drives is generally not recommended and for the exact reason he stated, when the drive motor spins the platters up it causes a large power surge on the electronics, and eventually the electronics fail thus the motor will not spin the platters and you have a dead drive. So we do recommend to leave the drives spinning all the time to prolong their life.

I'm just stating it again here so that you are aware of the concern and you make a well educated decision. If you still decide to sleep your drives, well that is okay. Also, if you goal is to save power, you should just turn off your system until you need it, remember the system as a whole consumes more power than you likely think.
 

eysimir

Dabbler
Joined
Jun 9, 2021
Messages
16
Again, thanks for your answers!

Regarding swap
The system has 16GB DDR3 and the freebsd-swap partition on the boot drive is also 16GB. There is also a 2GB swap partition on each of the two mirrored storage disks. I haven't really started using the system for backups yet, so I can't really tell how much swap space that will be used. So far I'm only trying to solve the issue of the storage drives spinning up after some time sleeping.

Question: How do I monitor the drive spin up count other than simply listening?

Regarding spin up/down
I am aware of the problems regarding spin up and spin down and this is certainly something I am taking into consideration. If I manage to configure my system the way I intend, it kind of boils down to if I'd rather have around 52 spin ups & spin downs per year rather than always spinning drives. I'll have to choose between these scenarios:
  1. The system and drives are always on and the storage drives never spin down.
    Pros: The system is always readily available. I don't have to bother turning it on or off. Backups manage themselves.
    Cons: Drives are always spinning and are rarely used. Power consumption is maxed. Also, audio levels are maxed.
  2. The system is always on but the storage drives spin down and only spin up about once a week for my weekly incremental backup.
    Pros: The system is always accessible. I don't have to bother turning it on or off. Backups manage themselves.
    Cons: The system consumes power continuously but less than without spin down.
  3. The system is started and stopped manually every week for the backup procedure.
    Pros: Less power consumption.
    Cons: More likely that backups never happen due to human error.
Regarding my choice
I am thankful for your concerns in this matter. The system is a backup solution, and I intend to have all important data in at least one or two other backup locations too. The disks are mirrored so there is some insurance if a drive should fail. For my intended solution I still have to prevent the drives from spinning up so frequently. My guess at the moment is that is has something to do with the S.M.A.R.T. settings where the Check interval currently is set to 30 minutes.

With this said, I'd like to get back to the original question of which S.M.A.R.T. Power Mode that would be most suited for an always on-system with disks that spin down. Do you think I should I use "Standby"? I'm still not sure of how this affects the spun down disks.
 

ChrisRJ

Wizard
Joined
Oct 23, 2020
Messages
1,919
@eysimir , under that circumstances it may indeed be a reasonable choice to spin the disks down during the week. The electrical power saved could (depending on your local price) indeed offset the risk for an earlier death of the drives. That is one of the points I meant above, when I wrote that the drives' lifetime is only one of several aspects to consider. The environmental effect of power savings would be another.
 

Uhtred

Cadet
Joined
Oct 9, 2012
Messages
8
With this said, I'd like to get back to the original question of which S.M.A.R.T. Power Mode that would be most suited for an always on-system with disks that spin down. Do you think I should I use "Standby"? I'm still not sure of how this affects the spun down disks.

There's a good manual here for smartd here - https://www.smartmontools.org/wiki/Powermode

tl;dr you should be able to use standby or sleep in your situation (spun down disks) but standby is probably better
 
Top