Intel NUC

Intel NUC 13 Pro Mini PC Running Linux: P-Cores and E-Cores

Forcing programs to run on the P-Cores or E-Cores

Let’s say we want to run an application solely on the P-Cores or E-Cores. There’s an easy way to do this courtesy of CPU affinity. That’s a scheduler property that “bonds” a process to a given set of CPUs on the system. The Linux scheduler will honor the given CPU affinity and the process will not run on any other CPUs.

As an example, let’s run Chrome only on the NUC’s P-Cores. We can issue either command:

$ taskset -c 0,1,2,3,4,5,6,7 google-chrome-stable
$ taskset 0xFF google-chrome-stable

Alternatively to run Chrome solely on the NUC’s E-Cores, issue the command:

$ taskset -c 8,9,10,11,12,13,14,15 google-chrome-stable

CPU sets

A similar arrangement can be made using CPU sets.

On Manjaro, we first need to install the cpuset package:

$ sudo pamac install cpuset

On Ubuntu, the command to install cpuset is:

$ sudo apt install cpuset

The commands below create a set for all cores, a set for P-Cores, and a set for E-Cores respectively.

$ sudo cset set --cpu=0-15 --set=all
$ sudo cset set --cpu=0-7 --set=perf
$ sudo cset set --cpu=8-15 --set=eff

Let’s say we want to move all processes to the E-Cores set:

$ sudo cset proc -m -f root -t eff

We need to give users the permission to run programs with one of the sets we’ve defined.

$ sudo chmod -R 777 /cpusets

Now if a user wants to run a specific program (say Firefox) on the P-Cores, they can issue the command:

$ cset proc --set=perf --exec firefox

The next article in this series will start exploring gaming on the NUC.

Pages in this article:
Page 1 – P-Cores and E-Cores
Page 2 – Interpret output from top
Page 3 – How much faster is a P-Core compared to an E-Core?
Page 4 – Forcing programs to run on the P-Cores or E-Cores


Complete list of articles in this series:

Intel NUC 13 Pro Mini PC
Part 1Introduction to the series with interrogation of system
Part 2Benchmarking the Mini PC
Part 3Installing Ubuntu 23.10 Desktop
Part 4Configuring Ubuntu 23.10 Desktop
Part 5Power Consumption
Part 6P-Cores and E-Cores
Part 7Gaming
Part 8Installing and Configuring Manjaro
Part 9BIOS options
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments