For the longest time I have a huge performance issue in my Ubuntu VM, as every day at some time the cpu would be at a 100%, pointing to the fuse process that mounts the shared directories under /mnt/hgfs
as the problem. To find out what was causing it I did
$ sudo lsof /mnt/hgfs/
[sudo] passord for myuser:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
find 20811 nobody 4r DIR 0,45 327680 1644542 /mnt/hgfs/SharedData/Users/myuser/Pictures/Lightroom/Main Previews.lrdata/9
Followed by finding the parent of that find
process:
$ sudo pstree -s -p 20811
systemd(1)───anacron(20328)───sh(20470)───run-parts(20472)───locate(20715)───updatedb.findut(20720)───updatedb.findut(20728)───su(20786)───sh(20809)───find(20811+
So it was a cron job that caused this by invoking updatedb
. That's fine, I know updatedb
has a config file at /etc/updatedb.conf
and so I added /mnt/hgfs
to the PRUNEPATHS
variable and thought that would be it.
Turns out it was not. The same problem kept coming up.
OK, so grepping the /etc/cron.*
directories I quickly discovered /etc/cron.daily/locate
, and this time I took a look and discovered the script sets its own custom configuration, including PRUNEPATHS
. It does not seem to consult /etc/updatedb.conf
at all. This seems highly confusing to me. What is the point of a config file that is not used in the daily updates? Now I need to hack a system supplied file for this to work. That seems counter-intuitive and not something I am used to from Ubuntu.
Could someone explain the logic here, alternatively how this was supposed to work?
0 Answers