From owner-freebsd-performance@FreeBSD.ORG Tue Jun 13 18:36:24 2006 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2EDF616A41A; Tue, 13 Jun 2006 18:36:24 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE1A643D46; Tue, 13 Jun 2006 18:36:23 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id C748846BD3; Tue, 13 Jun 2006 14:36:21 -0400 (EDT) Date: Tue, 13 Jun 2006 19:36:21 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Danial Thom In-Reply-To: <20060613182328.76244.qmail@web33304.mail.mud.yahoo.com> Message-ID: <20060613193040.O26068@fledge.watson.org> References: <20060613182328.76244.qmail@web33304.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-performance@freebsd.org, David Xu Subject: Re: Initial 6.1 questions X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jun 2006 18:36:24 -0000 On Tue, 13 Jun 2006, Danial Thom wrote: > Maybe someone can explain this output. The top line shows 99.6%idle. Is it > just showing CPU 0s stats on the top line? Two types of measurements are taken: sampled ticks regarding whether the system as a while is in {user, nice, system, intr, idle}, and then sampling for individual processes. Right now, the system measurements are kept in a simple array of tick counters called cp_time. John Baldwin and others have changes that make these tick counters per-CPU. The lines at the top of top(1)'s output are derived from those tick counters. Ticks are measured on each CPU, so those are a summary across all CPUs. To add cpustat support, we need to merge John's patch to make cp_time per-CPU (ie., different counters for different CPUs) and teach the userland tools to retrieve them. When you run top you'll notice that it adjusts the measurements each refresh. In effect, what it's doing is sampling the change in tick counts over the window, pulling down the new values and calculating the percentages of ticks in each "bucket" in the last window. Robert N M Watson Computer Laboratory Universty of Cambridge