Skip to contentSkip to conversation

vCPU scalability for linux VMs

DISCUSSION Alec Istomin 3 participants 7 messages May 5, 2010 – May 6, 2010 1 message not in the archive KVM

lore
Share & tools
lore
#0 lore raw

Gentlemen,
Reaching out with a non-development question, sorry if it's not appropriate here.

I'm looking for a way to improve Linux SMP VMs performance under KVM.

My preliminary results show that single vCPU Linux VMs perform up to 10 times better than 4vCPU Linux VMs (consolidated performance of 8 VMs on 8 core pre-Nehalem server). I suspect that I'm missing something major and look for any means that can help improve SMP VMs performance.

VMs are started using:
qemu-kvm -m $ram -smp $cpus -name $name -drive file=${newimg},boot=on,cache=writethrough -net nic,macaddr=$mac,vlan=0,model=virtio -net tap,script=/kvm/qemu-ifup,vlan=0,ifname=kvmnet$i -parallel none -usb -k en-us -monitor pty -serial pty -nographic -daemonize -snapshot

KVM Host Environment (redhat 5 based):

# uname -r
2.6.18-194.el5
# rpm -qa|grep kvm
kvm-83-164.el5
kvm-tools-83-164.el5
kmod-kvm-83-164.el5
kvm-qemu-img-83-164.el5

Thank you,
Alec

#1 lore raw
Quoted 4 lines · Alec Istomin

Gentlemen,
Reaching out with a non-development question, sorry if it's not appropriate here.

Quoted 9 lines

I'm looking for a way to improve Linux SMP VMs performance under KVM.

My preliminary results show that single vCPU Linux VMs perform up to 10 times better than 4vCPU Linux VMs (consolidated performance of 8 VMs on 8 core pre-Nehalem server). I suspect that I'm missing something major and look for any means that can help improve SMP VMs performance.

So you have a total of 32 vcpus on 8 cores? This is known to be problematic. You may see some improvement by enabling hyperthreading.

There is ongoing work to improve this.

Signature · 1 line
error compiling committee.c: too many arguments to function
#2 lore raw
Quoted 2 lines · Avi Kivity

So you have a total of 32 vcpus on 8 cores? This is known to be problematic. You may see some improvement by enabling hyperthreading.

exactly, 32 vCPUs on 8 core hardware that doesn't support hyperthreading (Clovertown E5335)

Quoted 1 line

There is ongoing work to improve this.

If interested - let me know when is it going to be a good time/build to do the regression on this.

#4 lore raw
In reply to a message not in the archive
Quoted 10 lines

Gentlemen,
Reaching out with a non-development question, sorry if it's not appropriate here.

I'm looking for a way to improve Linux SMP VMs performance under KVM.

My preliminary results show that single vCPU Linux VMs perform up to 10 times better than 4vCPU Linux VMs (consolidated performance of 8 VMs on 8 core pre-Nehalem server). I suspect that I'm missing something major and look for any means that can help improve SMP VMs performance.

Could you provide more details of what workload was used to compare this performance?

- vatsa

#5 lore raw
Quoted 7 lines · Srivatsa Vaddagiri
Quoted 4 lines

My preliminary results show that single vCPU Linux VMs perform up to 10 times better than 4vCPU Linux VMs (consolidated performance of 8 VMs on 8 core pre-Nehalem server). I suspect that I'm missing something major and look for any means that can help improve SMP VMs performance.

Could you provide more details of what workload was used to compare this performance?

It's Dell's DVD-Store LAMP stack test suite with Medium database (about 1 GB MySQL data) . 8x 2Gb VMs (on 16GB RAM host) with different vCPU configuration simultaneously loaded by external web clients.

Regards,
Alec

#6 lore raw
Quoted 7 lines · Alec Istomin
Quoted 4 lines · Srivatsa Vaddagiri
Quoted 4 lines

My preliminary results show that single vCPU Linux VMs perform up to 10 times better than 4vCPU Linux VMs (consolidated performance of 8 VMs on 8 core pre-Nehalem server). I suspect that I'm missing something major and look for any means that can help improve SMP VMs performance.

Quoted 6 lines
Quoted 2 lines

Could you provide more details of what workload was used to compare this performance?

It's Dell's DVD-Store LAMP stack test suite with Medium database (about 1 GB MySQL data) . 8x 2Gb VMs (on 16GB RAM host) with different vCPU configuration simultaneously loaded by external web clients.

Ok ..Do you have any more data on how the vCPU scalability looks like (how the throughput scales with increasing vCPUs)?

- vatsa

#7 lore raw
Quoted 11 lines · Srivatsa Vaddagiri
Quoted 10 lines · Alec Istomin
Quoted 7 lines · Srivatsa Vaddagiri
Quoted 4 lines

My preliminary results show that single vCPU Linux VMs perform up to 10 times better than 4vCPU Linux VMs (consolidated performance of 8 VMs on 8 core pre-Nehalem server). I suspect that I'm missing something major and look for any means that can help improve SMP VMs performance.

Could you provide more details of what workload was used to compare this performance?

Quoted 6 lines
Quoted 3 lines

It's Dell's DVD-Store LAMP stack test suite with Medium database (about 1 GB MySQL data) . 8x 2Gb VMs (on 16GB RAM host) with different vCPU configuration simultaneously loaded by external web clients.

Ok ..Do you have any more data on how the vCPU scalability looks like (how the throughput scales with increasing vCPUs)?

See attached for 1 vs 2 vs 4 vCPUs consolidated throughput from multiple VMs with the same client payload. Selected DVD-Store (LAMP) scalability is mixed into here too and I wonder what type of test would you recommend to receive cleaner results?

Regards,
Alec