[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: debian-trivia



On Mon, 2003-01-06 at 04:07, Yven Leist wrote:
> On Monday 06 January 2003 09:41, Alexander Hvostov wrote:
> > On Sun, 2003-01-05 at 20:35, Steve M. Robbins wrote:
> > > Running "dselect" on that machine is an exercise in patience, let me
> > > tell you ...
> >
> > Simple solution: don't run dselect. ;) Perhaps some of the APT
> > front-ends are faster. Is anything else slow?
> 
> In my experience the biggest problem on low-end machines is simply dpkg, for 
> instance on my 100Mhz Cyrix with 24MB RAM and approximately 1900 packages 
> (rsynced from my main machine) it needs almost 50MB in the "reading packages" 
> stage which causes the machine to swap for many hours(!), making it basically 
> impossible to install packages via dpkg. (in this case it's not really that 
> problematic, since the machine serves no other purpose than backups, and if 
> it did it certainly would not even have a third of the packages it has now, 
> which is probably where the memory consumption stems from.)

Perhaps it's high time dpkg received some serious optimization. The way
in which the package control info is stored and processed is horribly
inefficient. Here's some suggestions:

- Rather than storing data for each and every package in the single file
'/var/lib/dpkg/{status,available}', store each package's data in its own
file '/var/lib/dpkg/{status,available}/foo'.

- Store frequently accessed control fields from status/available in a
cache (Berkeley db or some such) for fast access. The cache is, of
course, rebuilt if deleted or /var/lib/dpkg/{status,available}/* changes
(as happens with 'dselect update').

- Store a database of files on the filesystem and the packages they
belong to in a cache, like above.

That should be a good start. Anyone care to comment?

Alex.

-- 
PGP Public Key: http://aoi.dyndns.org/~alex/pgp-public-key

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS d- s:++ a18 C++(++++)>$ UL+++(++++) P--- L+++>++++ E---- W+(+++) N-
o-- K+ w--- !O M(+) V-- PS+++ PE-- Y+ PGP+(+++) t* 5-- X-- R tv b- DI
D+++ G e h! !r y
------END GEEK CODE BLOCK------

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: