Speed up the creation of the locate database with mlocate
Submitted by Bram Schoenmakers on 9 December, 2007 - 00:41.
Today I stumbled upon something interesting: the mlocate package. It's a replacement for the more traditional slocate package which offers the locate and updatedb commands for quick file lookup.
Quoting the README:
mlocate is a locate/updatedb implementation. The 'm' stands for "merging":
updatedb reuses the existing database to avoid rereading most of the file
system, which makes updatedb faster and does not trash the system caches as
much.
updatedb reuses the existing database to avoid rereading most of the file
system, which makes updatedb faster and does not trash the system caches as
much.
Interesting, because the intensity of the updatedb command in slocate annoyed me a bit. Let's see how well this one performs in the future.
I'm not sure of the availability, though. Gentoo just offered an ebuild which installs just fine after you de-installed the slocate package first. For Debian (-oriented distributions, like Ubuntu/Kubuntu) it appears to be a little more problematic it seems. But I don't know what the exact status is on that.