From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?IkMuIEJyw7Zja2VyIg==?= Subject: Re: KVM slow LAMP guest Date: Tue, 14 Jul 2015 21:54:25 +0200 Message-ID: <55A568F1.20504@intercollect.com> References: <5582805F.8090703@logic-q.nl> <55A4C2AA.9000307@logic-q.nl> <55A4C454.2070704@intercollect.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE To: kvm list Return-path: Received: from smtp.logic-q.nl ([213.207.85.242]:58992 "EHLO smtp.logic-q.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751900AbbGNUBF (ORCPT ); Tue, 14 Jul 2015 16:01:05 -0400 Received: from localhost (localhost [127.0.0.1]) by smtp.logic-q.nl (Postfix) with ESMTP id 323FEA0AB6 for ; Tue, 14 Jul 2015 21:54:32 +0200 (CEST) Received: from smtp.logic-q.nl ([127.0.0.1]) by localhost (smtp.logic-q.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xT6QabFrCwFl for ; Tue, 14 Jul 2015 21:54:29 +0200 (CEST) Received: from [192.168.1.121] (unknown [185.23.142.226]) (Authenticated sender: c.brocker@logic-q.nl) by smtp.logic-q.nl (Postfix) with ESMTPSA id 2A59EA0A9A for ; Tue, 14 Jul 2015 21:54:29 +0200 (CEST) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 14-7-2015 19:16, David Matlack wrote: > (adding back the kvm mailing list) > > On Tue, Jul 14, 2015 at 1:12 AM, "C. Br=C3=B6cker" > wrote: >> On 14-7-2015 10:04, Hansa wrote: >>> On 13-7-2015 20:57, David Matlack wrote: >>>> On Thu, Jun 18, 2015 at 10:26 AM, David Matlack >>>> wrote: >>>>> On Thu, Jun 18, 2015 at 1:25 AM, Hansa wrote: >>>>>> Hi, >>>>>> >>>>>> I have a LAMP server as guest in KVM. Whenever the server is idl= e for >>>>>> some >>>>>> time it takes about 30 seconds to load a Wordpress site. >>>>>> If the server is not idle the site shows up in max 5 seconds. I'= ve >>>>>> already >>>>>> turned of power management in the guest by passing >>>>>> >>>>>> GRUB_CMDLINE_LINUX_DEFAULT=3D"apm=3Doff" >>>>>> >>>>>> in /etc/default/grub. This has no effect. >>>>>> Does KVM do some power management on guests? If so, how do I tur= n this >>>>>> off >>>>>> for my LAMP guest? >>>>> KVM doesn't do any power management of guests. But if everything = is idle >>>>> on >>>>> the host (including your guest), then host power management could= kick >>>>> in. >>>>> Have you tried playing with host pm? >>>>> >>>>> Could you try running your workload with the guest kernel paramet= er >>>>> "idle=3Dpoll" >>>>> and let me know the performance? >>>>> >>>>> Also, if you are running Linux 4.0 or later on the host, could yo= u try >>>>> running >>>>> your workload with the KVM module parameter "halt_poll_ns=3D50000= 0"? >>>> Hansa-- Did you ever get a chance to run your workload with these >>>> changes? >>> Hi David, >>> >>> Sorry I didn't respond to your mail earlier and nice of you to chec= k back. >>> To be honest no I haven't. To much work overload on my side. I've j= ust added >>> the idle=3Dpoll to the guests' grub and rebooted the server. I'll l= et it run a >>> few day's to check if it helps. Btw: I'm running 2.6 linux kernel h= ere so >>> I'm not sure if I can add the "halt_poll_ns" param to KVM. >>> >>> Best, Hansa >> Wow! That makes real difference! >> The site was never that fast! Although CPU load is constantly on 100= % any >> chance I can tweak this param? And is there a similar param for Wind= ows >> guests? > Since idle=3Dpoll gave a noticeable improvement, your workload is a g= ood > candidate for halt_poll_ns. This is a host KVM module parameter. It w= ill > give you a similar speedup, it will work independent of your guest os= , > and won't peg your cpu usage at 100% during periods of no activity. I= f > you don't have halt_poll_ns available (your host kernel older than 4.= 0), > is upgrading to a newer kernel or backporting the patch [1] an option= ? > > I'm not sure of any more guest params you can tweak (linux or windows= ), but > I'll let you know if I come up with anything. > > [1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/c= ommit/?id=3Df7819512996361280b86259222456fcf15aad926 Sorry David. That is not an option. It's a production server on 2.6 kernel. 4.0 kern= el is not in Base repos and I don't know which impact installing the ne= wer kernel version will have on this server. Any other options?