Tuesday, November 20, 2012

Updatedb

Updatedb tends to run immediately after I've logged in. This usually will cause almost everything to come to a standstill. One of the first thing that I do when I'm logged into my desktop is to open Firefox and OpenOffice and when updatedb runs at the same time, everything will proceed at an excruciating and jerky pace for a few minutes. To prevent this from happening:

1. Edit /etc/mlocate-cron.conf

Inside the file:


# nice value to run at: see -n in nice(1)
NICE="19"

# ionice class to run at: see -c in ionice(1)
# you have to install sys-apps/util-linux manually
IONICE_CLASS="3"

# ionice priority to run at: see -n in ionice(1)
IONICE_PRIORITY="7"

#######

The default value for IONICE_CLASS in this file is 2. I changed it to 3 so that updatedb will only run when the cpu is idle.

No comments: