网络数据捕获之PF_RING

浏览:
字体:
发布时间:2013-12-10 00:00:14
来源:
该捕获方案采用在内核层开出一个比较大的环形缓冲,然后应用层通过mmap映射到内核的缓冲空间,从增加底层缓存到减少
应用层系统调用等方面做了优化,数据捕获性能有了质的提高,而且其从驱动到应用层的接口库都是开源的,例子程序也很全。
 
官方的测试结果:
 
1 Gigabit tests performed using a Core2Duo 1.86 GHz, Ubuntu Server 9.10 (kernel 2.6.31-14), and an IXIA 400 traffic generator injecting traffic at wire rate (64 byte packets, 1.48 Mpps):
e1000e
Application transparent_mode=0 transparent_mode=1 transparent_mode=2
pfcount (with -a flag) 757 Kpps 795 Kpps 843 Kpps
pfcount (without -a flag) 661 Kpps 700 Kpps 762 Kpps
pcount (with PF_RING-aware libpcap) 730 Kpps 763 Kpps 830 Kpps
pcount (with vanilla libpcap) 544 Kpps
pfcount (with PF_RING DNA) 1’170 Kpps
igb
Application transparent_mode=0 transparent_mode=1 transparent_mode=2
pfcount (with -a flag) 650 Kpps 686 Kpps 761 Kpps
pfcount (without -a flag) 586 Kpps 613 Kpps 672 Kpps
pcount (with PF_RING-aware libpcap) 613 Kpps 644 Kpps 711 Kpps
pcount (with vanilla libpcap) 544 Kpps
pfcount (with PF_RING DNA)
 
 
e1000e/igb分别为intel的两款网卡驱动,transparent_mode为PF_RING驱动加载时的参数。PF_RING效率最高的是DNA (Direct NIC Access)模式,
但是该模式代码并未全部开源,而且使用有限制。
 
本人亲测在Atom D525上,intel 82574网卡芯片,1400Byte大包可以达到960Mbps满速率,24小时没有任何丢包。而且CPU使用率仅为10左右。
但是官方的提供的PF_RING 5.2.3版本及以下存在一个bug,长时间运行会出现丢包问题,特别是在Atom系列这样性能比较弱的处理器上比较明显,
属于软件bug,而非框架性能瓶颈。
>更多相关文章
24小时热门资讯
24小时回复排行
资讯 | QQ | 安全 | 编程 | 数据库 | 系统 | 网络 | 考试 | 站长 | 关于东联 | 安全雇佣 | 搞笑视频大全 | 微信学院 | 视频课程 |
关于我们 | 联系我们 | 广告服务 | 免责申明 | 作品发布 | 网站地图 | 官方微博 | 技术培训
Copyright © 2007 - 2024 Vm888.Com. All Rights Reserved
粤公网安备 44060402001498号 粤ICP备19097316号 请遵循相关法律法规
');})();