Web Hosting Talk







View Full Version : CPU offlining


wartungsfenster
10-19-2011, 06:21 AM
Hi,


I wonder if some of you had success with demand-scaling of their CPU power for VPS hosts.
I tried to hack something that will take offline more and more physical CPUs in my Xen hosts as load decreases and takes them back online as the load goes back up.

Of course, shutdown of the box is even more efficient, and it can be brought back online via IPMI once needed, but i.e. if you run a network backed cluster filesystem you will constantly have more nodes online than are being fully utilized.


The problem with this was that I don't have a good power meter at hand, and judging by the CPU thermal sensors this whole endeavour had little effect.
I guess all that happened was that the CPU cores were idling unused at full speed (so I managed to free the cores, but they weren't sent to sleep at all). The test box was just an AthlonX2 box, maybe that is another cause.

Did any of you succeed in doing such a thing?
What were your experiences?

Or are you still planning to give it a try?

wartungsfenster
11-10-2011, 02:16 PM
I can give a partial update to this :)

You can view power management reports and set power management policies using
xenpm

Turning off CPUs like I wanted seems to be a little beyond what PC servers are capable off. (sigh... just toys :)

nocodeindications
01-23-2012, 07:15 PM
I think that's along along the same lines as sending CPU idle instructions. Remember back on windows 95 when the CPU would burn hot 24/7 :P

But to more directly answer your question, check out this pretty cool article on xen.org http://www.xen.org/files/xensummit_oracle09/xensummit_intel.pdf

Run-time power (cpufreq) is particularly interesting.

wartungsfenster
01-23-2012, 07:26 PM
Offlining is different. On highend servers it's possible to power off cpus or put them into deep sleep states if just single cores.

Thanks for the link. About the paper, it's IMHO "nice research" but since they didn't have access to anything other than a dualcore laptop it is not highly helpful. :(
So far I have enabled the "powersave" cpu governor using xenpm.
At the Xen hackathon I also heard that the powersaving was at times broken for Xen kernels but from all I can tell this is working just fine on all versions that I have (Oracle 3.4 and AlpineLinux 4.1.2 with pvops)

You can also see / collect good statistics with xenpm, like with intel powertop on normal servers.

Oh and btw last weekend I did some large Nagios benchmarks. Doing a
service cpuspeed stop improved results by a good 10% :/


Anyway we can all do more on that topic so that we can hopefully some time live on the energy we get for free from our nature. And THEN we can have laaaarge datacenters :)

happy powersaving!