Linux Fedora 14 (kernel 2.6.35.6) Pf_ring+libpcap Fast capture Gigabit network packet, no packet loss

Source: Internet
Author: User
Tags cpu usage

in front of the Libpcap capture packet, especially in the gigabit network conditions, a large number of drops, online search for a long time, probably all Pf_packet +mmap,napi,pf_ring and other methods, I pf_ring+libpcap experiment, The detection of gigabit network conditions, capturing the performance of the packet is very good, almost no packet loss, the experimental environment with the following process:

1) Download PF_RING:SVN Co https://svn.ntop.org/svn/ntop/trunk/PF_RING/

2) After downloading, make compile pf_ring under Pf_ring/kernel, generate Pf_ring.ko

3) insmod Pf_ring.ko Thansparent_mode =1

4) CD into the Lib directory, modify the makefile, the installation directory point to usr/, if not modified, will point to/usr/local

5) In the Lib directory, make, then make install

6) CD into the libpcap-1.1.1-ring directory, modify the source code, the pf_ring core ring buffer set to 2M, the default 0.5M, and then modify the makefile, the installation directory to usr/, the default point to Usr/local. Then compile make and make install;

7) In this way, the libpfring.so, pfring_e1000e_dna.h,pfring.h,libpfring.a copied to the Usr/include or usr/lib, at the same time with The libpcap-1.1.1-ring library file replaces the original Libpcap library file;

8) The environment is finished, the application remembers to add # define have_pf_ring to the application's header file;

9) You will find that performance has been greatly improved and improved by more than 60%. But CPU usage also increases correspondingly, CPU utilization is used in the terminal to use Top view.

Above excerpt from: http://blog.csdn.net/smilestone_322/article/details/6281395

Linux Fedora 14 (kernel 2.6.35.6) Pf_ring+libpcap Fast capture Gigabit network packet, no packet loss

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.