in Crash Course, Performance

Not all CPU cores are showing up in Linux server /proc/cpuinfo

The Linux kernel is very smart and can leverage CPU features and instruction sets to bring down power consumption especially on a server. So one of the logical things to do when power savings are needed is to turn off CPU cores. To confirm that this is indeed what’s happening on your system, you could hot-plug these cores and bring them online in this fashion:

echo 1 > /sys/devices/system/cpu/cpu4/online
echo 1 > /sys/devices/system/cpu/cpu5/online

You can then verify that additional CPU cores have been brought up. You can also take them offline if needed:

echo 0 > /sys/devices/system/cpu/cpu4/online
echo 0 > /sys/devices/system/cpu/cpu5/online

The above will lead to this message being displayed in /var/log/messages (turned off core # 23):

[1132050.457980] CPU 23 is now offline
[1132065.819054] Booting Node 2 Processor 23 APIC 0x2b

That’s all folks!

Write a Comment

Comment

Comment moderation is enabled. Your comment may take some time to appear.

Webmentions

  • JNEHcsgu

    JNEHcsgu

    Not all CPU cores are showing up in Linux server /proc/cpuinfo | UNIXy

  • site

    site…

    is it true that laila ali save hulk hogan life…

  • site

    site…

    very nice post, i certainly love this web site, keep on it…