摘要
在传统的数据包捕获系统中,数据在内存中的拷贝花费了巨大的开销,严重影响了捕包系统的性能。文中根据零拷贝的思想,实现了一种基于RTL8169千兆网卡的高性能数据捕获平台,使得数据报文到达网络接口后,直接以DMA的方式存储到应用程序可以访问的地址空间,从而避免了其在内存中的拷贝,节省了CPU的开销。测试结果表明,当捕获的数据包为大数据包时,本捕获平台的最高捕获率达到了895M,几近发挥了网卡的最大性能,而且对小数据包的捕获率也得到了大幅提升。
In traditional data capture system,the date's copy in the memory spents huge expenses,which seriously affects the system's performance.Based on the idea of zero copy,it establishes a high-performance data capture platform,which makes the data can be directly stored by DMA to the address space where application programmes are able to access.As a result,it avoids the copy in memory and saves the cost of CPU.The test results show that the highest capture rate of this platform has reached 895M when the capture data packet is big,the performance of the net card has been almost maximized,and the capture rate for small-data capture has also been dramatically increased.
出处
《计算机技术与发展》
2011年第8期22-25,29,共5页
Computer Technology and Development
基金
国家自然科学基金重点项目(60833002)
中央高校基本科研业务费专项资金(2011JBM016)