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

Re: dpkg --smallmem has a larger footprint than --largemem



Adam Heath writes ("dpkg --smallmem has a larger footprint than --largemem"):
> So, in summary, dpkg will detect that it is on a low memory system,
> but end up using more memory(this amount is equal to du *.list).

I haven't checked whether your change is correct, but it might well
be.  But, I want to point out what the purpose of the --smallmem
option is.  It is not designed to use less VM in total, but rather to
reduce the working set.  The memory management in dpkg depends on the
fact that we have a good VM system and enough swap, and on the fact
that dpkg isn't long-running.  The idea is that the unused memory ends
up sitting in swap but not in RAM.

However, the hash-based implementation you get with --largemem,
although it is a more efficient data structure, has a working set
nearly as big as the whole list of files.  The --smallmem only needs
to keep in core those nodes which refer to the directories being
processed.

This may have been obvious, but I wanted to spell it out.

Ian.



Reply to: