Re: Slow package database
On Fri, Mar 30, 2007, Christoph Haas wrote:
> It appears like apt-get/aptitude/dpkg dealing with the list/database of
> installed packages is terribly slow at times.
I think dpkg spends a lot of time reading all /var/lib/dpkg/info/*.list
files. These are not big and this is typically in cache between dpkg
runs, and I think this is the reason that cold dpkg runs are very very
slow.
I tested by stracing dpkg -i on a small .deb after sync && echo 3 >
/proc/sys/vm/drop_caches, and from a 24 seconds run, 22 seconds were
spent reading *.list files.
(A subsequent run took in the order of 1 second.)
Perhaps someone with elite dpkg skillz will implement some form of
cache for these? :-)
NB: I have 227524 files in 1801 packages.
--
Loïc Minier
Reply to: