Re: context switches and responsiveness

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Antoine Martin wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hi,

I've recently increased the number of guests (+20%) running on one of my
hosts and found that the responsiveness suffered.

How many guests?  How many vcpus?

Before that, the context switches were hovering around 10K, now they're
close to 30K. Or this could just be because I upgraded the host kernel
and kvm: host and guests are running 2.6.29.4 + kvm-86
Is there anything that can be done to reduce this?
I thought dynticks would prevent unecessary context switching?

dynticks is the default IIRC.  What type guests are you running?

If Linux, make sure the guests are dynticks as well.

As you can see from the dstat sample below, the host can be very quiet
at times, and yet the guests are a bit sluggish. (there is no swapping
going on in the guests either)
Is 30K context switches normal for a host that's mostly idle??

Depends on guest count!  Please provide kvm_stat output.

Here is a sample guest command line:
- -clock dynticks -usbdevice tablet -m 1024 -monitor
telnet:127.0.0.1:10005,server,nowait -L ./ -kernel ./bzImage-2.6.29.4
- -append  earlyprintk=serial,ttyS0,115200,keep console=ttyS0,115200

Ah, -usbdevice tablet, interrupt generator from hell. Let it go and you'll see your context switch rate drop.

- ----total-cpu-usage---- -dsk/total- -net/total- ---paging-- ---system--
usr sys idl wai hiq siq| read  writ| recv  send|  in   out | int   csw
 14  15  71   0   0   0|   0     0 | 942B 6912B|   0     0 |  20k   29k
 11  17  71   0   0   0|   0   160k| 460B  818B|   0     0 |  19k   30k

Interrupt rate is close to context switch rate, which is good.


--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux