feat(Docs): Update few sections
[csit.git] / docs / report / introduction / methodology_per_thread_resources.rst
1 .. _per_thread_resources_methodology:
2
3 Per Thread Resources
4 --------------------
5
6 CSIT test framework is managing mapping of the following resources per
7 thread:
8
9 #. Cores, physical cores (pcores) allocated as pairs of sibling logical cores
10    (lcores) if server in HyperThreading/SMT mode, or as single lcores
11    if server not in HyperThreading/SMT mode. Note that if server's
12    processors are running in HyperThreading/SMT mode sibling lcores are
13    always used.
14 #. Receive Queues (RxQ), packet receive queues allocated on each
15    physical and logical interface tested.
16 #. Transmit Queues(TxQ), packet transmit queues allocated on each
17    physical and logical interface tested.
18
19 Approach to mapping per thread resources depends on the application/DUT
20 tested (VPP or DPDK apps) and associated thread types, as follows:
21
22 #. Data-plane workers, used for data-plane packet processing, when no
23    feature workers present.
24
25    - Cores: data-plane workers are typically tested in 1, 2 and 4 pcore
26      configurations, running on single lcore per pcore or on sibling
27      lcores per pcore. Result is a set of {T}t{C}c thread-core
28      configurations, where{T} stands for a total number of threads
29      (lcores), and {C} for a total number of pcores. Tested
30      configurations are encoded in CSIT test case names,
31      e.g. "1c", "2c", "4c", and test tags "2T1C"(or "1T1C"), "4T2C"
32      (or "2T2C"), "8T4C" (or "4T4C").
33    - Interface Receive Queues (RxQ): as of CSIT-2106 release, number of
34      RxQs used on each physical or virtual interface is equal to the
35      number of data-plane workers. In other words each worker has a
36      dedicated RxQ on each interface tested. This ensures packet
37      processing load to be equal for each worker, subject to RSS flow
38      load balancing efficacy. Note: Before CSIT-2106 total number of
39      RxQs across all interfaces of specific type was equal to the
40      number of data-plane workers.
41    - Interface Transmit Queues (TxQ): number of TxQs used on each
42      physical or virtual interface is equal to the number of data-plane
43      workers. In other words each worker has a dedicated TxQ on each
44      interface tested.
45    - Applies to VPP and DPDK Testpmd and L3Fwd.
46
47 #. Data-plane and feature workers (e.g. IPsec async crypto workers), the
48    latter dedicated to specific feature processing.
49
50    - Cores: data-plane and feature workers are tested in 2, 3 and 4
51      pcore configurations, running on single lcore per pcore or on
52      sibling lcores per pcore. This results in a two sets of
53      thread-core combinations separated by "-", {T}t{C}c-{T}t{C}c, with
54      the leading set denoting total number of threads (lcores) and
55      pcores used for data-plane workers, and the trailing set denoting
56      total number of lcores and pcores used for feature workers.
57      Accordingly, tested configurations are encoded in CSIT test case
58      names, e.g. "1c-1c", "1c-2c", "1c-3c", and test tags "2T1C_2T1C"
59      (or "1T1C_1T1C"), "2T1C_4T2C"(or "1T1C_2T2C"), "2T1C_6T3C"
60      (or "1T1C_3T3C").
61    - RxQ and TxQ: no RxQs and no TxQs are used by feature workers.
62    - Applies to VPP only.
63
64 #. Management/main worker, control plane and management.
65
66    - Cores: single lcore.
67    - RxQ: not used (VPP default behaviour).
68    - TxQ: single TxQ per interface, allocated but not used
69      (VPP default behaviour).
70    - Applies to VPP only.
71
72 VPP Thread Configuration
73 ~~~~~~~~~~~~~~~~~~~~~~~~
74
75 Mapping of cores and RxQs to VPP data-plane worker threads is done in
76 the VPP startup.conf during test suite setup:
77
78 #. `corelist-workers <list_of_cores>`: List of logical cores to run VPP
79    data-plane workers and feature workers. The actual lcores'
80    allocations depends on HyperThreading/SMT server configuration and
81    per test core configuration.
82
83    - For tests without feature workers, by default, all CPU cores
84      configured in startup.conf are used for data-plane workers.
85    - For tests with feature workers, CSIT code distributes lcores across
86      data-plane and feature workers.
87
88 #. `num-rx-queues <value>`: Number of Rx queues used per interface.
89
90 Mapping of TxQs to VPP data-plane worker threads uses the default VPP
91 setting of one TxQ per interface per data-plane worker.
92
93 DPDK Thread Configuration
94 ~~~~~~~~~~~~~~~~~~~~~~~~~
95
96 Mapping of cores and RxQs to DPDK Testpmd/L3Fwd data-plane worker
97 threads is done in the startup CLI:
98
99 #. `-l <list_of_cores>` - List of logical cores to run DPDK
100    application.
101 #. `nb-cores=<N>` - Number of forwarding cores.
102 #. `rxq=<N>` - Number of Rx queues used per interface.