Enabling Turbo Boost?

Status
Not open for further replies.

pjc

Contributor
Joined
Aug 26, 2014
Messages
187
From what I've read, it sounds like you need to turn on powerd in order to use Turbo Boost. (See here: http://www.ateamsystems.com/tech-blog/increase-freebsd-performance-with-powerd/)

That seems like it would make sense, since you'd need some cores to be in a lower power state so that you can crank up the frequency on the busy ones.

But when I did a quick test (powerd -n hadp -v), it would happily adjust the frequency between full and lower speeds, but I never saw anything bump up above 2.3GHz. Would I need to mess with the C states to enable turboboost? Or do those cause problems in FreeBSD 9 (e.g. with timers and such)?

In general I've seen a few indications that powerd can cause problems.

So is Turbo Boost not worth the trouble? Or is it helpful for some workloads?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Turbo Boost really doesn't "work" for FreeNAS servers. The reason is that while some workloads are single threaded, ZFS absolutely isn't single threaded. Virtually every aspect of ZFS is multi-threaded. And naturally any time you plan to run one of those single-threaded services you'll also naturally be doing ZFS stuff. So I wouldn't necessarily expect turbo boost to actually "work" like it does on a desktop. The whole point of Turbo Boost is to give single threaded applications a chance to go faster with other cores off. That particular scenario really doesn't happen for FreeNAS servers.

As for the requirement for turbo boost to work, that's far beyond the scope of this forum as there are hardware, BIOS, and software requirements. But as ZFS is multi-threaded the only time you'd want turbo boost (single threaded apps running) is also the time you'd want all cores available (for ZFS). So I wouldn't be the least bit upset if turbo boost didn't work.
 
Last edited:

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,681
As far as I know, turbo boost is more or less automatic; if your workload isn't so heavy and some of the cores are idle, the others will run faster. Trying to manually manage this in userland is probably a bad idea as Intel has put a lot of effort into managing power and efficiency in silicon.
 

pjc

Contributor
Joined
Aug 26, 2014
Messages
187
Thanks, that all makes sense. I wasn't interested in the power-saving aspects of powerd anyway, especially since there was no measurable difference in power consumption between 2.3GHz and 450MHz (based on IPMI PSU monitoring).

@jgreco, I've heard some explanations that Turbo Boost won't kick in unless some of the cores are at C3, so in theory you'd need to allow your cores to idle that far down, but that could just be apocryphal.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,681
I think it has become very difficult to know what actually happens on the silicon. However, I can tell you that powerd works by monitoring cp_times, which runs at the stathz frequency, so basically powerd can never know more about what's going on in the system than that, looks like in FreeNAS stathz is 127. powerd was written back when silicon-based power management was poor-to-none, but the silicon did allow the states to be controlled in software, because at the time Intel assumed that would be the best way to do it. But now the silicon itself is pretty good at judging when to idle and when to burn, and is probably reevaluating that much more frequently than a hundred times per second.

I long ago stopped obsessing too much over specifics I can't really control, and in a hypervisor based environment it's all a bit different anyways. What I do know is that if my ESXi nodes are less than 50-60% busy, they're more power-efficient and seem to perform a bit better too.
 
Status
Not open for further replies.
Top