Menu

How to allocate system CPU

1.Log in to the real-time system of the industrial intelligent computer, full name of iComputer, refer to the documentation.

2.Enter the following command in the end point to open the grub file

sudo vim /etc/default/grub

Isolcpus: Isolates the CPU, and the system does not automatically place tasks on the CPU specified by this parameter. To run tasks on this CPU, you must manually specify tasks to this CPU.

Nohz: Reduce clock interrupts on specified cores (0 and 1)

nohz_full: Specify which CPUs enter the no-tick state. Reduce clock interrupts.

rcu_nocbs: RCU is a commonly used multitasking synchronization mechanism in Linux kernel code. During use, kernel threads are created to execute callbacks, so CPU is needed to execute them. Use rcu_nocbs parameters to specify which CPUs will not be used to execute callback code.

Irqaffinity: Set interrupt affinity, irqaffinity does not specify the CPU and only performs necessary interrupt processing.

 


SX51xx series

1.View machine grub file real-time core is 0,1, non-real-time core is 2,3 (isolcpus: the value here is the real-time core to be isolated irqaffinity: the value here is the non-real-time core)

2.For high real-time performance, the parameters in the grub file need to be modified to isolcpus = 0,1,2 nohz_full = 0,1,2 rcu_nocbs = 0,1,2 irqaffinity = 3

3.If you want the machine to have high computing power performance, the parameters in the grub file need to be modified to isolcpus = 1 nohz_full = 1 rcu_nocbs = 1 irqaffinity = 0,2,3


4.For the machine to have balanced performance, the parameters in the grub file need to be modified to isolcpus = 0,1 nohz_full = 0,1 rcu_nocbs = 0,1 irqaffinity = 2,3


5.After the file is modified, enter the command at the end point to update the grub file

sudo update-grub

6.After the above steps are completed, you need to power off the Gongzhi machine and restart it to take effect.

7.After the machine is powered off and restarted, check if it is effective. You can log in to the Gongzhi machine and enter the following command to check if it is the changed value

cat /proc/cmdline


SX21xx series

1.View machine grub file real-time core is 0,1, non-real-time core is 0,2,3 (isolcpus: the value here is the real-time core to be isolated irqaffinity: the value here is the non-real-time core)

2.For high real-time performance, the parameters in the grub file need to be modified to isolcpus = 0,1,2 nohz_full = 0,1,2 rcu_nocbs = 0,1,2 irqaffinity = 3


3.If you want the machine to have high computing power performance, the parameters in the grub file need to be modified to isolcpus = 1 nohz_full = 1 rcu_nocbs = 1 irqaffinity = 0,2,3


4.For the machine to have balanced performance, the parameters in the grub file need to be modified to isolcpus = 0,1 nohz_full = 0,1 rcu_nocbs = 0,1 irqaffinity = 2,3


5.After the file is modified, enter the command at the end point to update the grub file

sudo update-grub

6.After the above steps are completed, you need to power off the Gongzhi machine and restart it to take effect.

7.After the machine is powered off and restarted, check if it is effective. You can log in to the Gongzhi machine and enter the following command to check if it is the changed value

cat /proc/cmdline

 


SP7000Se series

1.View machine grub file real-time core is 0,1, non-real-time core is 0,2,3 (isolcpus: the value here is the real-time core to be isolated irqaffinity: the value here is the non-real-time core)
 

2.For high real-time performance, the parameters in the grub file need to be modified to isolcpus = 0,1,2 nohz_full = 0,1,2 rcu_nocbs = 0,1,2 irqaffinity = 3


3.For the machine to have balanced performance, the parameters in the grub file need to be modified to isolcpus = 0,1 nohz_full = 0,1 rcu_nocbs = 0,1 irqaffinity = 2,3


4.After the file is modified, enter the command at the end point to update the grub file

sudo update-grub

5.After the above steps are completed, you need to power off the Gongzhi machine and restart it to take effect.


6.After the machine is powered off and restarted, check if it is effective. You can log in to the Gongzhi machine and enter the following command to check if it is the changed value

cat /proc/cmdline

 


SP70X0H series

1.View machine grub file real-time core is 0,1, non-real-time core is 2,3,4,5 (isolcpus: the value here is the real-time core to be isolated irqaffinity: the value here is the non-real-time core)

2.For high real-time performance, the parameters in the grub file need to be modified to isolcpus = 0,1,2 nohz_full = 0,1,2 rcu_nocbs = 0,1,2 irqaffinity = 3,4,5


3.For the machine to have balanced performance, the parameters in the grub file need to be modified to isolcpus = 0,1 nohz_full = 0,1 rcu_nocbs = 0,1 irqaffinity = 2,3,4,5


4.After the file is modified, enter the command at the end point to update the grub file

sudo update-grub

5.After the above steps are completed, you need to power off the Gongzhi machine and restart it to take effect.


6.After the machine is powered off and restarted, check if it is effective. You can log in to the Gongzhi machine and enter the following command to check if it is the changed value

cat /proc/cmdline

Last modified: 2024-11-14