Posts Tagged ‘power management’

Max your CPU performance on Linux servers

Friday, July 2nd, 2021

I have had an interesting experience with HPE servers, where the BIOS was defined to allow max performance (in contrast to ‘balanced’ mode), but still – the CPU was not at max all the time.

While we generally, strive to a greener computing, when having low-latency workload, we expect a deterministic performance. We want our database to provide results in a timely, and more important – a consistent way. We want to expect a certain query/job to take the same time, whenever we run it. CPU throttling and frequency manipulation, which are part of CPU power-management are not our friends. A certain query can take longer, if the CPU is currently throttled, and can switch to another, slower, core mid-task. This can result in a very complex performance tuning and server behaviour troubleshooting.

The goal of setting the BIOS to ‘max-performance’ is obvious, then, however – it does not have the desired effect. The CPU keeps on throttling, and, while some power-reducing features are disabled, not all. This is not our goal.

Adding to the boot options of the server (via the GRUB/GRUB2/GRUB-EFI/Whatever) the following parameters, should disable Intel CPU throttling, and all (i)relevant C_states. I have not tested, nor investigated AMD behaviour:

nosoftlockup intel_idle.max_cstate=0 mce=ignore_ce

Of course – a reboot is required for these settings to take effect.

If you want to control power management afterwards, you can manually disable a certain core/CPU by running a command such as this:

echo 0 > /sys/devices/system/cpu/cpu<number>/online

It will disable the CPU (and place it in deep power save) until woken by another CPU, by echoing ‘1’ to that same ‘file’.

i810 dual-pipe issues with power management

Friday, May 9th, 2008

I have had a problem with my IBM X41 – ever since I have started using Ubuntu 7.10 (after a nice upgrade from 7.04), whenever the lid was closed, and reopened – the display would have flickered for a short while (while the lid is up) and then blank completely.

My (ugly) workaround was to force the computer to sleep whenever it happened. It seemed to be a workaround good enough for most cases. On some cases, the laptop would do just the same as it was placed in its docking station.

I have found an Ubuntu bug here, which seems to expose this problem too. It exposed few additional problems as well. The error message I got (through SSH, of course) when viewing the logs it said that the video card detected pipe A to be the active pipe, that it stopped using pipe B (which appeared to be the internal one) and that it decided to disable clone mode. Wow. I just lost my internal LCD. Connecting an external display, I get the whole picture working just fine, however, I cannot use the laptop like that.

After a major struggle with various i810 options, I have looked and found an option to disable Power Management. I have done so, according to the note here, and it solved all my problems in this area – for now.