Reducing power consumption of FreeNAS 8.3

Status
Not open for further replies.

TehN00b

Dabbler
Joined
Oct 28, 2012
Messages
11
Hello,
I'm rather new to FreeNAS (and the BSDs) and i'm trying to reduce the power consumption. It's a 4x drive home server which sits idle most of the day. It draws 120 watts, continually, and does not seem to lower the load at all. I've spent quite a bit of time looking for answers, so I apologize if I missed an obvious (RTFM!) answer. I am measuring the power consumption with a Kill-a-watt meter, fwiw.

The montherboard's settings could be responsible but I have them set for as power-efficient as I can. That includes the AMD Cool n Quiet.

Within FreeNAS Powerd is enabled (I see no options to set, just an on/off). The disks are spinning down.

I've tried adding sysctl settings, guessing at what it should be, with no luck. the sysctl command shows the 3 CPUs with a supposed state of "C1" but it should support C2, C3, so I think that's the issue (but may be wrong here... i'm a n00b)

CPU: AMD A6-3500 APU with AMD Radeon 6530 HD Graphics 2.1/2.4GHz Socket FM1 65W Triple-Core
Board: MSI A75MA-P35

Here are some settings for detail: sysctl -a |grep "dev.cpu"
dev.cpu.0.%desc: ACPI CPU
dev.cpu.0.%driver: cpu
dev.cpu.0.%location: handle=\_PR_.P000
dev.cpu.0.%pnpinfo: _HID=none _UID=0
dev.cpu.0.%parent: acpi0
dev.cpu.0.freq: 400
dev.cpu.0.freq_levels: 2100/18760 1900/16200 1662/14175 1600/13905 1400/12127 12 25/10611 1200/10687 1050/9351 1000/9020 875/7892 800/7277 700/6367 600/5457 500/ 4548 400/3638 300/2728 200/1819 100/909
dev.cpu.0.cx_supported: C1/100
dev.cpu.0.cx_lowest: C1
dev.cpu.0.cx_usage: 100.00% last 369us
dev.cpu.1.%desc: ACPI CPU
dev.cpu.1.%driver: cpu
dev.cpu.1.%location: handle=\_PR_.P001
dev.cpu.1.%pnpinfo: _HID=none _UID=0
dev.cpu.1.%parent: acpi0
dev.cpu.1.cx_supported: C1/100
dev.cpu.1.cx_lowest: C1
dev.cpu.1.cx_usage: 100.00% last 276us
dev.cpu.2.%desc: ACPI CPU
dev.cpu.2.%driver: cpu
dev.cpu.2.%location: handle=\_PR_.P002
dev.cpu.2.%pnpinfo: _HID=none _UID=0
dev.cpu.2.%parent: acpi0
dev.cpu.2.cx_supported: C1/100
dev.cpu.2.cx_lowest: C1
dev.cpu.2.cx_usage: 100.00% last 115us
dev.cpufreq.0.%driver: cpufreq
dev.cpufreq.0.%parent: cpu0
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Most of your energy savings will come in the form of buying components that are low power and energy efficient. That means buying an appropriate CPU, power supply, and hard drives. If you have a video card, make sure it is not a gaming card since it won't accelerate text. If you bought 7200RPM hard drives, expect power to be higher.

Other than that:

1. You can enable powerd under settings -> advanced.
2. Somewhere you can set the hard drive to go to sleep after so many minutes of inactivity, if the drive supports it.

Design is where you really want to look at power management. Also, keep in mind that if you simply replace a frequently used 100w light bulb with a CFL you can potentially save more than what you will get with the above 2 options.
 

Stephens

Patron
Joined
Jun 19, 2012
Messages
496
Putting the HDD's to sleep when idle is the easiest bang-for-the-buck way to save power for an existing system. My 6 drives save 30+ watts like this if I enable it.
 

TehN00b

Dabbler
Joined
Oct 28, 2012
Messages
11
The system is at 119-121 watts. The processor shows all cores active at 100% (and it supposedly is just a 65 watt processor) and the drives show down per http://forums.freenas.org/showthread.php?2068-How-to-find-out-if-a-drive-is-spinning-down-properly

If nothing else, the system puts out a fair bit of heat and it's just wasteful. Any other suggestions as to what I can tune/adjust/modify in freenas to ensure powersaving features work?

Anyone know how to modify the C1/C2/C3 settings?

Edit: Thanks for the comments so far! :)
 

Stephens

Patron
Joined
Jun 19, 2012
Messages
496
I don't see how C1/C2/C3 is going to work when the cores are at 100%. There's no reason that you've shared why they'd be at 100%. Something seems wrong. Exactly which tasks does FreeNAS say is using all that CPU? Mine looks like this:

Code:
last pid:  2862;  load averages:  0.01,  0.01,  0.00  up 0+01:07:25    13:47:09
34 processes:  1 running, 33 sleeping
 

TehN00b

