From: Alan McKinnon <alan.mckinnon@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Prioritizing mpd
Date: Sat, 13 Jun 2009 10:54:19 +0200 [thread overview]
Message-ID: <200906131054.19583.alan.mckinnon@gmail.com> (raw)
In-Reply-To: <20090613103056.552dc565@coercion>
On Saturday 13 June 2009 06:30:56 Mike Kazantsev wrote:
> On Fri, 12 Jun 2009 16:02:00 -0700
>
> Grant <emailgrant@gmail.com> wrote:
> > When I use the medium quality libsamplerate resampler with mpd, my CPU
> > is around 15% and all is well. When I try to use the best quality
> > resampler, the CPU stays around 99% and the sound frequently falls
> > apart. Can I give mpd CPU priority?
>
> Yes, it's usually done via nice/renice commands:
>
> renice -n -10 -p `pgrep mpd`
>
> You can tune it's priority up to -20 (most real-time priority).
Don't be surprised if it doesn't do much though.
Nice values have always been little more than a hint in Unix systems, the
kernel is free to do with it whatever it wants, including completely ignoring
your hint.
To a large degree, Linux does exactly that - ignore the hint. It does have an
effect, a small one, and usually much smaller than the user expects. Nice is
an old, antiquated, obsolete and just plain mostly useless way to enforce
scheduling, entirely unsuited to modern desktops. The better way is to select
a scheduling algorithm that better suits your needs and let the kernel figure
out how to give you what you want (it knows MUCH more about how to do it than
you do).
Or perhaps the OP is using a buggy peice of code. CPU utilization is also a
notoriously inaccurate metric that does not mean what people tend to think it
means.
This information is not in the man pages.
It's on lkml and in the code ;-)
--
alan dot mckinnon at gmail dot com
prev parent reply other threads:[~2009-06-13 8:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-12 23:02 [gentoo-user] Prioritizing mpd Grant
2009-06-13 4:30 ` Mike Kazantsev
2009-06-13 4:45 ` Grant
2009-06-13 5:11 ` Mike Kazantsev
2009-06-13 13:31 ` Grant
2009-06-13 16:32 ` Mike Kazantsev
2009-06-13 8:54 ` Alan McKinnon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200906131054.19583.alan.mckinnon@gmail.com \
--to=alan.mckinnon@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox