Is there a way to use specific cpu core types for specific applications, or certain situations
by SeanGodsell from LinuxQuestions.org on (#6PGF8)
I have an Intel Core Ultra 7 155H cpu, which has three different core types. There is 6 P cores that are high performance cores with hyperthreading. There is also 8 E cores, which are slower efficient cores with no hyperthreading. Plus there is 2 L cores, which are even slower than the E cores, and these L cores use even less power than the previous core types. My Question, is there a way for a Linux system to use only certain core types for specific apps, or situations. For instance I would love to use the L cores, and only the L cores for low power mode on my laptop. But for gaming use only the P cores for a faster, smoother, and more consistent gaming experience. Is there a way that I can do that with this CPU under Linux? This would also be great for some ARM cores as well, like the RK3588 CPU, which has 2 different core types.
Update: I believe I found my own solution.
I just make any cpu core go offline by using the following command:
echo 0 | sudo tee /sys/devices/system/cpu/cpuX/online
Make sure you change cpuX to the corresponding cpu core number for the 7 155H is from 0-21
The P or performance cores go from 0-11
The E or efficient cores go from 12-19
The L or low power cores go from 20-21
To make the cpu come back online again:
echo 1 | sudo tee /sys/devices/system/cpu/cpuX/online
So if you want to make sure your gaming experience is fast, smooth, and consistent, then make sure to put the cpu cores from 12-21 offline. You will still have 12 cores, and only the fastest P cores will be running.
You can check the status of all the cpu cores with the following command:
lscpu -a --extended
Hope this information helps someone else.
Update: I believe I found my own solution.
I just make any cpu core go offline by using the following command:
echo 0 | sudo tee /sys/devices/system/cpu/cpuX/online
Make sure you change cpuX to the corresponding cpu core number for the 7 155H is from 0-21
The P or performance cores go from 0-11
The E or efficient cores go from 12-19
The L or low power cores go from 20-21
To make the cpu come back online again:
echo 1 | sudo tee /sys/devices/system/cpu/cpuX/online
So if you want to make sure your gaming experience is fast, smooth, and consistent, then make sure to put the cpu cores from 12-21 offline. You will still have 12 cores, and only the fastest P cores will be running.
You can check the status of all the cpu cores with the following command:
lscpu -a --extended
Hope this information helps someone else.