FreeNAS: power efficiency at idle states

Status
Not open for further replies.

mka

Contributor
Joined
Sep 26, 2013
Messages
107
Hi,

I recently noticed my (I believe quiet power efficient) Haswell system, which uses about ~19W in idle operations booting up FreeNAS 9.1.1_x64 and without any drives attached (top: practically Zero% CPU usage), is considerable more power efficient when booting up Windows. Again no drives but an older X25M SSD (which should uses more power than a thumb drive, at least not less) and booting Windows 7 x64 results in about ~13W in idle operations.

Why does the system use less power in Windows and can the same results be reached in FreeBSD/FreeNAS? Have other users shared similar observations?

Thanks :)
 

troun

Dabbler
Joined
Jul 13, 2013
Messages
33
Interesting finding. Explanation may mainly come from drivers, but I hope being wrong because it may leave possibility for OS optimisation.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I'd say there's no way to know where the extra efficiency came from. It could be that more of the hardware is compatible with FreeNAS and therefore that hardware is going into some kind of idle/low power state. It could also be that Haswell chipset support isn't that well written for FreeBSD yet.

At the end of the day though, you're talking about 6 watts. Not exactly a lot of power even at 24x7 usage for a year. Might be like $6 worth of electricity per year by my calculations. Not exactly something I'd be willing to invest large amounts of resources in trying to find/fix.
 

raidflex

Guru
Joined
Mar 14, 2012
Messages
531
I'd say there's no way to know where the extra efficiency came from. It could be that more of the hardware is compatible with FreeNAS and therefore that hardware is going into some kind of idle/low power state. It could also be that Haswell chipset support isn't that well written for FreeBSD yet.

At the end of the day though, you're talking about 6 watts. Not exactly a lot of power even at 24x7 usage for a year. Might be like $6 worth of electricity per year by my calculations. Not exactly something I'd be willing to invest large amounts of resources in trying to find/fix.

You have some low electrical costs, that would be double where I live. Although 6 watt is still a very small cost.
 

jonnn

Explorer
Joined
Oct 25, 2013
Messages
68
Hi,

I recently noticed my (I believe quiet power efficient) Haswell system, which uses about ~19W in idle operations booting up FreeNAS 9.1.1_x64 and without any drives attached (top: practically Zero% CPU usage), is considerable more power efficient when booting up Windows. Again no drives but an older X25M SSD (which should uses more power than a thumb drive, at least not less) and booting Windows 7 x64 results in about ~13W in idle operations.

Why does the system use less power in Windows and can the same results be reached in FreeBSD/FreeNAS? Have other users shared similar observations?

Thanks :)

This confirms exactly what I have suspected. This is why I wish my board had an underclocking option. It's just that freenas does't have the drivers to enable modern chips to enter lower power states appropriately.
Even my sandy bridge board would drop significantly in idle power when I underclocked to 2.0GHz, so it's not Haswell related. IMO, it's a major issue, if FreeBSD/FreeNAS(?) got their act together and implemented the drivers/whatever is needed, the combined drop in idle power usage across all systems that run these OS's would be significant. It may be that Powerd is out of date (no affect in idle power here enabled/disabled)

I plan to try ESXi and I even considered (gasp) windows 8 and HyperV.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
The thing to keep in mind is that all of the 2008 and newer CPUs clock down on their own. So underclocking only really stops you from achieving full clock speed. You can do that by going into your BIOS and forcing a lower clock multiple. Don't be surprised when you see no observable gains as you are literally talking about very small power savings and potential major performance penalties.

My Ivy Bridge system idled at something like 200Mhz and drew 35w idle with FreeNAS. You really going to tell me that you are going to underclock below that?
 

jonnn

Explorer
Joined
Oct 25, 2013
Messages
68
Check out this thread and do your own work on what your CPU frequency actually is: http://forums.freenas.org/threads/powerd-and-how-it-can-impact-server-performance.10739/ . Note that I wrote that thread and with powerd disabled my CPU still clocked down to 149Mhz. One command I list actually shows you what your CPU can clock down to.

I've gone round and round with several people in Skype and Teamviewer. Every single person I've worked with found out 3 things:

1. Their CPU is clocking down to less than 500Mhz when idle(and usually less than 200 Mhz).
2. Their system loading is less affected by CPU loading and more affected by hard drives.
3. Their CPUs normally completely turn off unused cores except for one.

