fastos / fastsocket

Fastsocket is a highly scalable socket and its underlying networking implementation of Linux kernel. With the straight linear scalability, Fastsocket can provide extremely good performance in multicore machines. In addition, it is very easy to use and maintain. As a result, it has been deployed in the production environment of SINA.
GNU General Public License v2.0
3.76k stars 727 forks source link

RPS开启的时候,是否也开启RFS比较好,设置rps_flow_cnt和rps_sock_flow_entries #48

Open raintears2 opened 9 years ago

raintears2 commented 9 years ago

这2项默认都是0,脚本没有设置

cat /sys/class/net/eth0/queues/rx-0/rps_flow_cnt 0

sysctl -a|grep net.core.rps_sock_flow_entries net.core.rps_sock_flow_entries = 0

还有就是判断开启rps条件

if [[ ! $HW_QUEUES == $CORES ]]; then

改成

if [[ $HW_QUEUES -lt $CORES ]]; then

是否更恰当?

gfreewind commented 9 years ago

RPS是为了软中断均衡,RFS是为了提高cache命中率,这个其实就是fastsocket要解决的。

个人认为使用Fastsocket时,关闭这两个为好。

你可以发个pull request看看