RE: VM performance issue in KVM guests.

2010-04-18 Thread Zhang, Xiantao
Srivatsa Vaddagiri wrote: On Thu, Apr 15, 2010 at 03:33:18PM +0200, Peter Zijlstra wrote: On Thu, 2010-04-15 at 11:18 +0300, Avi Kivity wrote: Certainly that has even greater potential for Linux guests. Note that we spin on mutexes now, so we need to prevent preemption while the lock owner

Re: VM performance issue in KVM guests.

2010-04-17 Thread Avi Kivity
On 04/16/2010 05:27 AM, Zhang, Xiantao wrote: When vcpus are pinned to pcpus, there is a 50% chance that a guest's vcpus will be co-scheduled and spinlocks will perform will. When vcpus are not pinned, but affine wakeups are disabled, there is a 33% chance that vcpus will be co-scheduled.

Re: VM performance issue in KVM guests.

2010-04-17 Thread Avi Kivity
On 04/15/2010 04:33 PM, Peter Zijlstra wrote: On Thu, 2010-04-15 at 11:18 +0300, Avi Kivity wrote: Certainly that has even greater potential for Linux guests. Note that we spin on mutexes now, so we need to prevent preemption while the lock owner is running. either that, or disable

Re: VM performance issue in KVM guests.

2010-04-16 Thread Peter Zijlstra
On Thu, 2010-04-15 at 09:43 -0700, Srivatsa Vaddagiri wrote: On Thu, Apr 15, 2010 at 03:33:18PM +0200, Peter Zijlstra wrote: On Thu, 2010-04-15 at 11:18 +0300, Avi Kivity wrote: Certainly that has even greater potential for Linux guests. Note that we spin on mutexes now, so we need

Re: VM performance issue in KVM guests.

2010-04-15 Thread Avi Kivity
On 04/15/2010 07:58 AM, Srivatsa Vaddagiri wrote: On Sun, Apr 11, 2010 at 11:40 PM, Avi Kivity a...@redhat.com mailto:a...@redhat.com wrote: The current handing of PLE is very suboptimal. With proper directed yield we should be much better there. Hi Avi, By directed

Re: VM performance issue in KVM guests.

2010-04-15 Thread Peter Zijlstra
On Thu, 2010-04-15 at 11:18 +0300, Avi Kivity wrote: Certainly that has even greater potential for Linux guests. Note that we spin on mutexes now, so we need to prevent preemption while the lock owner is running. either that, or disable spinning on (para) virt kernels. Para virt kernels

Re: VM performance issue in KVM guests.

2010-04-15 Thread Srivatsa Vaddagiri
On Thu, Apr 15, 2010 at 03:33:18PM +0200, Peter Zijlstra wrote: On Thu, 2010-04-15 at 11:18 +0300, Avi Kivity wrote: Certainly that has even greater potential for Linux guests. Note that we spin on mutexes now, so we need to prevent preemption while the lock owner is running.

RE: VM performance issue in KVM guests.

2010-04-15 Thread Zhang, Xiantao
Avi Kivity wrote: On 04/14/2010 06:24 AM, Zhang, Xiantao wrote: Spin loops need to be addressed first, they are known to kill performance in overcommit situations. Even in overcommit case, if vcpu threads of one qemu are not scheduled or pulled to the same logical processor, the

Re: VM performance issue in KVM guests.

2010-04-14 Thread Avi Kivity
On 04/14/2010 06:24 AM, Zhang, Xiantao wrote: Spin loops need to be addressed first, they are known to kill performance in overcommit situations. Even in overcommit case, if vcpu threads of one qemu are not scheduled or pulled to the same logical processor, the performance drop is

Re: VM performance issue in KVM guests.

2010-04-13 Thread Avi Kivity
On 04/13/2010 03:50 AM, Zhang, Xiantao wrote: Avi Kivity wrote: On 04/12/2010 05:04 AM, Zhang, Xiantao wrote: What was the performance hit? What was your I/O setup (image format, using aio?) The issue only happens when vcpu number is over-committed(e.g.

RE: VM performance issue in KVM guests.

2010-04-13 Thread Zhang, Xiantao
Avi Kivity wrote: On 04/13/2010 03:50 AM, Zhang, Xiantao wrote: Avi Kivity wrote: On 04/12/2010 05:04 AM, Zhang, Xiantao wrote: What was the performance hit? What was your I/O setup (image format, using aio?) The issue only happens when vcpu number is over-committed(e.g.

Re: VM performance issue in KVM guests.

2010-04-12 Thread Avi Kivity
On 04/12/2010 05:04 AM, Zhang, Xiantao wrote: What was the performance hit? What was your I/O setup (image format, using aio?) The issue only happens when vcpu number is over-committed(e.g. vcpu/pcpu2) and physical cpus are saturated. For example, when run webbench in windows OS in

RE: VM performance issue in KVM guests.

2010-04-12 Thread Zhang, Xiantao
Avi Kivity wrote: On 04/12/2010 05:04 AM, Zhang, Xiantao wrote: What was the performance hit? What was your I/O setup (image format, using aio?) The issue only happens when vcpu number is over-committed(e.g. vcpu/pcpu2) and physical cpus are saturated. For example, when run webbench

RE: VM performance issue in KVM guests.

2010-04-11 Thread Zhang, Xiantao
Avi Kivity wrote: (copying lkml and some scheduler folk) On 04/10/2010 11:16 AM, Zhang, Xiantao wrote: Hi, all We are working on the scalability work for KVM guests, and found one big issue exists in linux scheduler and it may impact guest's performance and scalability a lot for some

VM performance issue in KVM guests.

2010-04-10 Thread Zhang, Xiantao
Hi, all We are working on the scalability work for KVM guests, and found one big issue exists in linux scheduler and it may impact guest's performance and scalability a lot for some special workloads running in VM. In the current Linux scheduler, there are some features to enhance App's

Re: VM performance issue in KVM guests.

2010-04-10 Thread Avi Kivity
(copying lkml and some scheduler folk) On 04/10/2010 11:16 AM, Zhang, Xiantao wrote: Hi, all We are working on the scalability work for KVM guests, and found one big issue exists in linux scheduler and it may impact guest's performance and scalability a lot for some special workloads