Dabbler
Joined
Oct 28, 2012
Messages
11
I apologize, I spoke un-clearly. The processor utilization is not at 100%, it is near idle continually. I can provide the top output later (I dont have access to the server at this moment) but it's very low. The system reporting charts show only a very near-bottom line day over day. (I selected a mid-range CPU because I planned to install some jailed applications but I have not done so, so again, very low usage server).

When I look at the sysctl output, this is what I meant by 100% - one hundred percent power, not scaled back at all.
dev.cpu.0.cx_supported: C1/100
dev.cpu.0.cx_lowest: C1
dev.cpu.0.cx_usage: 100.00% last 369us
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
So did you try enabling powerd as I mentioned above? It is not enabled by default.

Not to AMD bash, but the last AMD I owned would NOT go to lower power modes when it should have, and then did when it shouldn't have.

My AMD laptop wouldn't underclock to the lowest CPU speed when the computer was idle but plugged in, but if you unplugged the laptop the CPU would automatically go to the lowest speed(lower than being plugged in) and wouldn't ever go back to up to full speed. No amount of power management tweaks in Windows or Linux could get the laptop to work properly. I had bought the laptop just to play 720p video when traveling, and it couldn't do that. Ultimately the laptop sat on a shelf until I threw it away.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Was there any change in power? If you've set the hard drives to go to sleep after a certain period of time, that's about the best you'll get without buying more efficient hardware.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
You should be able to follow that guide pretty easily. The GUI doesn't offer those options. I'd be careful how much you tinker though, it could backfire. FreeNAS was built to save power, so I'd expect that the default settings work pretty well for most people.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
What hard drives are you using?
Also, what power supply are you using? Is it 80+ gold?
 

TehN00b

Dabbler
Joined
Oct 28, 2012
Messages
11
Hi, sorry for the delay - I just want to thank you. The power is running at 39-40 watts idle now, with drives shut down.
 

darkryoushii

Explorer
Joined
Jan 23, 2013
Messages
60
^ What did you change? I'm in a similar situation with an A6-5400K and 5x 3TB 7200RPM drives.
 

R.G.

Explorer
Joined
Sep 11, 2011
Messages
96
I went through a similar train of thought when I set up my server.

One big power saving place that most people don't think of is the power supply. People are prone to buying ATX supplies in 500W and up power ratings. The smallest ATX power supply I've ever seen is 250W.

The power supply will eat some power even when its output is minimal, as 100W is to a 500W supply. That loss does not go away even if the actual computer is completely idling and drives are powered down. The "80-plus" rating on supplies means "over 80% efficiency". On a 300W power supply, 20% is 60W. On a 500W supply it's 100W.

The 80-plus bronze, silver and gold ratings also tell you something about the idling power. The higher the rating, the more attention that has been paid to getting the irreduceable losses in the power supply itself down.

The message here is that if you have a system that sits at 100W, the biggest chunk of that *might* be the power supply itself. Maybe not, but it could be. If you want low power systems, don't put a burly 800W power supply in it. Get the smallest rated power (300W if you can find it) and the highest efficiency rating you can get. I like Seasonic and Corsair, which may possibly be Seasonic under the covers. Get 80-Plus Gold efficiency rating. Cheap power supplies will not have had much attention paid to efficiency and low idling power.

As an aside, cheap power supplies will not have had much attention paid to reliability, either. The really, really, really expensive thing inside your computer is the data. Saving $20 on a power supply that fails in the middle of a big disk write and craters the disks will leave you feeling pretty bad. Worse than that, a low-dollar power supply was for sure designed by someone whose boss was on his/her back all the time to cut corners. That's not what you want powering your data.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Here's a quick example I found of an efficiency chart: http://www.silverstonetek.com/techtalk_cont.php?area=&tid=wh10_005

Notice that at low wattage efficiency is relatively low. Ideally you want to be between 30 and 60% of the rated capacity of your power supply for maximum efficiency. Believe it or not some power supplies have such a low efficiency at low wattages that you can sometimes add load to the PSU and either not see an increase in wattage at the wall or see a slight decrease as the PSU gets more efficient. Crazy huh?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
I posted some information about our experiences with the Kingwin STR-500 some time ago. We've been using some of these for ESXi nodes, Supermicro boards with E3-1230 and a little disk, and the base system (memory, CPU) was idling around 45 watts measured at the plug IIRC. A spare ATX bench supply on the same system was running 20 or 30 watts more, I believe.

The big question is whether you're likely to recover the extra cost of a gold, platinum, or titanium(!) supply over the likely lifetime of your gear. But to answer that question, it probably isn't fair to compare to a generic supply. We see an incremental difference between the gold level Supermicro PWS-351-1H and the platinum rated Kingwin's, but also a $60 price difference. Even if the Supermicro is eating 10 more watts at 13c/kWh for 5 years, that's 438kWh or about $57 in electric cost.
 

darkryoushii

Explorer
Joined
Jan 23, 2013
Messages
60
Okay. Here's my proper post. No point trying to create a new thread when this one is already active so here goes.

