From owner-freebsd-current@FreeBSD.ORG Sun Sep 28 18:06:15 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 A9DBB1065687 for ; Sun, 28 Sep 2008 18:06:15 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.169]) by mx1.freebsd.org (Postfix) with ESMTP id 361FF8FC2C for ; Sun, 28 Sep 2008 18:06:14 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by ug-out-1314.google.com with SMTP id m2so225788uge.39 for ; Sun, 28 Sep 2008 11:06:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=YJPf83HHyHv85x0XetZqqN+wS8qvI/2fdAG4mSWPXw8=; b=gnVgC+mQ0nKrTcCTBliI7eiFNYV5ryzC+p61d6AazzQES3xkHDum2uu/G+DoYehpPV nphYLFclfpTtWahtH0Qt2IyXNapxmxFbnlmTyssf6mDm9WkqBSxchayimB5NP/VrL8KG kgFbetL44nPVpeDUgfl6KjAnpeoBv0g2VnYsk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=oYI0o+ktu5aof8sk9pGjJRsbDJh8lkRdd9s59fVzUhJCrYi4XPqrUwbOvdUMX6YkZo DqvJZb10OXhd7QZL0tdDZUv0nx+xqZdU3rUmmkS9+x7c0zX2fpLGXtpC5lqdUeCTuhnk 282hWUwT0D4d0KO1TNv2hWqqX3u8hoaVWn1rI= Received: by 10.66.250.1 with SMTP id x1mr517391ugh.4.1222625173134; Sun, 28 Sep 2008 11:06:13 -0700 (PDT) Received: by 10.66.251.1 with HTTP; Sun, 28 Sep 2008 11:06:13 -0700 (PDT) Message-ID: <7d6fde3d0809281106o331a495cg8d5c3c65c521af12@mail.gmail.com> Date: Sun, 28 Sep 2008 11:06:13 -0700 From: "Garrett Cooper" To: "William LeFebvre" In-Reply-To: <48DFADF6.10504@lefebvre.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080928054620.GA80250@k7.mavetju> <48DF3CFE.7@lissyara.su> <7d6fde3d0809280209i3003829bj23baa93f0b271163@mail.gmail.com> <20080928112538.GC13745@k7.mavetju> <48DFADF6.10504@lefebvre.org> Cc: Alex Keda , Edwin Groothuis , 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 18:06:15 -0000 On Sun, Sep 28, 2008 at 9:16 AM, William LeFebvre wrote: > 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 Actually, I was trying to say it was the other way around -- WCPU took a long time in top to climb to its final value where it took a short period of time with ps. Retrying that though, it appears that I was flip-flopping my statement and yes it aligns with Bill's. I still find the averaging discrepancy a bit interesting, but it's merely a function of how the average is being taken. -Garrett