Your message dated Tue, 17 Aug 2021 17:05:16 +0200
with message-id <[email protected]>
and subject line Closing mlocate bugs
has caused the Debian Bug report #472059,
regarding stats /etc/mtab once per directory scanned
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
472059: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=472059
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: mlocate
Version: 0.19-1
Severity: normal
If you strace updatedb.mlocate, it'll look like this:
stat64("/etc/mtab", {st_mode=S_IFREG|0644, st_size=684, ...}) = 0
lstat64("debian", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
chdir("debian") = 0
lstat64(".", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/etc/mtab", {st_mode=S_IFREG|0644, st_size=684, ...}) = 0
lstat64("po", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fchdir(14) = 0
stat64("/etc/mtab", {st_mode=S_IFREG|0644, st_size=684, ...}) = 0
lstat64("init.d", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/etc/mtab", {st_mode=S_IFREG|0644, st_size=684, ...}) = 0
lstat64("parted_names", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/etc/mtab", {st_mode=S_IFREG|0644, st_size=684, ...}) = 0
I imagine that linux caches most of the stat calls, but 2x system call
overhead just to stat /etc/mtab in between each directory scanned cannot be
good for performance. It is caused, I think, by glibc checking that
its cached /etc/mtab is up-to-date each time a *mntent() function is
called.
If I set PRUNE_BIND_MOUNTS="no" in updatedb.conf, the mtab stats go
away. There is a measurable speed change, seems to be around 10 seconds
based on the following best run times out of three:
yes: 2.27user 8.96system 7:37.63elapsed 2%CPU
no: 2.04user 8.76system 7:26.19elapsed 2%CPU
So perhaps it would be worth caching the mntent values in updatedb?
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.24-1-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages mlocate depends on:
ii adduser 3.107 add and remove users and groups
ii libc6 2.7-10 GNU C Library: Shared libraries
mlocate recommends no packages.
-- no debconf information
--
see shy jo
signature.asc
Description: Digital signature
--- End Message ---
--- Begin Message ---
Hi,
As of bookworm, mlocate no longer exists in Debian and is replaced by plocate.
There's still an “mlocate” package, but it is only a transitional package
to install plocate (and convert over the old database).
Thus, I'm closing a series of bugs related to mlocate that I believe are
either:
1. Already fixed in plocate, or
2. Related to implementation bugs in mlocate that are highly unlikely
to reappear in plocate (which only shares configuration parsing code,
no other internals).
If you believe this is in error and the bug is relevant for plocate,
please reopen it with a message as of why that is the case (and reassign it
to plocate). Thanks!
/* Steinar */
--
Homepage: http://www.sesse.net/
--- End Message ---