--- slocate.orig 2007-05-10 21:35:50.789166970 +0200 +++ slocate 2007-05-10 21:39:33.789875056 +0200 @@ -2,11 +2,22 @@ if [ -x /usr/bin/slocate ] then + # If the schedutils package is installed and IO prioritization is + # available, run updatedb with minimum priority to reduce performance + # impact. See ionice(1) for more information on IO priorities. + + if [ -x /usr/bin/ionice ] + then + IONICE="/usr/bin/ionice -c3" + else + unset IONICE + fi + if [ -f /etc/updatedb.conf ] then - /usr/bin/updatedb + $IONICE /usr/bin/updatedb else - /usr/bin/updatedb -f proc + $IONICE /usr/bin/updatedb -f proc fi chown root.slocate /var/lib/slocate/slocate.db fi