feat(docs): Add Methodology
[csit.git] / docs / content / methodology / packet_latency.md
1 ---
2 bookToc: false
3 title: "Packet Latency"
4 weight: 8
5 ---
6
7 # Packet Latency
8
9 TRex Traffic Generator (TG) is used for measuring one-way latency in
10 2-Node and 3-Node physical testbed topologies. TRex integrates
11 [High Dynamic Range Histogram (HDRH)](http://hdrhistogram.org/)
12 functionality and reports per packet latency distribution for latency
13 streams sent in parallel to the main load packet streams.
14
15 Following methodology is used:
16
17 - Only NDRPDR test type measures latency and only after NDR and PDR
18   values are determined. Other test types do not involve latency
19   streams.
20 - Latency is measured at different background load packet rates:
21
22   - No-Load: latency streams only.
23   - Low-Load: at 10% PDR.
24   - Mid-Load: at 50% PDR.
25   - High-Load: at 90% PDR.
26
27 - Latency is measured for all tested packet sizes except IMIX due to
28   TRex TG restriction.
29 - TG sends dedicated latency streams, one per direction, each at the
30   rate of 9 kpps at the prescribed packet size; these are sent in
31   addition to the main load streams.
32 - TG reports Min/Avg/Max and HDRH latency values distribution per stream
33   direction, hence two sets of latency values are reported per test case
34   (marked as E-W and W-E).
35 - +/- 1 usec is the measurement accuracy of TRex TG and the data in HDRH
36   latency values distribution is rounded to microseconds.
37 - TRex TG introduces a (background) always-on Tx + Rx latency bias of 4
38   usec on average per direction resulting from TRex software writing and
39   reading packet timestamps on CPU cores. Quoted values are based on TG
40   back-to-back latency measurements.
41 - Latency graphs are not smoothed, each latency value has its own
42   horizontal line across corresponding packet percentiles.
43 - Percentiles are shown on X-axis using a logarithmic scale, so the
44   maximal latency value (ending at 100% percentile) would be in
45   infinity. The graphs are cut at 99.9999% (hover information still
46   lists 100%).