From owner-freebsd-stable@FreeBSD.ORG Sat Oct 4 06:10:47 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 377EB1065686 for ; Sat, 4 Oct 2008 06:10:47 +0000 (UTC) (envelope-from shoesoft@gmx.net) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 7C2B28FC17 for ; Sat, 4 Oct 2008 06:10:46 +0000 (UTC) (envelope-from shoesoft@gmx.net) Received: (qmail invoked by alias); 04 Oct 2008 06:10:43 -0000 Received: from 85-127-18-201.dynamic.xdsl-line.inode.at (EHLO taxman.pepperland) [85.127.18.201] by mail.gmx.net (mp030) with SMTP; 04 Oct 2008 08:10:43 +0200 X-Authenticated: #16703784 X-Provags-ID: V01U2FsdGVkX1+7d24aXiS7s9EPr6UMi0mqNgkhWn0AxdDwYXyscH KBFAVLVAWYvdyD From: Stefan Ehmann To: Jonathan Chen Date: Sat, 4 Oct 2008 08:10:41 +0200 User-Agent: KMail/1.10.1 (FreeBSD/7.1-PRERELEASE; KDE/4.1.1; i386; ; ) References: <200810031003.14400.shoesoft@gmx.net> <20081003093937.GA4944@osiris.chen.org.nz> In-Reply-To: <20081003093937.GA4944@osiris.chen.org.nz> MIME-Version: 1.0 Message-Id: <200810040810.42363.shoesoft@gmx.net> X-Y-GMX-Trusted: 0 X-FuHaFi: 0.51,0.51 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-stable@freebsd.org Subject: Re: top/ps CPU percentage broken on 7.1-PRERELEASE? (works with SCHED_4BSD) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2008 06:10:47 -0000 On Friday 03 October 2008 11:39:37 Jonathan Chen wrote: > On Fri, Oct 03, 2008 at 10:03:13AM +0200, Stefan Ehmann wrote: > > The CPU % displayed by top/ps for single processes seem to be broken > > here. > > > > E.g. for a simple shell loop: > > top starts displaying around 20% for bash. Within some seconds it > > converges to 0%. > > > > ps values seem to be consistent with top. > > > > The value in the time column seems to be correct. On every refresh it > > increases by 2s. > > > > last pid: 19353; load averages: 0.99, 0.90, 0.76 up 0+00:37:29 > > 09:07:00 > > 119 processes: 2 running, 114 sleeping, 1 stopped, 2 zombie > > CPU: 98.5% user, 0.0% nice, 1.1% system, 0.4% interrupt, 0.0% idle > > Mem: 376M Active, 407M Inact, 144M Wired, 47M Cache, 110M Buf, 13M Free > > Swap: 1280M Total, 1280M Free > > > > PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND > > 19352 stefan 1 99 0 4432K 2080K RUN 0:03 15.48% bash > > > > All other process are using 0% CPU. > > > > I did a buildworld/kernel yesterday to be sure everything is in sync. I > > have CURRENT on a different hard disk. Haven't seen the problem there. > > Are there any relevant fixes that weren't MFCed? > > > > Does anyone else see this? This is a single CPU i386 machine. > > Yes, my Java processes now run at 800% at times on my dual processor > AMD64 system. I've seen this behaviour too some time ago. Don't know if it's related to what I see. I recompiled my kernel with SCHED_4BSD and things work fine. So it seems to be a SCHED_ULE issue.