From owner-freebsd-questions@FreeBSD.ORG Wed Mar 3 06:07:57 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 12DC416A4CE for ; Wed, 3 Mar 2004 06:07:57 -0800 (PST) Received: from mx.tele-kom.ru (mx.tele-kom.ru [213.80.148.6]) by mx1.FreeBSD.org (Postfix) with SMTP id D296743D1D for ; Wed, 3 Mar 2004 06:07:55 -0800 (PST) (envelope-from doublef@tele-kom.ru) Received: (qmail 83399 invoked by uid 555); 3 Mar 2004 17:07:54 +0300 Received: from hal.localdomain (213.80.149.134) by t-k.ru with TeleMail/2 id 1078322873-83369 for zhangweiwu@realss.com; Wed, Mar 3 17:07:53 2004 +0300 (MSK) Date: Wed, 3 Mar 2004 16:50:22 +0300 From: Sergey 'DoubleF' Zaharchenko To: zhangweiwu@realss.com Message-Id: <20040303165022.49f2fac9@Hal.localdomain> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.9claws (GTK+ 1.2.10; i386-portbld-freebsd4.8) Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="pgp-sha1"; boundary="Signature=_Wed__3_Mar_2004_16_50_22_+0300_4U3hY_XDJcdpg6wZ" cc: weiwuzhang@hotmail.com cc: questions@freebsd.org Subject: Re: priority-- curious about cpu resouce share X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2004 14:07:57 -0000 --Signature=_Wed__3_Mar_2004_16_50_22_+0300_4U3hY_XDJcdpg6wZ Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: 7bit On Wed, 03 Mar 2004 00:34:37 +0800 "Zhang Weiwu" probably wrote: > Today I did't experiment on {rt|id}prio(1), just to be interesting. I am > trying to understand FreeBSD priority mechenism. IMHO realtime/idle > priority only starvs processes when there is no cpu resource at all. > > To test, I run mpg321 on realtime priority 3, run ppp on realtime priority > 4, a little lower than mpg321, and scp over the ppp tunnel on normal > priority. > > Top(1) shows an average about: > 55.2% user, 0.0% nice, 21.5% system, 12.2% interrupt, 11.1% idle > * mpg321 takes average about 70%; > * ppp is seriously slowed down, it takes about 1.5% (normally 17% on full > speed); > * sshd almost starves; it takes 0.00% (normally 2%) and only transfer > several bytes once several minutes; the otherside scp prompts "stalled". sshd doesn't starve CPU, I guess; as you reach it through ppp, and ppp gets slow, sshd does, too. > I'm the kind of newbie think 11.1% idle cpu time to be free cpu resource, > because I don't have idle process. I wish to know why, as there are still > 11.1% free cpu resource, ppp and sshd doesn't get this share? The most frequent cause is that they don't need the CPU so much as something else, like disk I/O, etc. Could you please post the whole output of top (and a snapshot of systat -vmstat, for example)? > Just to be curious. Thank you. FWIW, splay uses <30% of a P150:) -- DoubleF A jury consists of 12 persons chosen to decide who has the better lawyer. -- Robert Frost --Signature=_Wed__3_Mar_2004_16_50_22_+0300_4U3hY_XDJcdpg6wZ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAReKqwo7hT/9lVdwRAjpTAJ4zHHkhij6jIxrqc3QbfwwGdQqplQCeLXa6 uo+H1o/usgezWoqae1PYMns= =w5Jq -----END PGP SIGNATURE----- --Signature=_Wed__3_Mar_2004_16_50_22_+0300_4U3hY_XDJcdpg6wZ--