I am attempting to set nice and ionice for rsync via xinetd. I am running Fedora 16. The reason I would like to use these values is to reduce the rsync process to an idle state so other processes run unaffected.
I have tried to use /etc/default/rsync
to set nice and ionice values, but it looks like these are not working for me. The rsync process is always started with a nice value of 0, even when I set it to 19. Do these settings work in xinetd? Is there another way to nice rsync via xinetd?
Here are my config files:
/etc/rsync.conf:
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
[share]
<shares go here>
/etc/xinetd.d/rsync:
service rsync
{
disable = no
flags = IPv6
socket_type = stream
wait = no
user = root
server = /usr/bin/rsync
server_args = --daemon
log_on_failure += USERID
}
/etc/default/rsync:
RSYNC_ENABLE=inetd
RSYNC_OPTS=''
RSYNC_NICE='19'
RSYNC_IONICE='-c3'
Best Answer
Thanks to pointers by sr_, I seem to have a solution.
In
/etc/xinet.d/rsync
I added/changed these lines:To use
ionice
, I needed to change the server value toionice
instead ofrsync
. And then addrsync
to the arguments section so thationice
launches it.