linux cpuset

来源:互联网 发布:飞利浦电动牙刷 知乎 编辑:程序博客网 时间:2024/06/06 03:39

转载自:点击打开链接

Linux provides cpusets, which allow CPUs to be grouped and processes assigned to them. This can improve performance similarly to process binding, but performance can be improved further by making the cpuset exclusive—preventing other processes from using it. The trade-off is a reduction in available CPU for the rest of the system.

The following commented example creates an exclusive set:



mkdir /dev/cpuset
mount -t cpuset cpuset /dev/cpuset
cd /dev/cpuset
mkdir prodset             # create a cpuset called "prodset"
cd prodset
echo 7-10 > cpus          # assign CPUs 7-10
echo 1 > cpu_exclusive    # make prodset exclusive
echo 1159 > tasks         # assign PID 1159 to prodset




0 0
原创粉丝点击