From owner-freebsd-current@FreeBSD.ORG Fri May 21 00:15:45 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4AE7C16A4CE for ; Fri, 21 May 2004 00:15:45 -0700 (PDT) Received: from hetzner.co.za (lfw.hetzner.co.za [196.7.18.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8780A43D2D for ; Fri, 21 May 2004 00:15:44 -0700 (PDT) (envelope-from ianf@hetzner.co.za) Received: from localhost ([127.0.0.1]) by hetzner.co.za with esmtp (Exim 3.36 #1) id 1BR4DV-0006jn-00; Fri, 21 May 2004 09:13:17 +0200 To: noackjr@alumni.rice.edu From: Ian FREISLICH In-Reply-To: Message from Jon Noack of "Thu, 20 May 2004 21:24:13 EST." <40AD684D.9020200@alumni.rice.edu> Date: Fri, 21 May 2004 09:13:17 +0200 Sender: ianf@hetzner.co.za Message-Id: cc: current@FreeBSD.org cc: Mikhail Teterin Subject: Re: a scheduling question X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Fri, 21 May 2004 07:15:45 -0000 > On 05/19/04 22:34, Mikhail Teterin wrote: > > Here is a top's snapshot from a dual CPU machine. Two lame encoders > > compete for the first CPU, while the total idle time is 35.6%. Why is > > that? Because they are nice? Is niceness really supposed to allow for > > wasted CPU? Thanks! > > I noticed the cdparanoi[a] processes. What is/are the exact command(s) > you are doing? If you are encoding on-the-fly, are you sure the lame > processes are not being limited by the ripping rate? > > It would be best if you could come up with a test case for us to see if > we can reproduce your problem. I posted somthing about this over a month ago which everyone seems to have missed. My particular situation is CPU bound so there really is no excuse for the system being 50% idle (one CPU 100% idle). Here it is again: ============ Subject: ULE on current and CPU afinity. From: Ian Freislich Date: Thu, 04 Mar 2004 09:29:36 +0200 To: freebsd-current@freebsd.org Hi I thought I'd give ULE a spin again since according to Robert Watson and David O'Brien's recents posts it appears that it might not to pessimise my SMP buildworld. I noticed this oddity: dnetc in order to utilize both CPUs forks a child which also processes. SCHED_4BSD seems to be aware that the second CPU is idle and the child or parent (don't really care which) migrates to the second CPU so that all CPU time is occupied on both CPUs. SCHED_ULE doesn't seem to migrate processes to an idle CPU and as a result one CPU in my system is 100% idle. last pid: 677; load averages: 2.06, 1.69, 0.89 up 0+00:09:57 09:22:29 40 processes: 3 running, 37 sleeping CPU states: 0.0% user, 50.0% nice, 0.4% system, 0.4% interrupt, 49.2% idle Mem: 25M Active, 25M Inact, 22M Wired, 56K Cache, 28M Buf, 111M Free Swap: 512M Total, 512M Free PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU CPU COMMAND 624 ianf 139 20 1072K 884K RUN 0 4:00 48.44% 48.44% dnetc 636 ianf 139 20 1072K 884K CPU0 0 3:26 48.44% 48.44% dnetc Do processes have CPU afinity and is that afinity inherited by their children? Is this a wise thing to do since as demonstrated here it is possible that all the CPU hogs may land up on 1 processor thereby pessimising runtime? ============ Ian -- Ian Freislich