Bugzilla – Bug 13030
remove server priorities less than 0 for Unix builds
Last modified: 2009-07-29 14:59:35 UTC
Version: 7.3.3 - 27044 @ Mon Jun 15 15:12:32 PDT 2009 Hostname: ubsrv1 Server IP Address: 192.168.1.4 Server HTTP Port Number: 9000 Operating system: Debian - EN - utf8 Platform Architecture: i686-linux Perl Version: 5.8.8 - i486-linux-gnu-thread-multi MySQL Version: 5.0.51a-3ubuntu5.4 Total Players Recognized: 1 Ubuntu Linux 8.04 LTS (Linux ubsrv1 2.6.24-24-server) Squeezecenter Server Priority is set and saved in preferences. But the actual nicevalue is not applied to application processes even when restarting server. It stays default 0. The Scanner Priority works fine with the correct nicevalue set in preferences. It's a standard installation without modifications and no plugins installed. Regards Thomas
top will show you the priority. Ross to reproduce.
Easily reproduced, under server settings - advanced - performance there are switches to set the server and scanner priority. Setting these doesn't seem to make any difference when compared to top, even after restarting the system or SC as Th points out. I'm not sure about the scanner process, I'm guessing its just called perl. However the process squeezecenter-s (presumably squeezecenter-server) still shows a PR of 20 and NI of 0, despite my changes to -15. The perl process also shows up with PR 20 NI 0.
Did you try setting it to a positive nice value? You cannot set to < 0 without being root.
Thanks Andy! Selecting a positive number works, sort of. I set priority 12 in SC UI, top shows NI 12 but PR 32?! This remains true after restarting SC and the system. We should probably remove the negative options from the UI, if they will not work. Should I file a separate bug, or reword this one?
OK, so the real bug here is that priorities less than 0 should not be shown on a Unix OS if not root.
Thanks again Andy.
How obvious. SC is running as a unprivileged user and has no rights decreasing the nice level. So you should be careful even showing this option at all, because if you set it to high you are not able to decrease it again (without restart). However it should be possible to increase the priority within the startscript /etc/init.d/squeezecenter as it is initiated by root. I managed to increase the priority by adding the following to the line: start-stop-daemon --start --quiet --nicelevel -8\ # <---- --chuid $SLIMUSER \ --pidfile $PIDFILE \ --exec $DAEMON_SAFE \ --background \ --make-pidfile \ -- \ $DAEMON \ --prefsdir $PREFSDIR \ --logdir $LOGDIR \ --cachedir $CACHEDIR \ --charset=$CHARSET \ $SLIMOPTIONS Thank you.
Moving 7.4 bugs to 8.0.