Ubuntu – Taking The Cores Offline

cpuinteloffline

I have Intel® Core™ i7-2670QM CPU @ 2.20GHz × 8 process which has 4 physical cores and 4 logical cores.

Most of the time i been on AskUbuntu, Watching videos, Basically no processor hungry stuff.

So I was thinking to take cores offline but i have few question, I know i can take the core offline

  cat /sys/devices/system/cpu/cpu7/online 
  1
  echo 0 > /sys/devices/system/cpu/cpu7/online

So my question is:

  1. Is it safe to take core/cores offline ?
  2. Is it possible that my app crash ?
  3. Does taking the cores offline save power ( On battery ) ?

Best Answer

Some people will argue that changing or modifying anything related to the CPU is not a good thing. Well if that's the case, then there would be no overclocking. I think that you can disable of one or more of the cores in the CPU. I know that it can be done in windows, so there has to be a way to do it in Linux.

Now personally, I think that only advanced users attempt doing such things to the CPU, and the system for that matter. Because any small mistake can render the system useless. So any modifications of this sort, should be done with complete caution.

By default Intel processors, have some technologies built in that help in saving power, such as:

Intel Turbo Boost Technology dynamically increases the processor's frequency as needed by taking advantage of thermal and power headroom to give you a burst of speed when you need it, and increased energy efficiency when you don’t.

Idle States (C-states) are used to save power when the processor is idle. C0 is the operational state, meaning that the CPU is doing useful work. C1 is the first idle state, C2 the second, and so on, where more power saving actions are taken for numerically higher C-states.

As mentioned above, be careful when dealing with such settings.

Disabling a core in Linux can be done through the grub menu and add parameters to the kernel entry. These parameters are sent directly to the core when the Linux is starting. The Linux system has to be restarted after the modifications to disable a core in a multi-core CPU are made.

For the Procedure when using Linux see Multicore CPU: how to disable a core

Source: Intel

Source: Multicore CPU: how to disable a core