Re: apt package database performance
On Sun, Apr 17, 2005 at 11:14:57AM +0100, Lee Braiden wrote:
> Maybe my system just needs defragged, but installing or even removing single
> packages seems to involve lots of time and disk activity these days, compared
> to what it used to take. Given the text-based nature of apt's package
> database etc., I wouldn't be surprised though, if it scales horribly.
>
> Anyone know how it actually does scale? Was it designed to cope with the
> number of packages in sid now, and are there any discussions going on about
> optimising it?
With your description, I can ot tell much. But recent growth of debian
package can be the source of the problem. But here is my guess what is
happening:
N = # of packages in archive
n = # of packasgs on your system
Although some hash is used, everytime you add package, it scan's
database looking for packages in dependency. ~ n*N, i.e., o(N^2) time
Also there are many unzip activity to install package. Large file
proccessing with CPU intensive calcuration. If your memory is not
enough, slashing may be occuring.
I feel slow thesedays even with P4-2GHz. Sigh.
Osamu
Reply to: