Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Start a process on a specific core/CPU? [closed]

Tags:

linux

Is there a way to specify that an application run on a specific core on linux? Like for example:

firefox core0

Or something that'd function that way conceptually?

like image 650
Corbin Lewis Avatar asked Sep 13 '25 22:09

Corbin Lewis


2 Answers

Make use of taskset from util-linux

cpuset also seems to be working. I'm not too familiar with it though. cpuset

like image 193
aaaaahhhhh Avatar answered Sep 15 '25 10:09

aaaaahhhhh


Using taskset, which is a part of util-linux package you can do this. For details check here

Using taskset you can assign a running process to particular CPU core. For example, to assign a process to CPU core 0 and 4, do the following.

taskset -p 0x11 <pid>
like image 24
hashbrown Avatar answered Sep 15 '25 11:09

hashbrown