Thursday 23 May 2019

Re: mlocate - what is it good for?

Hi Jim,

On Wed, May 22, 2019 at 03:51:14PM -0400, jim wrote:

> Seems to me for an individual user such
> as I (my laptop runs Ubuntu 18.04), locate
> and (the cumbersome) find are sufficient.
> To what extent does decision-making balance
> net ops and large system administrators as
> opposed to individual users?

Currently, this is seeded as part of ubuntu-standard, which is common to all
Ubuntu flavors. If the discussion led to a determination that this still
made sense to include by default on desktops but not servers, or vice versa,
we could seed this as part of one Ubuntu flavor or the other.

My own sense is that this is not a server vs desktop thing; there are users
of locate, to be sure, but I believe they are a very small minority on both
desktop and server (small on desktop because the user will generally use the
gui instead; small on server because most server use is not interactive at
the shell). I don't think the benefit of having locate available by default
justifies the daily disk thrashing / energy usage on every Ubuntu machine
everywhere. I think it's not onerous for those who want to use locate to
manually install it the first time they need it on a machine.

But this thread is here to be a sanity check on that opinion, to understand
if the locate db being available by default either affects so many users, or
has so great an impact on some use cases, that we should consider leaving it
enabled by default despite the daily disk usage for everyone not using it.

> On 5/22/19 3:47 PM, Julian Andres Klode wrote:
> > On Wed, May 22, 2019 at 01:19:48PM -0600, Neal McBurnett wrote:
> > > I use mlocate multiple times a day.
> > > Find is way too slow and inconvenient for finding files in a big
> > > set of filesystems, compared to properly configuring mlocate.
> > Specifically, the filesystem must be huge or on a slow medium. It might make
> > sense to move it out of standard and elsewhere, as I don't think it's
> > necessarily needed everywhere, such as laptops.
> >
> > Consider my laptop, fairly standard, 512 GB NVME SSD, about 250G allocated,
> > containing about 1435134 files. mlocate foo takes 1s, find / -mount
> > -name '*foo*' takes about 7-9 secs, or 19 seconds with all mount points
> > (but there is a davfs mount of an internet server, so things might be
> > screwed up a bit).
> >
> > 19s to find something is perfectly workable, also you don't usually
> > find from /, but you have an idea where things are, so it will be much
> > faster.
> >
> > I think mlocate only really makes sense on data storage servers with
> > huge disks, or on machines with HDDs. I therefore do not think the
> > overhead of building the index is warranted for most users. It might
> > make sense to keep mlocate in always-on tasks, like servers, but get
> > rid of it from desktop scenarios.


--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer https://www.debian.org/
slangasek@ubuntu.com vorlon@debian.org