ceph osd跟cpu进行绑定

通过cgroup将ceph-osd进程与某一个 CPU core

绑定脚本:

mkdir -p /sys/fs/cgroup/cpuset/ceph
# cup number : 0,1,2,3 = 0-3
echo 0,4 > /sys/fs/cgroup/cpuset/ceph/cpuset.cpus
# NUMA node
echo 0 > /sys/fs/cgroup/cpuset/ceph/cpuset.mems
osd-pid-list=$(ps aux | grep osd | grep -v grep | awk '{print $2}')
for osd-pid in $(osd-pid-list)
do
    echo $(osd-pid) > /sys/fs/cgroup/cpuset/ceph/cgroup.procs
done

 

posted @ 2019-08-29 10:04  salami_china  阅读(1042)  评论(0编辑  收藏  举报