any chance/interest in seeing the script that spawns slimserver on
unix-ish platforms do so optionally with a negative nice value? gui
configurable would be nice but even a hard-coded '-1' would do.

processes with fairly constant i/o (like slimserver) will be prioritized
lower than more interactive processes. normally this works fine,
interactive processes yield a lot and slimserver still gets what it
needs.  however, a process that goes from being interactive to spinning
cpu will initially get more time slices. example: a dvd encoding tool
that goes from a configuration mode to churning through the latest codec.
eventually they'll both be scheduled fairly, but by that time the audio
has already skipped. simpler example: start a compile of something with
a bunch of files (extra fun: use 'make -j').

because i'm truely lazy, i just run a root crontab that renices slimserver
(and eyetv) periodically. it's easier than re-editing the various startup
scripts after upgrades. i can still run slimserver & eyetv reniced as
an unprivileged user with no change to either. regardless of how
right/wrong i am with the scheduler theory: i do see a reduction in the
number of different workloads that can cause a stall with slimserver
running renice'd negatively.

the most straightforward change would to execute sudo with a user supplied
nice value defaulting to zero. nice values are inherited through sudo's
execve().

a slightly more complicated way to solve this would be to introduce a
pidfile. using a pidfile makes it easy to renice after startup. as a
bonus, it is more precise for checking if slimserver is running in the
[re]start/stop scripts. the existing use of ps|grep has a few not-so-subtle
races.

i'd prefer someone who could do the corresponding gui change would
champion this. perl and i rarely get along. if there's interest, i'll
take a shot at drafting a patch. if not, i'll just continue to carry my
private little hack.

-- bill



_______________________________________________
Discuss mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/discuss

Reply via email to