xcp-ng / xcp

Entry point for issues and wiki. Also contains some scripts and sources.
https://xcp-ng.org
1.3k stars 74 forks source link

Does xcp-ng support logical processor idling? #418

Closed sheerun closed 4 years ago

sheerun commented 4 years ago

Dell servers BIOS has ability to enable "Logical Processor Idling" (LPI):

LPI is a collaborative interface between platform and Operating System that helps to improve the energy efficiency of a system. This feature is required in those cases where customer has a need to go for power budgeting. It uses Operating Systems core parking algorithm and parks some of the logical processors in the system which in turn lets the corresponding processor cores transition into a lower power idle state. If LPI is getting used instead of throttling^ we will get better performances when power budgeting is used.

Dell implemented LPI by enabling _PUR method in BIOS as per ACPI 4.0 specification. When LPI is enabled and power consumption hits the budget threshold, firmware sends request to Operating System with a number of processors to be sent to idle state based on the configured power budget. This request is given as input to Operating System core parking engine to park as many core as possible requested by LPI .

But it requires support from OS. For sure it works on vSphere 6.7. Does it also work on xcp-ng?

stormi commented 4 years ago

Hi. From what I heard, the firmware does not do a good job at understanding that, while dom0 may be mostly idle, VMs are not, so support for that is disabled in Xen.

nagilum99 commented 4 years ago

Bascially this is a complex thing: You can better have a bunch of cores running at lower frequency than sending a few into 'turbo' modes, as the efficiency drops dramatically. So depending on the scenario, focussing VM workloads onto a few cores is maybe not what you want (also: context switches need to clear caches every time, which should affect performance measurable). IMHO this is only beneficcial on some corner cases where you have way more cores than you actually need (and how much power do you save by that? half-modernish CPUs are already lowering voltage and frequency for not/slightly used cores).

It also sounds like this is something, that should be going to Xen devs, as XCP-ng is "only" the package around it.

sheerun commented 4 years ago

OK, I guess feel free to close it

stormi commented 4 years ago

Closing then. Thanks for the interesting question.