Computer Engineering and Applications ›› 2013, Vol. 49 ›› Issue (8): 81-84.

Previous Articles     Next Articles

Combination of PF_RING with NAPI packet capture performance optimization and simulation

WANG Ya1, YU Gan2, ZHANG Jun2, WANG Hao1   

  1. 1.School of Computer and Information, Fuyang Teachers College, Fuyang, Anhui 236037, China
    2.College of Information Engineering, Fuyang Teachers College, Fuyang, Anhui 236041, China
  • Online:2013-04-15 Published:2013-04-15

PF_RING与NAPI结合的捕包性能优化和仿真

王  亚1,于  干2,张  军2,王  浩1   

  1. 1.阜阳师范学院 计算机与信息学院,安徽 阜阳 236037
    2.阜阳师范学院 信息工程学院,安徽 阜阳 236041

Abstract: Frequent interrupt response, redundant data copying and context switching are major factors of impacting network packet capture performance. In order to reduce the impact of these factors, this paper proposes the combination of PF_RING with NAPI. And it is applied to the packet capture process, to overall optimizing the performance. It compares the differences between PF_RING and traditional packet capture mechanism. It analyses the advantages of combination of PF_RING with NAPI. It builds the experimental platform, sending packet in kernel and experimental simulation. In the simulation, it compares with traditional method from the packet capture ratio and processing efficiency. The experiment data shows that the combination of PF_RING with NAPI can effectively improve network packet capture performance.

Key words: zero-copy, packet capture, memory mapping, circular buffer, New Application Program Interface(NAPI), PF_RING

摘要: 频繁中断响应、冗余的数据拷贝和上下文切换等是影响网络数据包捕获性能的主要因素。为了减少这些因素的影响,提出将PF_RING与NAPI结合应用到捕包过程,以对性能进行整体优化。比较了PF_RING与传统数据包捕获机制的差异,分析了两者结合的优势,搭建实验平台,采用内核发包形式,进行实验仿真。在仿真实验中,从捕包率和处理效率与传统方式进行比较,分析实验数据得出该方法可以有效地提高捕包性能。

关键词: 零拷贝, 数据包捕获, 内存映射, 环状缓冲区, 设备轮询, PF_RING