-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add nice and ionice #97
base: main
Are you sure you want to change the base?
Conversation
I needed access to nice and ionice levels on my Debian rsync server. Templatized the defaults file so that these were accessible. Also added nice to xinetd service and changed the server to ionice and the server args to the ionice level followed by the rsync path and previously existing arguments.
I needed access to nice and ionice levels on my Debian rsync server. Templatized the defaults file so that these were accessible. Also added nice to xinetd service and changed the server to ionice and the server args to the ionice level followed by the rsync path and previously existing arguments.
This doesnt't work since wheezy wich is already oldstable since rsync is started with a native systemd unit. Actually the content of the default file seems to be completly ignored there?! |
You're right. I was testing with Ubuntu 14.04 which has both a sysvinit and a systemd init script and it appears to be using the init.d script over the systemd. This was causing the nice and ionice settings to be loaded. I'll work on the systemd unit. |
Had to modify the ionice parameter since IOSchedulingClass takes 0-3 or the corresponding names while xinetd (ionice) and rsync defaults both take -c[0-3]. Removed the -c from the parameter default value and added it to the xinetd service and defaults template. Since systemd isn't available on all systems, I added an exec to check for the /etc/systemd/system directory before this module creates the rsync.service.d directory and the (io)nice conf files. |
Hmm:
from https://www.freedesktop.org/wiki/Software/systemd/FrequentlyAskedQuestions/ That is why I said:
Are you really sure your Ubuntu 14.04 prefers the init script over the unit? |
Instead of the Exec i would rather make a platform based switcharoo eg like done here https://github.com/deric/puppet-zookeeper/blob/master/manifests/params.pp |
I rewrote the exec into a platform based massive case statement though I'm not certain I like that better as it won't catch someone who's installed systemd on a system that doesn't come with it by default. Ubuntu 14.04 appears to include systemd service files in it's packages (likely upstream packagers getting ready for the changeover or including both to be safe) but is running upstart and thus ignores those service files altogether. |
|
I needed access to nice and ionice levels on my Debian rsync server.
Templatized the defaults file so that these were accessible. Also
added nice to xinetd service and changed the server to ionice and the
server args to the ionice level followed by the rsync path and
previously existing arguments.