# Low RX/TX Latency with DNA | ntop

[Blog](https://www.ntop.org/blog/)[ZC](https://www.ntop.org/category/zc/)

# Low RX/TX Latency with DNA

September 15, 20113 min read

One of the great consequences of the DNA design, is that user-space applications can now transmit and receive packets without going through the kernel TCP/IP stack at all. This can be profitably used to reduce network latency bypassing the stack, and reading the number of user-space stacks that have been developed in the past years (e.g. [OpenOnload](http://www.openonload.org/)) it seems that low-latency is becoming increasingly important these days. In particular there are specific markets such as finance and trading, where all the operators need to have the same chance to trade and thus minor (for the rest of us) details such as fibre length (that has to be equal for all operators) are very important.

Before speaking of latency, let’s consider a simple test scenario where a traffic generator sends minimal size packets to a bounce server that as soon as it receives the packet, sends it back to the sender unmodified. The servers are Linux based, use a 10 Gbit Intel-based 82599 NIC and are connected using optical fibre.

[![](/images/2011/09/LatencyTest.webp)](https://www.ntop.org/images/2011/09/LatencyTest.webp)

The latency is measured using a NIC with hardware timestamps. The bounce server is implemented using [pfdnabounce](https://github.com/ntop/PF_RING) (part of the PF\_RING example code) started as pfdnabounce -i dna:ethX -a  where ethX is the bounce interface on which the probe packet is received and sent back to the sender.

Let’s now understand some basic concepts. Suppose we use 64 bytes probe packets without VLAN (14 bytes of header, 4 bytes of CRC and 46 bytes of payload in the middle). To this we need to add  inter-packet gap (12 bytes) and preamble (8 bytes). In total we have 14+4+46+12+8 = 84 bytes that boil down to 84 x 8 = 672 bits. At 10 Gbit the time to serialize those bits take 67.2 nsec. Doing that twice in a round trip with zero cable length (i.e., equipment loopback) would be 2 x 67.2 = 134.4 nsec. This is the theoretical minimum latency that you can expect for the shortest packet on the wire. Add the length of your cable to that by taking into account the speed of light in fibre, if your cable is longer than a few metres. So the minimum round-trip latency would be ~0.13 usec. Similarly, the longest standard packet is 1518 bytes plus preamble plus inter packet gap, and in this case the minimum theoretical latency is ~2.5 usec. This is the minimal amount of time needed only for moving data back and forth. On top of these minima, we need to add processing layers (including the 10 Gbit controller/MAC, packet polling, memory latency, packet transmission, data copy between RX and TX memory areas) that add consistent latency to those numbers.

With DNA using small probe packets, we have measured a round-trip latency of < 5 usec. We believe that these numbers are very good considered that:

-   the 82599 chipset is used in commodity adapters, and it does not feature (nor pretend to have) any hardware acceleration for low-latency.
-   DNA reduces latency to the minimum as the user-space application we used in our tests (pfdnabounce) speaks directly with the NIC, completely bypassing the stack.
-   [Googling](http://www.google.it/search?q=low+latency+ethernet+trading) what specialized companies offer in term of latency, DNA is definitively on track with the state of the art.

If you want to know more about measuring 10 Gbit latencies at 10 Gbit, you should probably read the paper [Exact Temporal Characterization of 10 Gbps Optical Wide-Area Network](http://conferences.sigcomm.org/imc/2010/papers/p342.pdf). Many thanks to [Alif](http://au.linkedin.com/in/alifwahid) and Charles for their help understanding and measuring DNA network latency.

## Keep reading

PF\_RINGAug 24, 2020

### [Introducing PF\_RING ZC support for Intel E810-based 100G adapters](https://www.ntop.org/introducing-pf_ring-zc-support-for-intel-e810-based-100g-adapters/)

Last year Intel announced a new family of 100 Gigabit network adapters, code-name Columbiaville. These new adapters, based on the new Intel Ethernet Controller E810, support 10/25/50/100 Gbps link speeds and provide…

PF\_RINGMay 14, 2016

### [Commoditizing 10/25/40/100 Gbit with PF\_RING ZC on Intel FM10K](https://www.ntop.org/commoditizing-102540100-gbit-with-pf_ring-zc-on-intel-fm10k/)

As you know we’re working at 100 Gbit for a while, not just in terms of network speed, but also in terms of redesigning existing applications for being more efficient and powerful…

PF\_RINGFeb 10, 2016

### [Best practices for using Bro IDS with PF\_RING ZC. Reliably.](https://www.ntop.org/best-practices-for-using-bro_ids-with-pf_ring-zc-reliably/)

Zero copy technologies such as PF\_RING ZC allow applications to read packets in memory without any actor involved, being it the kernel or a memory copy. This is the reason why using…

## Try it on your own network

Download the free Community edition and see your first flows in five minutes.

[Download ntopng free](https://www.ntop.org/support/documentation/software-installation/)[Talk to an engineer](https://www.ntop.org/support/need-help/contacts/)
Source: https://www.ntop.org/low-latency-rxtx-with-dna/