Limitation of used CPU cores

In Linux, certain CPU cores can be excluded from use before the kernel starts. This can be helpful, among other things, if there are problems when starting on defective devices or while running the tests. These problems can include crashes and the like. However, it is important to know that testing defective CPU cores is generally not a problem. In rare cases, however, defective CPU cores can cause the device to crash, regardless of toolstar®testLX .

Exclude specific CPU cores from the scheduler

You can leave certain CPU cores active but exclude them from the automatic scheduler. This reduces the load on the cores. However, it is not guaranteed that no program is actually running on these CPU cores. To exclude or reserve certain cores, you can add the isolcpus=x-xattach.

This reserves a range of CPUs and excludes them from the classic scheduler. For example, if you isolcpus=4-7, cores 5, 6, 7 and 8 are reserved and are not actively used by the classic scheduler. However, certain programs can still run directly on these cores.

Completely disabling CPU cores before boot

In order to completely deactivate a certain number of CPU cores before starting the Linux kernel and thus exclude them from being used by the operating system and all programs, you can set the maxcpus=X append to the parameters. For example, to keep only a single core active, you can maxcpus=1 to the existing parameters.

If you use this setting you cannot use all CPU cores in toolstar®testLX and will only see the number of cores in the system overview that are actually there.

Completely disabling CPU cores after boot

To deactivate a core after starting the operating system, you can modify the individual cores in the Linux virtual file system under the sys/devices/system/cpu/ directory by entering a 0 in the respective online file. For example, if you want to disable core 2, you can write:

cd /sys/devices/system/cpu/cpu2
echo 0 > online

With this procedure, however, the core may have already been used when the operating system or one of the services started. In order to achieve complete deactivation/non-use, the cores must be deactivated before the kernel starts.

Enabling disabled CPU cores after boot

To activate a core after starting the operating system, you can modify the individual cores in the Linux virtual file system under the sys/devices/system/cpu/ directory by entering a 1 in the respective online file. For example, if you want to disable core 2, you can write:

cd /sys/devices/system/cpu/cpu2
echo 1 > online

Cookie-Einwilligung mit Real Cookie Banner