DOC: rls1908 static content
[csit.git] / docs / report / introduction / methodology_trex_traffic_generator.rst
1 TRex Traffic Generator
2 ----------------------
3
4 Usage
5 ~~~~~
6
7 `TRex traffic generator <https://wiki.fd.io/view/TRex>`_ is used for all
8 CSIT performance tests. TRex stateless mode is used to measure NDR and
9 PDR throughputs using MLRsearch and to measure maximum transer rate
10 in MRR tests.
11
12 TRex is installed and run on the TG compute node. The typical procedure
13 is:
14
15 - If the TRex is not already installed on TG, it is installed in the
16   suite setup phase - see `TRex intallation`_.
17 - TRex configuration is set in its configuration file
18   ::
19
20   /etc/trex_cfg.yaml
21
22 - TRex is started in the background mode
23   ::
24
25   $ sh -c 'cd <t-rex-install-dir>/scripts/ && sudo nohup ./t-rex-64 -i -c 7  > /tmp/trex.log 2>&1 &' > /dev/null
26
27 - There are traffic streams dynamically prepared for each test, based on traffic
28   profiles. The traffic is sent and the statistics obtained using
29   :command:`trex.stl.api.STLClient`.
30
31 Measuring Packet Loss
32 ~~~~~~~~~~~~~~~~~~~~~
33
34 Following sequence is followed to measure packet loss:
35
36 - Create an instance of STLClient.
37 - Connect to the client.
38 - Add all streams.
39 - Clear statistics.
40 - Send the traffic for defined time.
41 - Get the statistics.
42
43 If there is a warm-up phase required, the traffic is sent also before
44 test and the statistics are ignored.
45
46 Measuring Latency
47 ~~~~~~~~~~~~~~~~~
48
49 If measurement of latency is requested, two more packet streams are
50 created (one for each direction) with TRex flow_stats parameter set to
51 STLFlowLatencyStats. In that case, returned statistics will also include
52 min/avg/max latency values.