From owner-freebsd-virtualization@freebsd.org Fri Mar 3 09:31:48 2017 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86AC1CF53A6 for ; Fri, 3 Mar 2017 09:31:48 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from ihor-3.amdmi3.ru (ihor-3.amdmi3.ru [185.117.152.228]) by mx1.freebsd.org (Postfix) with ESMTP id 400DF1C9B; Fri, 3 Mar 2017 09:31:47 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from hive.panopticon (unknown [78.153.152.119]) by ihor-3.amdmi3.ru (Postfix) with ESMTPS id 5F2141AF129; Fri, 3 Mar 2017 12:31:40 +0300 (MSK) Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id 7E6F685; Fri, 3 Mar 2017 12:25:57 +0300 (MSK) Received: by hades.panopticon (Postfix, from userid 1000) id 962A0606; Fri, 3 Mar 2017 12:30:01 +0300 (MSK) Date: Fri, 3 Mar 2017 12:30:01 +0300 From: Dmitry Marakasov To: Allan Jude Cc: freebsd-virtualization@freebsd.org Subject: Re: Timer problems on FreeBSD 11R on KVM Message-ID: <20170303093001.GA66658@hades.panopticon> References: <20170301174640.GA44226@hades.panopticon> <4cc78ba2-a23b-5cb2-92c8-6435762e2910@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4cc78ba2-a23b-5cb2-92c8-6435762e2910@freebsd.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Mar 2017 09:31:48 -0000 * Allan Jude (allanjude@freebsd.org) wrote: > > I'm running a bunch of FreeBSD VMs on VPS provider which uses KVM. > > Recently one of them began bahaving strangely. Symptoms: > > > > - Much ~(30%) CPU spent in intr > > - top shows CPU used by "intr{swi4: clock (0)}" > > - kernel: calcru: runtime went backwards from 13958 usec to 10792 usec for pid 919 (sshd) > > messages in logs > > - There's no much load, no high network traffic, systat shows no excess > > interrupts. > > - This intr load is sporadic in form of ~30 minute busts each several > > hours > > - The box had ntpd running, but disabling it doesn't help > > - Playing with timer-related sysctls does not help either > > > > I've tried i8254 and TSC-low timecounters: > > > > kern.timecounter.hardware: ACPI-fast > > kern.timecounter.choice: TSC-low(800) i8254(0) ACPI-fast(900) dummy(-1000000) > > > > and kern.eventtimer.periodic=1 > > > > to no effect. > > > > > > I suspect that this began after some changes on the hoster's side. > > > > - This VM was working for more than a year without problems before > > - A graph which monitors a reply time of website running on that VM > > showed min. response time jump from 50 to 75 msec on Monday, after > > which problems began. > > > > So while I'm getting the hoster to tell me what they have changed, any > > ideas? > > > > Look at: > kern.eventtimer.choice > > and try different kern.eventtimer.timer values Thank you. kern.eventtimer.choice: LAPIC(400) i8254(100) RTC(0) kern.eventtimer.timer was LAPIC, trying i8254. -- Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D amdmi3@amdmi3.ru ..: jabber: amdmi3@jabber.ru http://amdmi3.ru