Author Topic: CPU hotplug / completely power down one CPU in a multi-CPU system  (Read 118 times)

pocock

  • Jr. Member
  • **
  • Posts: 66
  • Karma: +4/-0
    • View Profile

Linux provides a mechanism to disable individual cores.  This can be useful to reduce peak power consumption or to simulate a smaller environment, for example, if a developer with a Talos II wants to know how their application would perform on a Blackbird with a 4-core CPU, they can turn off all but 4 cores.

echo 0 | sudo tee /sys/devices/system/cpu/cpu1/online

Spoiler: If you put all the cores of one CPU offline with that command then you won't be able to access the RAM and PCI slots connected to that CPU and you might observe strange behaviour.

Is it possible to go one step further and completely power down a CPU socket and maybe the associated RAM banks too, almost as if they were removed from the board?

There is some documentation about Linux kernel hotplug and it suggests x86 only.  Maybe this would be good for another bounty but first it is important to understand whether the Raptor and POWER9 hardware supports this and whether it would lead to energy savings or other benefits.

Problems that would be solved with this:

- reducing heat output from Talos II workstations during summer heatwaves

- extending runtime for a system on UPS batteries
Debian Developer

ejfluhr

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: CPU hotplug / completely power down one CPU in a multi-CPU system
« Reply #1 on: July 29, 2020, 05:31:38 pm »
Do the cores remain powered on but idle when doing that, or does the OS+firmware actually power-gate the cores and caches?   Ideally the cores and caches are power gated for maximum savings, but I'm not sure if the open-source setups fully implement all the stop states.

Note that the maximum boost frequency may also go up, offsetting the power reduction slightly until the technology-limited frequency is reached.

Regards, Eric