From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anders Subject: Re: KVM power usage - high wakeup rates Date: Mon, 23 Jun 2008 19:10:17 +0200 Message-ID: <485FD8F9.9020100@flac.kalibalik.dk> References: <485AA6A7.2060806@codemonkey.ws> <485E59C3.1020607@flac.kalibalik.dk> <485F0F99.6060103@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from 77.75.163.100.customers.telelet.dk ([77.75.163.100]:58678 "EHLO smtp.hotelhot.dk" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1755427AbYFWRKN (ORCPT ); Mon, 23 Jun 2008 13:10:13 -0400 In-Reply-To: <485F0F99.6060103@qumranet.com> Sender: kvm-owner@vger.kernel.org List-ID: Avi Kivity wrote: > Anders wrote: >> According to powertop, I had about 15 kvm wakeups/sec with my >> previous setup (nohz, no display). Now I upgraded to kvm-70 and the >> timer interrupt has reappeared so I have this: >> >> Top causes for wakeups: >> 25,4% (112,4) : function call interrupts >> 22,6% (100,0) qemu-system-x86 : kvm_arch_vcpu_ioctl_run >> (pit_timer_fn) >> 22,6% (100,0) qemu-system-x86 : __kvm_migrate_timers (apic_timer_fn) >> 8,7% ( 38,5) qemu-system-x86 : sys_timer_settime (posix_timer_fn) >> >> What could be the cause for this change? The previous kvm was from >> Ubuntu 8.04, there are no changes in the guest. >> > > Likely, the in-kernel pit. Try -no-kvm-pit. The -no-kvm-pit did change things. However, there is still a periodic tick: Top causes for wakeups: 34,7% (102,0) qemu-system-x86 : sys_timer_settime (posix_timer_fn) 34,0% (100,0) qemu-system-x86 : __kvm_migrate_timers (apic_timer_fn) 13,8% ( 40,7) : function call interrupts For comparison, this is my normal output. This is with the same kernel modules, but the userspace from Ubuntu 8.04: Top causes for wakeups: 50,2% ( 66,0) : function call interrupts 11,3% ( 14,9) kvm : apic_mmio_write (apic_timer_fn) >> In general, what are the best host/guest settings for a low number of >> wakeups? > > dyntick on both. > Sure. I guess my question was how to achieve that. Things like the -no-kvm-pit advice. Also, I have used "clocksource=tsc acpi=force" on the guest to get it to dyntick. But that seems to no longer work. So I was wondering whether there was some known configuration that was supposed to work. Anders.