Bug#764204: apt-cache calls fcntl() on 65536 FDs
Hi,
thanks for the detailed response.
On 26 May 2015 at 00:31, David Kalnischkies <david@kalnischkies.de> wrote:
> Also, Wheezy has more packages and therefore more data than Jessie.
True. But when disabling index compression and regenerating all
caches, the difference in performance is so large that I don't believe
it is due to the increase in the number of packages alone.
Here's a simple Dockerfile that helps to illustrate the issue:
FROM debian:jessie
RUN rm /etc/apt/apt.conf.d/docker-* && apt-get update -qq
CMD ["/bin/bash", "-c", \
"apt-cache gencaches && time apt-cache show apt > /dev/null"]
Let's forget about my embarassingly slow laptop for a minute and run
this on my fastest machine:
~/apt-benchmarking % sudo docker run --rm jessie-apt
Reading package lists... Done
real 0m0.399s
user 0m0.076s
sys 0m0.312s
If I change "FROM debian:jessie" to "FROM debian:wheezy", apt-cache is
much faster:
~/apt-benchmarking % sudo docker run --rm wheezy-apt
Reading package lists... Done
real 0m0.007s
user 0m0.000s
sys 0m0.004s
With the latest patches by jak, I'm down to 0.012s on jessie:
real 0m0.012s
user 0m0.004s
sys 0m0.000s
Again, ever so slightly slower than wheezy (see your comments
regarding number of packages), but _much_ better than 1.0.9.8. Would
be great to have these changes in jessie.
Increasing APT::Cache-Start does not seem to have any measurable
influence on the runtime for me.
> It's also not so much what apt code does, but what code does who uses
> libapt.
Right, good point.
Again, thanks for the fix!
Best,
Sebastian
Reply to: