Update doc/faq and config comments
[nfvbench.git] / docs / development / design / ndrpdr.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International
2 .. License.
3 .. http://creativecommons.org/licenses/by/4.0
4 .. (c) Cisco Systems, Inc
5
6 NDR/PDR Binary Search
7 =====================
8
9 Algorithm Outline
10 -----------------
11
12 The ServiceChain class is responsible for calculating the NDR/PDR for all frame sizes requested in the configuration.
13 Calculation for 1 frame size is delegated to the TrafficClient class.
14
15 Call chain for calculating the NDR-PDR for a list of frame sizes:
16
17 - ServiceChain.run()
18     - ServiceChain._get_chain_results()
19         - for every frame size:
20             - ServiceChain.__get_result_per_frame_size()
21                 - TrafficClient.get_ndr_pdr()
22                     - TrafficClient.__range_search() recursive binary search
23
24 The search range is delimited by a left and right rate (expressed as a % of line rate per direction).
25
26 The load_epsilon configuration parameter defines the accuracy of the result as a % of line rate.
27 The default value of 0.1 indicates for example that the measured NDR and PDR are within 0.1% of line rate of the
28 actual NDR/PDR (e.g. 0.1% of 10Gbps is 10Mbps). It also determines how small the search range must be in the binary search.
29
30 The recursion narrows down the range by half and stops when:
31 - the range is smaller than the configured load_epsilon value
32 - or when the search hits 100% or 0% of line rate
33
34