当前位置:   article > 正文

块设备IO完成软中断平衡参数(rq_affinity)的意义

rq_affinity

rq_affinity, 块设备IO完成软中断的平衡

By default this value is set to 1, which means that once an I/O request has been completed by the block device, it will be sent back to the "group" of CPUs that the request came from. This can sometimes help to improve CPU performance due to caching on the CPU, which requires less cycles. If this value is set to 2, the block device will sent the completed request back to the actual CPU that requested it, not to the general group. If you have a beefy CPU and really want to utilize ALL THE CORES and spread the load around as much as possible then a value of 2 might provide better results. 

echo 2 > /sys/block/sda/queue/rq_affinity

To make this a permanent change we will add it to /etc/rc.local

vim /etc/rc.local

##Add this above "exit 0"##

echo 0 > /sys/block/sda/queue/add_random

echo 0 > /sys/block/sda/queue/rotational

echo 2 > /sys/block/sda/queue/rq_affinit

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/凡人多烦事01/article/detail/503911
推荐阅读
相关标签
  

闽ICP备14008679号