AMD Cool 'n Quiet vs. Powerd in Freenas 8.04

Status
Not open for further replies.

moraga695

Dabbler
Joined
Jan 19, 2012
Messages
21
Hello,

I just moved my Freenas over to a new box that has an AMD processor that supports its Cool 'n Quiet power saving scheme, which is turned on in the BIOS by default. I'm running Freenas 8.04 x64 with powerd enabled and first time I booted up the new box I started receiving an error message every few seconds - "hwpstate0: set freq failed, err 6". After a little web research, I found that if I disable Cool 'n Quiet in the BIOS the error messages stopped.

On the web I found articles saying that FreeBSD, starting with version 6.0, does support Cool 'n Quiet, so I'm guessing that whatever is needed for that isn't implemented in Freenas' BSD? Any FreeBSD experts out there know how to get this working in Freenas? On the other hand, what's different between what powerd and Cool 'n Quiet do? As I understand it, both automatically adjust the CPU's frequency based on its load, so maybe leaving Cool 'n Quiet disabled doesn't waste energy?

Thanks for your help.
 

darkryoushii

Explorer
Joined
Jan 23, 2013
Messages
60
interesting.. was looking to find out which is better - Cool 'n' Quiet or powerd and I stumbled upon this thread.. does FreeNAS 8.3.x support it yet? When I leave it enabled and run powerd I get errors. When I disable it and run powerd I don't.. but now I have to decide which does the better job, and I have no real way to test that.

Any input?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I got no clue to be honest.

Check out this thread where I played with powerd a bit. Maybe some of those commands can clue you in to what is going on frequency-wise. My guess would be that with with CnQ disabled powerd can't regulate the CPU frequency. I know on my machine disabling the Intel Speed-Step in the BIOS prevented adjusting the CPU frequency.
 

stlouis1

Dabbler
Joined
Feb 1, 2013
Messages
10
I think if I read right, he's saying powerd errors with CnQ enabled.

I'm more of a nix guy than FreeBSD, Imo it's close enough though. can you check what modules are being loaded from the shell? maybe you need to force load a module that's not being detected correctly?

CnQ is the hardware mechanism to throttle cpu frequencies based on load. Powerd will be the software layer to manage it, they should go hand in hand.

mind you it could be a bios issue too perhaps?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I think if I read right, he's saying powerd errors with CnQ enabled.

CnQ is the hardware mechanism to throttle cpu frequencies based on load. Powerd will be the software layer to manage it, they should go hand in hand.

Sorry, I didn't clarify my post very well. In this case, assuming this issue isn't fixable, it sounds like leaving CnQ disabled and powerd on won't really save you any power. And when you leave CnQ enabled you get errors. To me it sounds like CnQ and powerd don't work together. I referred to the other post because if enabling CnQ alone causes CPU freq to drop then maybe you should just leave powerd disabled and let CnQ handle the power savings.

Of course, as you said above, a BIOS update may help fix this issue.
 

survive

Behold the Wumpus
Moderator
Joined
May 28, 2011
Messages
875
Hi guys,

For what it's worth, before I moved to my current i3\Supermicro setup I ran FreeNAS on an AMD Phenom II 940\790GX system. I had CnQ enabled in the BIOS and used powerd without issue. I can confirm that powerd would clock the proc down when the system was lightly loaded.

If you haven't updated the BIOS I would certainly give that a shot.

-Will
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Hi guys,

For what it's worth, before I moved to my current i3\Supermicro setup I ran FreeNAS on an AMD Phenom II 940\790GX system. I had CnQ enabled in the BIOS and used powerd without issue. I can confirm that powerd would clock the proc down when the system was lightly loaded.

If you haven't updated the BIOS I would certainly give that a shot.

-Will

Not an AMD guy.. so I'm curious: Did you try experimenting with powerd on and off while turning CnQ on and off? How do the 2 work when each is on with the other off and whatnot? The last AMD CPU I bought was a laptop, and CnQ made the laptop unusable. As soon as I unplugged it from the wall the CPU went from 1.8Ghz to 700Mhz and wouldn't clock up regardless of load until you plugged it in. Disable CnQ and the laptop wouldn't ever go to full speed. Later I found out it was how HP designed it laptop and it couldn't be "fixed". Total time I used the laptop before giving it away.. about 20 hours. Total waste of money.
 

stlouis1

Dabbler
Joined
Feb 1, 2013
Messages
10
I've used the CnQ on several systems over the years since it's come out on multiple versions of windows and linux now and never had issues. On windows it tends to just work as long as the drivers are installed. On Nix i've run into issues here and there if the correct module wasn't loaded. as of late the nix module has been built-in to the regular acpi-cpuqfreq module, but there used to be a powernow-k8 module specific for amd's.

At cyberjock, call me paranoid, but I think HP is in bed with intel or something because I've experienced that same thing multiple times with with HP laptops built on AMD cpu's, they're slow when off the power adapter, seems to me it's intentional because other than HP I've never had CnQ work so poorly. The threshold required for the cpu to scale properly on them just isn't there

i presume lsmod can be run on freebsd? I'm new to freebsd as I've only recently started using anything based on it, and both pfsense and freenas have web interfaces so I haven't needed to touch the console, more of a nix guy. maybe the OP can check and make sure modules are loading, and maybe try to force load them and see if there's any errors?
 

macnlz

Cadet
Joined
Jul 11, 2013
Messages
5
I’ve got an AMD A4-4000 processor and FreeNAS 8.3.1, and I get tons of "hwpstate0: set freq failed, err 6” in /var/log/messages.

However, these errors don’t mean that powerd isn’t working!

With powerd disabled, my Kill-a-Watt shows ~40-42 watts when idle with all drives spun down, and ~53-55 watts when idle with all 6 drives spinning. With powerd enabled, in the same state, I get ~35 watts and ~50 watts, respectively. Under full load, powerd has little to no effect, as expected.

So in my case, checking the powerd checkbox saves ~6 watts, and spinning down my six WD Red 2TB drives saves an additional ~15 watts.

Running “powerd -v” confirms that the clock speed is indeed adjusted in the range reported by "sysctl dev.cpu.0.freq_levels” (175MHz to 3GHz). From the output, it’s not clear what the clock speed of the second core is. However, The A4-4000 uses the Piledriver architecture, which as I understand it is really a single core with two Integer units. So my guess would be that the frequencies of both “cores” are always identical.
 
Status
Not open for further replies.
Top