From owner-freebsd-current@FreeBSD.ORG Sun Sep 28 16:17:04 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9460E1065687; Sun, 28 Sep 2008 16:17:04 +0000 (UTC) (envelope-from bill@lefebvre.org) Received: from photon.ws-e.net (photon.ws-e.com [64.34.164.166]) by mx1.freebsd.org (Postfix) with ESMTP id 5368B8FC13; Sun, 28 Sep 2008 16:17:04 +0000 (UTC) (envelope-from bill@lefebvre.org) Received: from lilburn.lefebvre.org (adsl-074-166-023-150.sip.asm.bellsouth.net [74.166.23.150]) by photon.ws-e.net (8.13.8/8.13.8) with ESMTP id m8SGH2vM013083; Sun, 28 Sep 2008 16:17:03 GMT Received: from [10.88.88.6] (milton.lefebvre.org [10.88.88.6]) by lilburn.lefebvre.org (8.14.2/8.14.2) with ESMTP id m8SGGx7Z053437; Sun, 28 Sep 2008 12:17:00 -0400 (EDT) (envelope-from bill@lefebvre.org) Message-ID: <48DFADF6.10504@lefebvre.org> Date: Sun, 28 Sep 2008 12:16:54 -0400 From: William LeFebvre User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Edwin Groothuis References: <20080928054620.GA80250@k7.mavetju> <48DF3CFE.7@lissyara.su> <7d6fde3d0809280209i3003829bj23baa93f0b271163@mail.gmail.com> <20080928112538.GC13745@k7.mavetju> In-Reply-To: <20080928112538.GC13745@k7.mavetju> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=4.0 tests=ALL_TRUSTED autolearn=failed version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on lilburn.lefebvre.org X-Scanned-By: MIMEDefang 2.63 on 192.168.0.4 Cc: Alex Keda , Garrett Cooper , stable@freebsd.org, current@freebsd.org Subject: Re: Request for testing - top 3.8b1 in the base system X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2008 16:17:04 -0000 Edwin Groothuis wrote: > On Sun, Sep 28, 2008 at 02:09:00AM -0700, Garrett Cooper wrote: >> On Sun, Sep 28, 2008 at 1:14 AM, Alex Keda wrote: >>> Some strange. Count running processes not match with system top > > That has been explained in an email before. > >> I'm not sure I'm finding an issue, but I do find it interesting that... >> 1. It takes a reasonably long amount of time for top to plateau the >> WCPU field (approximately 8-10 iterations), whereas ps registering the >> WCPU percentage value is almost instantaneous. Top 3.8 doesn't display WCPU. It is an antequated measure that is only maintained by the kernel so that ps can display it. It no longer has any meaning to the scheduler, so why bother displaying it. > > With ps it takes 10 2 second steps to get the WCPU from 0 to 100, > with the new top (which doesn't have WCPU (See Changes file, and > the m_freebsd.c file, I don't know of the real reason behind it) > anymore) goes from 0 to 100 in 2 2 second steps. ps shows a decaying average as calculated by the kernel over the past minute and recorded in the proc structure. Top calculates its own average based on the difference in cpu time between the last measurement and the current measurement. The output from ps is fine when you want a single snapshot: you want it to show information averaged over a long period of time. Top is showing you only what's going on right now, since the last update. That's why percent CPU in top will climb to its final value so quickly. Bill LeFebvre