From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-user+bounces-96695-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1MFL72-0006H8-Ag
	for garchives@archives.gentoo.org; Sat, 13 Jun 2009 04:45:04 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 9BD7EE0491;
	Sat, 13 Jun 2009 04:45:02 +0000 (UTC)
Received: from mail-gx0-f207.google.com (mail-gx0-f207.google.com [209.85.217.207])
	by pigeon.gentoo.org (Postfix) with ESMTP id 77496E0491
	for <gentoo-user@lists.gentoo.org>; Sat, 13 Jun 2009 04:45:02 +0000 (UTC)
Received: by gxk3 with SMTP id 3so11283392gxk.10
        for <gentoo-user@lists.gentoo.org>; Fri, 12 Jun 2009 21:45:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:mime-version:received:in-reply-to:references
         :date:message-id:subject:from:to:content-type
         :content-transfer-encoding;
        bh=/IIwg3Bk6MNTpJGHA9WPrY7+DqAqpp4XmU1REvD02Yk=;
        b=djA2fqMCUgyvLEgSdMZ1qujexUfMBbqXKyKXuxpuyZFoedBISMRFUI3AhsIywwR1hi
         lP8MAbMm62YphVYGJIN93L75KAGEB2p3vs602y1kDR86mA+Gvfqi85hQo/Xz/HygDgMd
         w++G+aFVJap9l+ERdoobWeyyBP57OOu/uHipo=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :content-type:content-transfer-encoding;
        b=XFZNUOeLEuzaN3toI85AIa3325UKbzCIrRsTFaFhtYSvDLLkT1mN0vKRqBqbm2LiWQ
         DgMwdFq3kmNGqG4vaT9gSp2ok6ZQqkTPNVpEHEIfGFiLmgDbchAdPftP3x8BON0CKvBX
         OisecLWF77p8MDgJYjxh4HCXjzUlVXd220KOA=
Precedence: bulk
List-Post: <mailto:gentoo-user@lists.gentoo.org>
List-Help: <mailto:gentoo-user+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-user.gentoo.org>
X-BeenThere: gentoo-user@lists.gentoo.org
Reply-to: gentoo-user@lists.gentoo.org
MIME-Version: 1.0
Received: by 10.90.94.2 with SMTP id r2mr1603259agb.115.1244868302138; Fri, 12 
	Jun 2009 21:45:02 -0700 (PDT)
In-Reply-To: <20090613103056.552dc565@coercion>
References: <49bf44f10906121602x6b0cf20rfe2731edfdf7d205@mail.gmail.com>
	 <20090613103056.552dc565@coercion>
Date: Fri, 12 Jun 2009 21:45:02 -0700
Message-ID: <49bf44f10906122145k327c03c3jb99731ca1fe818cb@mail.gmail.com>
Subject: Re: [gentoo-user] Prioritizing mpd
From: Grant <emailgrant@gmail.com>
To: gentoo-user@lists.gentoo.org
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Archives-Salt: baafde9b-38de-4f2c-a156-f9d66c381fbc
X-Archives-Hash: 3465925b1d575919faf50a4bf37c0f20

>> When I use the medium quality libsamplerate resampler with mpd, my CPU
>> is around 15% and all is well. =A0When I try to use the best quality
>> resampler, the CPU stays around 99% and the sound frequently falls
>> apart. =A0Can I give mpd CPU priority?
>
> Yes, it's usually done via nice/renice commands:
>
> =A0renice -n -10 -p `pgrep mpd`
>
> You can tune it's priority up to -20 (most real-time priority).
>
> I'd suggest looking at load-average it generates ("top" shows it, at the
> top)) first.
> After running mpd for 15 minutes or so, if any of the three (5/10/15)
> will go above number of physical CPU cores you have (and that's
> probably the case if you see full load at any given time), tuning it's
> priority up will make the rest of the system extremely sluggish, since
> mpd won't let any other process to execute and just doing "ls" may take
> ages, not to mention whole X operation...

Thanks Mike.  I tried:

renice -20 -p `pgrep mpd`

but my Athlon 2.2Ghz still can't handle it for more than a few
seconds.  I don't have SMP enabled because of a bug in madwifi, and
I'm hoping when I get that fixed I'll be able to run the best
libsamplerate resampler.  Any other ideas for making this work?

- Grant