减少网卡中断收包产生的CPU消耗
2015-12-30 15:29
281 查看
目标:减少网卡中断收包产生的CPU消耗。
优化的措施:
1, 减少收包的队列数:igb.RSS
2, 减少中断调用的次数:rx-usecs
Some useful tips:
1, IGB driver requires the following parameter
igb.RSS
which demonstrates the number of Receive-Side Scaling (RSS)descriptor queues,in the case, it reduces from 8 to 5 which means enable 5 queues。
2, rx-usecs
The parameterto modify are called interrupt coalescing parameters, It is the number of usecs to wait beforeraising an RX interrupt after a packet has been received, when rx-usesc is setto 0 rx-frames is used.
You may wish toreduce rx-usecs if latency is more important and you are using a low-latencyswitch or a point-to-point connection. Similarly, you may wish to increaserx-usecs if you are interested in reducing CPU overhead for large transfers.Note that rx-usecs
controls both transmit and receive coalescing, In the case,it increases from 3 to 450.
How to view and edit it? You may use following tool:
ethtool –C eth1
to see the current size, and then use :
ethtool –C eth1 rx-usecs 450
to set the new value 450.
Valid range for rx-usecs are: 0,1,3, 10-8191
Specific meaning for each value as follows:
1, 0= off, real-time interruption, one package one interrupt, the lowest delay
2, 1=dynamic,which rangefor interrupts is 4000-70000
3, 3=dynamicconservative(default),which range for interrupts is 4000-20000
4,10-8191,how many microseconds every interruption will occurs. For example,you may wish to control the number of interrupt in every second less than 1000 , then setrx-usecs to 1000000/1000=1000 microseconds, if less than 2000, then set it to1000000/2000=500
Since package is not processed in real time, side effect isadding some delays, such as, setting 500 microseconds for every interrupt meansmax delay is 500 microseconds and mean delay is about 250 microseconds.
优化的措施:
1, 减少收包的队列数:igb.RSS
2, 减少中断调用的次数:rx-usecs
Some useful tips:
1, IGB driver requires the following parameter
igb.RSS
which demonstrates the number of Receive-Side Scaling (RSS)descriptor queues,in the case, it reduces from 8 to 5 which means enable 5 queues。
2, rx-usecs
The parameterto modify are called interrupt coalescing parameters, It is the number of usecs to wait beforeraising an RX interrupt after a packet has been received, when rx-usesc is setto 0 rx-frames is used.
You may wish toreduce rx-usecs if latency is more important and you are using a low-latencyswitch or a point-to-point connection. Similarly, you may wish to increaserx-usecs if you are interested in reducing CPU overhead for large transfers.Note that rx-usecs
controls both transmit and receive coalescing, In the case,it increases from 3 to 450.
How to view and edit it? You may use following tool:
ethtool –C eth1
to see the current size, and then use :
ethtool –C eth1 rx-usecs 450
to set the new value 450.
Valid range for rx-usecs are: 0,1,3, 10-8191
Specific meaning for each value as follows:
1, 0= off, real-time interruption, one package one interrupt, the lowest delay
2, 1=dynamic,which rangefor interrupts is 4000-70000
3, 3=dynamicconservative(default),which range for interrupts is 4000-20000
4,10-8191,how many microseconds every interruption will occurs. For example,you may wish to control the number of interrupt in every second less than 1000 , then setrx-usecs to 1000000/1000=1000 microseconds, if less than 2000, then set it to1000000/2000=500
Since package is not processed in real time, side effect isadding some delays, such as, setting 500 microseconds for every interrupt meansmax delay is 500 microseconds and mean delay is about 250 microseconds.
相关文章推荐
- Android编程获取系统隐藏服务实现锁屏的方法
- Django-blog开源
- 通过ViewController的关键流程来理解流程建模
- 2015.12.30
- 动态链接库与静态链接库区别
- 实验四主存空间的分配和回收
- shell获取目录下最新的文件,文件是以日期命名
- Android HttpURLConnection Post 参数 (https)
- Scala 抽象类型Type
- java在linux系统中获取网关
- mysql客户端操作 简数据库建立
- 软件测试过程模型-前置测试模型
- 点九图
- iOS 长按手势
- Runtime类中的freeMemory,totalMemory,maxMemory区别
- C++小题(六)
- mysql-MySql优化的一般步骤
- C# 货币金额中文(英文)大写转换方法-工具类
- easyui datagrid 批量编辑和提交数据
- Cr 4000 owdStrike为什么从Scala迁移到Go