John Goerzen <[EMAIL PROTECTED]> writes:

> I was upgrading packages on my 64 meg system today ant noticed:

>   PID USER     PRI  NI  SIZE  RSS SHARE STAT  LIB %CPU %MEM   TIME COMMAND
> 24785 root      18   0 12680  12M   568 S       0  0.1 20.0   5:36 dpkg

> Yes, that's almost 13 megs used by dpkg, and 20% of my RAM.

> That also is 4 megs more than the TOTAL amount of RAM in some computers I
> work with.

> So...why must dpkg use almost as much memory as XFree86 itself, and MORE
> than Netscape does at times?

> Not only that, but it is hideously slow even on current computers.  My
> suggestion: store the databases in a DBM format of some sort instead of
> plain text. 

IMHO, dpkg should be using a DBM database for file -> package lookups
and perhaps for the "status" and "available" caches too.  (I believe
apt does something like this for "available".)

(I presume that dpkg actually does use hash tables internally, but it
recalculates that 12MB of data everytime it starts up, which, IMHO, is
not very efficient.)

The startup time and memory usage is just not worth any benefits
gained from using a few thousand text files.  

And the text version is still prone to severe corruption.  Mine was
scrambled the other day when I upgraded the modutils package running a
2.1.x kernel - the machine locked up, and when I rebooted and tried to
install more packages, dpkg mixed up a bunch of scripts and .list
files.


Steve
[EMAIL PROTECTED]


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to