Built my server last weekend. Got a power meter today to measure the wattage. All relevant specs including software version is in my signature, it may be worth noting that I am also running Full Disk Encryption on the drives, but am willing to reformat the drives without if it means that I get a much lower power cost.

This is what I'm currently measuring
Idle: 94w
Streaming Avengers 1080p Bluray: 88w
Idle straight after closing movie: 92w
Browsing Directories: 87w

IT MAKES NO SENSE.
I have moved all my plugins and jail to a separate 2.5" 5400rpm drive I had spare with not much of a difference in power usage.
The drives in the zfs pool are definitely not spinning down though it did take me a bit to browse the movies folder before, and so maybe that magically started working.
Powerd is enabled, and the CPU did drop to 898MHz before but that's the lowest I've seen it so far.

I really need to get this machine idling at 50w or less or it's not worth me keeping. I pay 30.60c/kWh and so 100w is adding close to $70 per quarter to my power bill if it were in use 100% of the time, since this machine will be in use by SOMEONE at least 50% of the time, then it really has to change it's idling habits.

Does encryption give any overhead in power usage? Will it be better to be disabled?
Can someone please help me get my drives to start powering down asap.. the only thing I can think of is that my downloaders are set to send completed downloads to the ZFS pool, but they also have been put on 2 hour timers, so they shouldn't be keeping them up 24/7.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Okay. Here's my proper post. No point trying to create a new thread when this one is already active so here goes.

Built my server last weekend. Got a power meter today to measure the wattage. All relevant specs including software version is in my signature, it may be worth noting that I am also running Full Disk Encryption on the drives, but am willing to reformat the drives without if it means that I get a much lower power cost.

This is what I'm currently measuring
Idle: 94w
Streaming Avengers 1080p Bluray: 88w
Idle straight after closing movie: 92w
Browsing Directories: 87w

IT MAKES NO SENSE.
I have moved all my plugins and jail to a separate 2.5" 5400rpm drive I had spare with not much of a difference in power usage.
The drives in the zfs pool are definitely not spinning down though it did take me a bit to browse the movies folder before, and so maybe that magically started working.
Powerd is enabled, and the CPU did drop to 898MHz before but that's the lowest I've seen it so far.

I really need to get this machine idling at 50w or less or it's not worth me keeping. I pay 30.60c/kWh and so 100w is adding close to $70 per quarter to my power bill if it were in use 100% of the time, since this machine will be in use by SOMEONE at least 50% of the time, then it really has to change it's idling habits.

Does encryption give any overhead in power usage? Will it be better to be disabled?
Can someone please help me get my drives to start powering down asap.. the only thing I can think of is that my downloaders are set to send completed downloads to the ZFS pool, but they also have been put on 2 hour timers, so they shouldn't be keeping them up 24/7.

Okay, so this:

Trinity: AMD A6-5400K APU | ASRock FM2A85X-Extreme4-M | Fractal Design Define R4 (3x 140mm Fractal Case Fans)
16GB Corsair Vengeance 1600MHz LP | 5x 3TB Toshiba DT01ACA300 RAID-Z1 Pool | 1x Samsung Spinpoint 2.5" HDD UFS Plugins Jail | Seasonic G-550 550W Gold | FreeNAS 8.3.1 RC1.

is your system? Those are 7200RPM drives and Toshiba rates them around 7W active, 4W idle, 1W sleeping. Five of them active is going to be 35 watts, idle will be 20 watts. Sleeping, 5 watts. But many here will tell you, spinning drives up and down is extremely stressful on drives, and will likely lead to unhappiness. It might not be a tradeoff you want to make. 3 140mm case fans? Are you running them full speed? Do you know the wattage? Are you using passive cooling for the CPU, or also running a fan on that? It's funny to see people try to build energy efficient systems and then not realize that cooling has a significant power impact. I don't have any direct experience with the A6-5400K but I've heard griping that AMD's current power management is less aggressive than Intel's. Still, the most energy-efficient high performance systems we've been building here are Xeon E3-1230 based boxes that eat about 45W idle (no drives). A SoC-based NAS will take a few watts plus whatever the drives require, and an Atom-based NAS usually seems to average around 20-25W plus whatever the drives require (true of the name-brand NAS devices or if you roll your own Atom based FreeNAS). Intermediate platforms like the N36L/N40L/N54L are a little more than that, but really, hitting less than maybe 40W on a performance platform is going to be very difficult, and when you add drives to that, it pushes consumption up. Hoping for a 50W idle is probably unrealistic, but if you want to spin the drives down and can figure out what your drives need in order to make that happen, I'd expect 70-75W as a reasonable goal, and if there's anything else you can change in your system to reduce wattage, that'll help too.
 

R.G.

Explorer
Joined
Sep 11, 2011
Messages
96
If you're building a system from scratch, use laptop drives. These have much lower power usage, for obvious reasons. They cost more, though.
 
Status
Not open for further replies.
Top