My KVM host have a 4 cores cpu (a bit weak) and run a kernel configured for real time (with preempt_rt_full, isolcpus, no_hz full). The cores 2 and 3 are isolated.
My guests kernel are also configured for real time (with preempt_rt_full and no_hz_full).
When running two guests with 1 vcpu (one guest on each isolated core) the latency is not noticeable. Here are the result of cyclictest:
VM1:/home/debian# cyclictest --default-system
T: 0 ( 737) P: 0 I:1000 C: 50458 Min: 17 Act: 207 Avg: 187 Max: 1275
VM2:/home/debian# cyclictest --default-system
T: 0 ( 737) P: 0 I:1000 C: 58514 Min: 15 Act: 193 Avg: 181 Max: 1186
When running one guest with 2 vcpu (on both isolated core) the latency is really high. Here is the result of cyclictest:
VM1:/home/debian# cyclictest --default-system
T: 0 ( 737) P: 0 I:1000 C: 40795 Min: 11 Act: 207 Avg: 697 Max: 775899
I tried unsuccessfully multiple solutions:
- Running the 2 vcpu configured guest without the cpu affinity (so on core 0 and 1)
- Running kvm daemon (libvirtd) on the same cores as the guest (so on core 2 and 3)
- Removing the unnecessary controller (tablet, ...)
- Increasing the RAM allocated to the guest
Do you know where I failed ?