This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Last revision Both sides next revision | ||
nfv-kvm-test [2015/11/24 01:00] Liang Li |
nfv-kvm-test [2016/01/04 06:17] Chao Peng [Kernel Parameter] |
||
---|---|---|---|
Line 126: | Line 126: | ||
==== Kernel Parameter ==== | ==== Kernel Parameter ==== | ||
- | Several kernel parameters are important to achieve real performance for the VNF. | ||
- | 1. Setup the isolated CPUs | + | __Kernel configuration__: kernel/arch/x86/configs/opnfv.config. |
- | Isolated CPUs make sure the kernel will not schedule process to the specified isolated CPUs unless requested explicitly. Please refer to http://lxr.free-electrons.com/source/Documentation/kernel-parameters.txt#L1608 for more information. Normally, the physical CPUs planned to host the VNF should be marked as isolated CPUs. | + | |
- | 2. Setup the NOHZ_FULL | + | __Host kernel boot line example__: isolcpus=11-15,31-35 nohz_full=11-15,31-35 rcu_nocbs=11-15,31-35 iommu=pt intel_iommu=on default_hugepagesz=1G hugepagesz=1G mce=off idle=poll intel_pstate=disable processor.max_cstate=1 pcie_asmp=off tsc=reliable |
- | NOHZ_FULL is meaningful to reduce the jitter caused by host to the VNF. With NOHZ_FULL, the physical CPU will trigger much less tick timer interrupt (currently, 1 tick per second). This will reduce the impact to the VNF, because each host timer interrupt will trigger VM exit from guest to host and cause performance/latency impact. | + | |
- | 3. Setup the RCU_NOCB | + | __Guest kernel boot line example__: isolcpus=1 nohz_full=1 rcu_nocbs=1 mce=off idle=poll default_hugepagesz=1G hugepagesz=1G |
- | RCU is a kernel synchronization mechanism. Refer to http://lxr.free-electrons.com/source/Documentation/RCU/whatisRCU.txt for more information. With RCU_NOCB, the impact from RCU to the VNF will be reduced a lot. | + | |
- | 4. Mark the tsc as reliable | + | Please refer to [[nfv-kvm-tuning]] for more explanation. |
- | Please notice that this is a little bit hacky while we are providing a cleaner solution. A TSC clock source that is thought as unreliable will cause kernel to continuous to enable clock source watchdog to check if TSC frequency is still correct. On latest Intel platform with Constant TSC/Invariant TSC/Synchronized TSC, the TSC is reliable already. We are on the process to submit a patch to the kernel. | + | |
==== Run-time Environment Setup ==== | ==== Run-time Environment Setup ==== |