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

Re: Reducing apt's memory footprint (on small boxes)



Luke Kenneth Casson Leighton wrote...

> not being funny or anything: i appreciate the dependencies have to be kept
> exceptionally low, but why is noone thinking in terms of modifications to
> apt that do not require the package indices to be in-memory?

The apt code already is quite complex and changing the data handling is
not a trivial change. So I doubt the apt maintainers are happy to
implement such a feature for a - let's be honest - very small group of
users who are interested in it. Also I expect this to result in way more
disk activity, so running apt will consume even more time than before.

Another idea I found however: Have the list of desired packages in the
apt configuration, so when downloading the indexes and writing them to
/var/lib/apt/lists, all other stanzas are dropped, don't cosume memory
and so on. That should be a rather small change¹, I might give it a try
next days.

> i remember having live-running x86 systems 15 years ago that i could not
> upgrade because this was a problem even back then.  surely it has occurred
> to someone that whatever reductions are done now by splitting archives will
> only stave off inevitable increases that will hit once again in a few years?

In my perception the indexes grow way slower than the memory of
machines, and I'm too lazy now to check for the releases of the past
twenty years :)

So the straightforward "solution" was to define 1 Gbyte RAM as to
minimal memory requirement for any Debian system. Way less work, just
creates some doorstoppers while most people don't even notice.

> it may even turn out to be the case that using a minimalist database or
> key-value store actually *speeds up* package lookups and saves time even on
> systems with larger amounts of memory.

These are ideas to discuss with the apt folks over a beer at a (real
life) DebConf. Well, perhaps next year we'll have one again.

> options i would be investigating would be sqlite, datadraw and lmdb.

From my experience: Only if linked in statically. Had the joys once of a
broken sqlite, resulting in croaking aptitude.

    Christoph

¹ And I wasn't too surprised to learn apt already supports this. There
  document at `/usr/share/doc/apt/examples/configure-index` has a lot of
  gems.

Attachment: signature.asc
Description: PGP signature


Reply to: