Brief description of network packet capture technology based on zero copy

Source: Internet
Author: User

The so-called zero copy means that there will be no inter-memory copy during the packet sending and receiving process of a node. When the packet is sent, the user buffer of the application will directly go through the network interface to reach the external network, when receiving, the network interface directly sends data packets to the user buffer. This is "true zero copy )".

1. As shown in the zero copy workflow, the upper part of the image is the traditional packet capture module, and the lower part is the packet capture module using the zero copy technology. The zero copy technology enables a shared memory for the network adapter and the user zone through the operating system. The data received by the network adapter is written into the shared memory, the receiving ring and sending ring exist in this memory area. The receiving ring stores the data received from the NIC, And the sending ring stores the user data to be sent through the NIC. Because the memory is shared by the nic and the user zone, the user program can directly access and operate the data as long as the NIC receives the data. Similarly, as long as the user area program has network data to send, it can be directly sent by the NIC program. This reduces unnecessary system data calls, reduces interruptions, and enables the CPU to have more time to handle other tasks.

With high performance, the Libpcap packet capture module is compared with the zero copy technology. The following table shows the performance comparison diagram. The network adapter is an Intel 845 gigabit optical fiber network card.

Packages are more than five times the traditional libpcap system. This technology greatly improves the system's data processing capability, so that the CPU can have more valuable time to process other advanced applications.

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.