Saturday 25 May 2019

Re: mlocate - what is it good for?

Hey there,

Steve Langasek wrote:
>Little Girl wrote:

>> Just curious, but how bad (or excessive or whatever) is this disk
>> thrashing / energy usage that you mentioned?

>It is difficult to answer this in aggregate because the data is hard
>to come by, and it definitely varies by type of disk and by number
>of files on the system.

Okay.

>You can get a sense of the effect on your own system by running e.g.
>'sudo iostat /dev/sda 30' in one window and
>'sudo /etc/cron.daily/mlocate' in another. On my otherwise-idle
>desktop with an SSD, that only takes 3 seconds to complete and it
>only reads a few hundred MB of data off the disk (in order to open
>every directory and stat every file).
>
>I only have about 1.5 million files on my disk.

Interesting.

>On machines with a lot more files; or machines with spinning disks
>instead of SSDs; or heavily loaded servers, the impact is bound to
>be much higher that 3 seconds of I/O.

That makes sense.

>And in a cloud environment running many Ubuntu instances on top of
>the same storage set, the fact that this job is kicked off by cron
>simultaneously on all instances can have a much more noticeable
>impact on server performance. (Indeed, the daily cron jobs causing
>noticeable I/O storms is precisely what led us to examine what cron
>jobs we have and question their utility.)

Thank you for the detailed explanation. Your approach of no longer
providing locate by default, but leaving it in the package manager
for anyone who might want it, seems like the perfect solution.

--
Little Girl

There is no spoon.

--
ubuntu-devel mailing list
ubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel