Re: Slow Man
On Mon, Apr 01, 2002 at 10:40:06PM -0500, Brian Victor wrote:
> My "man" command takes an inordinately long time to run:
>
> %time man foo
> No manual entry for foo
> man foo 0.01s user 0.02s system 0% cpu 21.026 total
>
> strace shows the process pausing for almost a full second at each
> _newselect() call (the below occurs 21 times for a nonexistent man page):
>
> open("/var/cache/man/oldlocal/index.bt", O_RDONLY) = 3
> fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
> fstat(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
> read(3, "", 512) = 0
> close(3) = 0
> _newselect(0, 0, 0, 0, 0x7ffff488) = 0
[Cc'd because I'm resurrecting an oldish thread.]
I've finally tracked this down, thanks to running into it on one of my
own systems. I bet your /var/cache/man/oldlocal/index.bt is 0 bytes
long; this causes libdb2 to think that another process is writing to it
but hasn't managed to write out the metadata page yet, and therefore to
sit and wait for a few seconds in case the situation improves. Since
this behaviour is totally inappropriate for man, I've implemented a
workaround that manually ignores any zero-length databases.
If /var/cache/man/oldlocal/index.bt is still zero-length, then you can
work around this for now by just removing it.
Sorry for the delay in figuring this out.
Cheers,
--
Colin Watson [cjwatson@flatline.org.uk]
--
To UNSUBSCRIBE, email to debian-powerpc-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: