Many times I find myself re-nice-ing services on server and desktiop boxes after startup. I.e. I renice the interactive stuff to a higher CPU priority and the background stuff to a lower to achieve greater responsiveness. How about adding support for that in general, i.e. in every init script? Since the init scripts support reading config variables from /etc/conf.d/$name_of_init_script it should be easy to support a generic $NICE=[-20 .. 19] variable in /etc/conf.d/$name_of_init_script which does exactly that automatically on service startup. Those init script's which use start-stop-daemon could add a "--nicelevel $NICE" while the others could just prepend a "/usr/bin/nice -n $NICE". FWIW /etc/init.d/mysql does that already, although in a more complicated fashion. We could take that one level further and also add support for ionice on newer kernels. It can enhance the felt system responsiveness a great deal. This is discussed in the forums too: http://forums.gentoo.org/viewtopic.php?p=5008550#5008550 Reproducible: Always Steps to Reproduce:
start-stop-daemon in OpenRC already checks the SSD_NICELEVEL env var. This means you can do this in /etc/conf.d/foo export SSD_NICELEVEL=19 or globally in /etc/rc.conf
That's great news. Unfortunately openRC is still masked and I won't migrate all my servers yet. According to [1] it seems that openRC is supposed to replace the current init scripts in the future. Does anyone have an update on that entry (dated 11/12/2007) or knows if that is still the current plan? [1] http://www.tuxmachines.org/node/21902
not worth backporting as we already designed this into openrc