Now, if you chose to buy a motherboard that doesn't support the proper powerdown that's your problem. And if you choose to go with AMDs(which don't clock down quite the same as Intels so I can't give you advice) that's again your problem.

But hey, we've tried to recommend good boards in the stickies that work well. If you chose not to listen to those and you have a CPU that sits at 2Ghz nonstop, well, you got what you got because you didn't take our advice.

So many of you power efficiency advocates should stop and smell the roses. Maybe do a little research too. Because you're either not informed of the actual power savings your system is giving you, or you didn't buy good quality parts that actually utilize those features.

Good luck to you gents. If you want to discuss this further I'm almost always in IRC.

The OP posted about a very specific scenario. His idle power was much lower in windows then in FreeNAS.
You posted some anecdotal evidence, some opinions, but I don't see how any of it is relevant to the OP?

And in my case, the fact is I saw lower idle power usage in FreeNAS when I limited clock speed to 2.0GHz. Performance was unaffected, with scrubs and rebuilds coming in at drive limited speeds.

No, I cannot just "set a lower multiplier," as my server board does not have a multiplier setting.

At no point did I complain about my setup, or ask for advice on my setup.
The general tone of your post is unnecessary, IMO; take a step back and breathe, and feel free to let people do their own thing. You'll live longer.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
If you are underclocking to 2.0Ghz and seeing lower idle power then your CPU isn't properly downclocking. You should run those commands in the thread I wrote and see what is going on. If its an AMD CPU that's your issue. If its Intel then you may have a BIOS setting wrong. What's the spec for your system?
 

jonnn

Explorer
Joined
Oct 25, 2013
Messages
68
All I was saying is that there's SO many threads complaining about efficiency and if you do some homework you'll often find its things that are outside of our control. PCIe has the ability to downclock(go into a wait mode or something?) and quite often that's Windows only. There's lots of other ways to save power too, but many are Windows only or don't necessarily work for a NAS-type situation.

If you are underclocking to 2.0Ghz and seeing lower idle power then your CPU isn't properly downclocking. You should run those commands in the thread I wrote and see what is going on. If its an AMD CPU that's your issue. If its Intel then you may have a BIOS setting wrong. What's the spec for your system?

You may be right about it not downclocking.
I am not running that board anymore. It was an MSI H61 board with a sandy bridge Pentium. It's all unhooked now so I can't check. My new setup is an ASROCK C226 Mini ITX board, 8GB ECC and 6X 3TB Toshiba drives.
Idle power is a little higher then I was hoping for, although it is still OK; and enabling powerd didn't change anything. The bios doesn't have an option to underclock. I will try the commands you suggest.
I do have another issue about staggered spin up I may make a thread about ... for some reason FreeNAS or (the motherboard?) is doing a staggered spin up when drives are resumed from sleep, resulting in unnecessary amount of delay.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
powerd doesn't really do anything on newer processors. Mine's disabled. ;)

Different brands of hard drives support the staggered spinup in different ways.

Some models won't do staggered spinup at all no matter your settings.

Others will save the staggered spinup to the actual firmware and will ALWAYS do staggered spinup until you forcibly disable it. This has been a problem for some people as they'll have a hard drive on a RAID controller that uses a staggered spinup, but when the disk is removed from the system and put in a desktop the drive still does a staggered spinup. Some people have been stuck with staggered spinup drives forever because their RAID controller would fail and they didn't have another controller to disable it.

Still others will do a staggered spinup only in certain circumstances.

I deliberately avoid staggered spinup because I don't want to deal with a feature that isn't that well supported by the industry. Just like I don't try to do the spindown because there's many ways it can either not work at all, not work correctly, or not work when you want it to. Not to mention it's fairly well known that spinning down disks puts alot of wear and tear on them.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Most people using staggered spinup seem to do so in order to buy a smaller power supply. That part is fine, but if you go that route, you cannot use spindown. There is a very real (~~100%) possibility that activity from the host system to multiple drives will occur causing simultaneous spinup, which would then cause a supply failure.

For anyone interested in sleeping their drives, supplies should be sized to be able to start all disks simultaneously.

Staggered spinup is only likely to be useful where the drives are spun up and then kept spinning.
 
Status
Not open for further replies.
Top