This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
nfv-kvm-tuning [2016/01/04 06:41] Chao Peng [Operating System Configuration] |
nfv-kvm-tuning [2016/01/13 22:46] (current) Jiang, Yunhong [Performance/Latency Tuning] |
||
---|---|---|---|
Line 6: | Line 6: | ||
* Software: Based on Real-Time Linux https://rt.wiki.kernel.org/index.php/Main_Page. | * Software: Based on Real-Time Linux https://rt.wiki.kernel.org/index.php/Main_Page. | ||
- | Please refer to [[nfv-kvm-test|kvmfornfv test]] for details. | + | Please refer to [[nfv-kvm-test]] for details. |
====== Configuration ====== | ====== Configuration ====== | ||
Line 55: | Line 55: | ||
* Make vfio MSI interrupt be non-threaded | * Make vfio MSI interrupt be non-threaded | ||
Threaded irq can help reduce interrupt latency because it avoids locking interrupt too long in interrupt handler. But if the interrupt handler itself does not take much time just like vfio for which the only thing to do is inject the interrupt to guest which can be really fast. In such case threaded irq would cost time to do the context switch between irq thread and interrupt handler. Another point is in NFV scenario such realtime interrupt(like DPDK interrupt) is almost the highest priority, so making such interrupt non-threaded would certainly benefit the highest application. [[https://gerrit.opnfv.org/gerrit/gitweb?p=kvmfornfv.git;a=commit;h=a233b3fef0ef0048071145eb233becffbdf96d0f | See code change]]. | Threaded irq can help reduce interrupt latency because it avoids locking interrupt too long in interrupt handler. But if the interrupt handler itself does not take much time just like vfio for which the only thing to do is inject the interrupt to guest which can be really fast. In such case threaded irq would cost time to do the context switch between irq thread and interrupt handler. Another point is in NFV scenario such realtime interrupt(like DPDK interrupt) is almost the highest priority, so making such interrupt non-threaded would certainly benefit the highest application. [[https://gerrit.opnfv.org/gerrit/gitweb?p=kvmfornfv.git;a=commit;h=a233b3fef0ef0048071145eb233becffbdf96d0f | See code change]]. | ||
- | |||
- | * Use VMX preemption timer to emulate the lapic deadline timer | ||
- | KVM emulates lapic deadline timer using native hrtimer facility which can cause lots of vmexits even when guest’s deadline is actually not hit. Instead, we use VMX preemption timer to emulate it If cpu is in non-root mode which cause vmexit only when the deadline is hit. | ||
* Cache Allocation Technology(CAT) enabling | * Cache Allocation Technology(CAT) enabling | ||
Last leve cache(LLC) contention is a key resource contention for memory intensive workloads running on the same socket. Intel CAT can be used to partition LLC among realtime/non-realtime apps/VMs. | Last leve cache(LLC) contention is a key resource contention for memory intensive workloads running on the same socket. Intel CAT can be used to partition LLC among realtime/non-realtime apps/VMs. |