On Mon, Oct 6, 2014 at 12:34 PM, martin f krafft <[email protected]> wrote: > Package: apt > Version: 1.0.9.2 > Severity: normal > > Wondering why apt-cache show takes 3 seconds to run, I used strace > and found the following: > > 21497 12:30:35.549259 getrlimit(RLIMIT_NOFILE, {rlim_cur=64*1024, > rlim_max=64*1024}) = 0 > 21497 12:30:35.549333 fcntl(3, F_SETFD, FD_CLOEXEC) = 0 > […] > 21498 12:30:38.760534 fcntl(65535, F_SETFD, FD_CLOEXEC) = -1 EBADF (Bad file > descriptor) > 21498 12:30:38.760545 getrlimit(RLIMIT_NOFILE, {rlim_cur=64*1024, > rlim_max=64*1024}) = 0 > > Is it really necessary to close 64k file descriptors?
True. It would save time to scan /proc/self/fds and only do this for the fds listed there. -- Julian Andres Klode - Debian Developer, Ubuntu Member See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/. -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

