From owner-freebsd-questions@FreeBSD.ORG Sun May 24 08:12:20 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B44E2106566C for ; Sun, 24 May 2009 08:12:20 +0000 (UTC) (envelope-from glen.j.barber@gmail.com) Received: from mail-fx0-f168.google.com (mail-fx0-f168.google.com [209.85.220.168]) by mx1.freebsd.org (Postfix) with ESMTP id 447698FC15 for ; Sun, 24 May 2009 08:12:20 +0000 (UTC) (envelope-from glen.j.barber@gmail.com) Received: by fxm12 with SMTP id 12so2574912fxm.43 for ; Sun, 24 May 2009 01:12:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=IpmWgjs9KcQC8XPeSqRR1ZUFbzuGJt1lU2C4xy4cei4=; b=RlwqGPtZZYwThGY3zZxuQaXN5vXmBDx29uWGqZ+s1d7o1C3np5zs6KxQgVD0/R+I/o qczkOpMOKzPsMtXQMCTEVKVWpBcrHO5aNYXQcetWfDYy2rfhXuxHt7jhnYcQ/dlaHC9H jYvGC2RFQeTD/tsHDcj2Nz3mJ/ydmqFd+MZEw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Pn4t2tQFvAos0iAjzycGIKyHQ4HATjA7nUscm7opZwBeR2VaaVEvtr6A1+WfVBS3Qb OHS9v3/8cmhuvfVJQCzIeb5zOtQEYpfq8cdeSc+/G+IdWqXq/hNWhVysSyPeNDwe+13B 1Buz+Ld7Me2W/6a5WHphlD9ihGzTp0PKWBslA= MIME-Version: 1.0 Received: by 10.204.119.71 with SMTP id y7mr5540774bkq.24.1243152738808; Sun, 24 May 2009 01:12:18 -0700 (PDT) In-Reply-To: <4A18FB5B.4080902@infracaninophile.co.uk> References: <4A18BEC8.5060506@rawbw.com> <4A18FB5B.4080902@infracaninophile.co.uk> Date: Sun, 24 May 2009 04:12:18 -0400 Message-ID: <4ad871310905240112n6186631awd96599ab51886506@mail.gmail.com> From: Glen Barber To: Matthew Seaman Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-questions@freebsd.org Subject: Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5% X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2009 08:12:20 -0000 Hi, Matthew On Sun, May 24, 2009 at 3:46 AM, Matthew Seaman wrote: > Yuri wrote: [snip] > > Sure. This is not an uncommon occurrence really. =A0The load average is > the number of processes in the queue for a CPU time slice averaged over > 5, 10 or 15 minutes. =A0For multi-core systems the LA is scaled by the nu= mber > of cores so a LA of 1.0 means all cores have active processes pretty much > continually. > I thought, if it was a dual-core for example, a load average of 1.00 would indicate 50% CPU utilization overall (1 process using only 1 core)[1]. 2.00 on a dual-core would be 100%, 3.00 on a dual-core would be 100% utilization, and always 1 process in the wait queue, and so on. > Now, you might think that an active process will take the CPU utilisation > to 100%, but that is not necessarily so. =A0Some numerical applications c= an > do that, but purely CPU bound processes are relatively uncommon in everyd= ay > usage. =A0In actuality what happens is that the processor will need to > retrieve > data from somewhere to operate on. =A0There's a hierarchy of data stores = of > various speeds (latency, rather than bandwidth): > > =A0L1 Cache > L2 Cache > L3 Cache > Main RAM > Disk > Network > Does this affect the load average though? My understanding was that if the CPU cannot immediately process data, the data gets put into the wait queue until L2 Cache (then RAM, etc, etc) returns the data to be processed. [1] - http://www.teamquest.com/resources/gunther/display/5/ (not necessarily a reputable source I suppose, but explains it well...) --=20 Glen Barber 570.328.0318