Slow KVM HAProxy vs LXC

jcbhltz22

Member
Mar 8, 2021
10
0
6
34
Using a KVM with HAProxy installed shows significantly higher CPU usage and lower throughput when compared to a container with similar compute resources.

KVM ~350MBit/s throughput in HAProxy @ 100% CPU
LXC ~1GBit/s throughput in HAProxy @ 10% CPU

1. ) Machines are on the same LAN so this is not a routing issue.
2.) iPerf3 between machines is 1GBit. This leads me to believe this is not a network
3.) Settings in HAProxy are identical.

I am thinking this could be a CPU feature needs to be passed though to the VM that is not (I've enabled/disabled many for testing, including AES, but I do not see any notable performance changes).

Has anyone had this experience? Any help is much appreciated
 
Last edited:
do you have tried with host cpu model for the vm ? (to be sure to test with aes or other cpu flags).

also, what is the number of request/s ? (few small requests with big response, or a lot of requests with small responses ?)
Yes I have tried host and enabling AES and other features. Minor changes in throughput.
I have just been doing single large requests.