From owner-freebsd-questions Tue Oct 16 8: 8:45 2001 Delivered-To: freebsd-questions@freebsd.org Received: from wasp.eng.ufl.edu (wasp.eng.ufl.edu [128.227.116.1]) by hub.freebsd.org (Postfix) with ESMTP id D61D237B401 for ; Tue, 16 Oct 2001 08:08:29 -0700 (PDT) Received: from eng.ufl.edu (scanner.engnet.ufl.edu [128.227.152.221]) by wasp.eng.ufl.edu (8.9.3/8.9.3) with ESMTP id LAA19488; Tue, 16 Oct 2001 11:08:22 -0400 (EDT) Message-ID: <3BCC4D66.D6733891@eng.ufl.edu> Date: Tue, 16 Oct 2001 11:08:22 -0400 From: Bob Johnson Reply-To: bob88@garbonzo.hos.ufl.edu X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en, eo MIME-Version: 1.0 To: matt-sykes@excite.com, freebsd-questions@freebsd.org Subject: Re: 0.00% CPU for all processes Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > Date: Mon, 15 Oct 2001 15:27:47 -0700 (PDT) > From: Matt Sykes > Subject: Re: 0.00% CPU for all processes > > On Mon, 15 Oct 2001 17:23:48 -0400, Jason Andresen wrote: > > > Matt Sykes wrote: > > > [...] > > > Looks like it works! > > > > > > In top, cvsup gradually comes up to about 40%, stays there a while, > > > then disappears (I couldn't think of another longish process to test > > > with). I guess that's correct. Before it would start at 2% then > > > quickly go back to 0%. > > > > > > dmesg says "Timecounter 'PIIX' frequency 3579545"; I guess that's > > > alright. > > > > > > One thing which surprises me, though --- all other processes are zero. > > > Is this normal? This is my first time seeing FreeBSD run. I have an > > > identical box here running linux (and each box runs a minimum of > > > services), where at least top will show nonzero CPU percentage in top, > > > usually around 0.5%. Does linux have more fine-grained timing, or is > > > it cheating, or does the margin of error render this test essentially > > > meaningless anyway? > > > > It's not unusual to see most of your processes at 0.00% in FreeBSD. > > > > >From the answers I've recieved, seems I wasn't clear enough. > I know that most of idle processes should be zero --- my > point is that top should show up in top, and since it does > in linux and with other FreeBSD top outputs I've seen, this > leads me to believe my kernel timer is still broken (and > it works on this same box running linux). > > It depends, at least in part, on your processor speed. On my P-III-800, top starts at about 0.20%, and drops to 0.00% over three or four seconds. I've seen no indication that the numbers are not reasonably accurate. It also moves down the list relative to the other processes showing 0.00% until it stabilizes, suggesting that even though they are all using less than 0.01% cpu time, they are still being ranked according to what they are using. Keep in mind that what top displays is not instantaneous values, it is time-weighted averages. I suspect part of the difference from your Linux box is that it uses a different weighting algorithm. Or maybe FreeBSD is just more efficient ;) The top of my "top" output looks like: last pid: 16386; load averages: 1.06, 1.05, 1.00 up 10+15:44:50 09:13:38 57 processes: 3 running, 53 sleeping, 1 zombie CPU states: 1.1% user, 96.7% nice, 1.3% system, 0.9% interrupt, 0.0% idle Mem: 54M Active, 160M Inact, 37M Wired, 164K Cache, 61M Buf, 250M Free Swap: 260M Total, 260M Free PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND 303 nobody 96 20 692K 560K RUN 251.3H 96.63% 96.63% dnetc 16300 bobj 2 0 43996K 42688K select 0:28 0.15% 0.15% XF86_SVGA 16303 bobj 2 0 6012K 4760K select 0:03 0.10% 0.10% kwm 244 root 2 0 892K 496K select 1:37 0.00% 0.00% moused 16337 bobj 2 0 25268K 22480K select 0:53 0.00% 0.00% communicator-l [...] The "top" process itself is around the 25th on the list. And it isn't unusual for everything except dnetc to drop to 0.00% if I'm not doing anything. But now I have my own question: what is the difference between the "weighted" CPU time (WCPU), and the "raw" CPU time (CPU)? They are usually, but not always, the same, and the "raw" value is clearly time-weighted. Or is _my_ system defective? -Bob To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message