From owner-freebsd-questions@FreeBSD.ORG Tue Mar 2 08:34:38 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 731B116A4CE for ; Tue, 2 Mar 2004 08:34:38 -0800 (PST) Received: from hotmail.com (law11-f53.law11.hotmail.com [64.4.17.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 53D9743D1D for ; Tue, 2 Mar 2004 08:34:38 -0800 (PST) (envelope-from weiwuzhang@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 2 Mar 2004 08:34:37 -0800 Received: from 218.85.102.10 by lw11fd.law11.hotmail.msn.com with HTTP; Tue, 02 Mar 2004 16:34:37 GMT X-Originating-IP: [218.85.102.10] X-Originating-Email: [weiwuzhang@hotmail.com] X-Sender: weiwuzhang@hotmail.com From: "Zhang Weiwu" To: questions@freebsd.org Date: Wed, 03 Mar 2004 00:34:37 +0800 Mime-Version: 1.0 Content-Type: text/plain; charset=gb2312; format=flowed Message-ID: X-OriginalArrivalTime: 02 Mar 2004 16:34:37.0931 (UTC) FILETIME=[40F65BB0:01C40074] Subject: priority-- curious about cpu resouce share X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: zhangweiwu@realss.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2004 16:34:38 -0000 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". 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? Just to be curious. Thank you. _________________________________________________________________ 与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn