From owner-freebsd-current@FreeBSD.ORG Wed Jan 2 04:56:17 2008 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F00616A418; Wed, 2 Jan 2008 04:56:17 +0000 (UTC) (envelope-from jroberson@chesapeake.net) Received: from webaccess-cl.virtdom.com (webaccess-cl.virtdom.com [216.240.101.25]) by mx1.freebsd.org (Postfix) with ESMTP id 30E1913C442; Wed, 2 Jan 2008 04:56:17 +0000 (UTC) (envelope-from jroberson@chesapeake.net) Received: from [192.168.1.107] (cpe-24-94-75-93.hawaii.res.rr.com [24.94.75.93]) (authenticated bits=0) by webaccess-cl.virtdom.com (8.13.6/8.13.6) with ESMTP id m024thIF072050; Tue, 1 Jan 2008 23:55:44 -0500 (EST) (envelope-from jroberson@chesapeake.net) Date: Tue, 1 Jan 2008 18:56:59 -1000 (HST) From: Jeff Roberson X-X-Sender: jroberson@desktop To: Kris Kennaway In-Reply-To: <4743342A.10507@FreeBSD.org> Message-ID: <20080101185451.S957@desktop> References: <20071120141403.GE81260@comp.chem.msu.su> <4743342A.10507@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Yar Tikhiy , freebsd-current@FreeBSD.org Subject: Re: SCHED_ULE & niceness / rtprio X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 02 Jan 2008 04:56:17 -0000 On Tue, 20 Nov 2007, Kris Kennaway wrote: > Yar Tikhiy wrote: >> Hi all, >> >> SCHED_ULE seems to do an unfair job to processes with low niceness >> or with real-time priority. Here are my observations: >> >> A few days ago I noticed that music (played by Totem, Gnome's default >> player) would pause for a fraction of second each time I did something >> in X/Gnome, such as switched between windows, clicked on a link in >> the web browser, etc. Then I found that music was jerky only if >> the player ran with a negative niceness or a real-time priority: >> As soon as I returned it to niceness 0 and normal priority, sound >> became totally seamless notwithstanding my activity in X. >> >> The approximate value required for the effect to appear was niceness >> as low as -5 or RT priority as high as 10; niceness -1 or rtprio 1 >> wasn't enough. >> >> Curious, I substituted SCHED_4BSD for SCHED_ULE in my otherwise >> GENERIC kernel, and the jerkiness of sound was gone irrespective >> of the niceness or RT priority of the player. >> >> To rule out other possible causes, I also tried kernels with SCHED_ULE >> but without SMP or without debug stuff (INVARIANTS+WITNESS), but >> the issue was there in both cases, unlike in the case of SCHED_4BSD. >> >> Of course, X+Gnome+stuff isn't the clearest environment for debugging >> schedulers, but multimedia apps are rather sensitive to scheduling >> quality. This case should be rather obvious: When I click in an >> inactive window, some processes are woken that have been idle. >> After that the high-priority player isn't scheduled long enough for >> the hardware audo buffer to drain, although it would be scheduled >> soon if it had normal priority. >> >> Did I hit a known issue? > > Others have reported it, but I don't know if Jeff has had time to investigate > yet. > I tried to reproduce this recently by running mplayer with various nice values while scrolling around a lot in firefox. This is on a 1.4ghz machine. I didn't encounter any problems. If anyone is having nice related problems with ULE I'd love a simple test case that shows it. I tried installing boinc which was mentioned in other threads but had trouble contacting the servers and getting it setup. Something simpler would be very beneficial. Thanks, Jeff > Kris >