OPNFV KVM4NFV: Documentation Enhancement
[kvmfornfv.git] / docs / userguide / low_latency.userguide.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2
3 .. http://creativecommons.org/licenses/by/4.0
4
5 Low Latency Environment
6 =======================
7
8 Achieving low latency with the KVM4NFV project requires setting up a special
9 test environment. This environment includes the BIOS settings, kernel
10 configuration, kernel parameters and the run-time environment.
11
12 Hardware Environment Description
13 --------------------------------
14
15 BIOS setup plays an important role in achieving real-time latency. A collection
16 of relevant settings, used on the platform where the baseline performance data
17 was collected, is detailed below:
18
19 CPU Features
20 ~~~~~~~~~~~~
21
22 Some special CPU features like TSC-deadline timer, invariant TSC and Process
23 posted interrupts, etc, are helpful for latency reduction.
24
25 CPU Topology
26 ~~~~~~~~~~~~
27
28 NUMA topology is also important for latency reduction.
29
30 BIOS Setup
31 ~~~~~~~~~~
32
33 Careful BIOS setup is important in achieving real time latency. Different
34 platforms have different BIOS setups, below are the important BIOS settings on
35 the platform used to collect the baseline performance data.
36
37 Software Environment Setup
38 --------------------------
39 Both the host and the guest environment need to be configured properly to
40 reduce latency variations.  Below are some suggested kernel configurations.
41 The ci/envs/ directory gives detailed implementation on how to setup the
42 environment.
43
44 Kernel Parameter
45 ~~~~~~~~~~~~~~~~
46
47 Please check the default kernel configuration in the source code at:
48 kernel/arch/x86/configs/opnfv.config.
49
50 Below is host kernel boot line example:
51 ::
52 isolcpus=11-15,31-35 nohz_full=11-15,31-35 rcu_nocbs=11-15,31-35
53 iommu=pt intel_iommu=on default_hugepagesz=1G hugepagesz=1G mce=off idle=poll
54 intel_pstate=disable processor.max_cstate=1 pcie_asmp=off tsc=reliable
55
56 Below is guest kernel boot line example
57 ::
58 isolcpus=1 nohz_full=1 rcu_nocbs=1 mce=off idle=poll default_hugepagesz=1G
59 hugepagesz=1G
60
61 Please refer to `tuning.userguide` for more explanation.
62
63 Run-time Environment Setup
64 ~~~~~~~~~~~~~~~~~~~~~~~~~~
65
66 Not only are special kernel parameters needed but a special run-time
67 environment is also required. Please refer to `tunning.userguide` for
68 more explanation.