From owner-freebsd-stable@FreeBSD.ORG Tue May 27 12:19:10 2008 Return-Path: Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 680441065671 for ; Tue, 27 May 2008 12:19:10 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (unknown [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id BD26E8FC17 for ; Tue, 27 May 2008 12:19:09 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.1/8.14.1) with ESMTP id m4RCJ7k8038125; Tue, 27 May 2008 14:19:08 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.1/8.14.1/Submit) id m4RCJ7Q6038124; Tue, 27 May 2008 14:19:07 +0200 (CEST) (envelope-from olli) Date: Tue, 27 May 2008 14:19:07 +0200 (CEST) Message-Id: <200805271219.m4RCJ7Q6038124@lurza.secnetix.de> From: Oliver Fromme To: freebsd-stable@FreeBSD.ORG, unga888@yahoo.com In-Reply-To: <555870.1659.qm@web57010.mail.re3.yahoo.com> X-Newsgroups: list.freebsd-stable User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.2-STABLE-20070808 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Tue, 27 May 2008 14:19:08 +0200 (CEST) Cc: Subject: Re: sched_ule performance on single CPU X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-stable@FreeBSD.ORG, unga888@yahoo.com List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2008 12:19:10 -0000 Unga wrote: > When open an pdf has two types of scenarios in > FreeBSD: > 1. When X run as a realtime-prio process, X go mad and > swallow up almost all of CPU cycles, making audio > hiccups. That's expected. Running the X server with rtprio is not a good idea. There's no reason to do that. > 2. When X run as a normal-prio process, X behaves well > and rarely gets an audible hiccup. That's good. :-) > Why X behave different under different priority > categories? Isn't this scheduler related? Very simple: Sometimes the X server consumes lots of CPU for a short time. If it runs with rtprio, then no other process gets a chance to execute, so your audio program will starve. My recommendation is to not use rtprio or renice. I think many people who try to use them are making things worse. (In fact I think rtprio and idprio should die.) > I wonder the issue I mentioned, open a pdf while > playback audio, is it a issue on Apple Mac OSX? Could > somebody give some light here who uses an Apple Mac > OSX on this list? OSX has a vastly different kernel, scheduler, I/O system, audio drivers and so on. It's a completely different animal. Have you tried increasing the audio driver's buffersize? It probably helps to alleviate your problem. I think OSX sizes the buffer dynamically (not sure though). Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "When your hammer is C++, everything begins to look like a thumb." -- Steve Haflich, in comp.lang.c++