Ubiquity installer not usable on machines with <= 256 MB of RAM

Matt Zimmerman mdz at ubuntu.com
Tue May 9 18:52:18 BST 2006


On Tue, May 09, 2006 at 05:55:34PM +0100, Colin Watson wrote:
> On Mon, May 08, 2006 at 04:07:30PM -0700, Matt Zimmerman wrote:
> > On Tue, May 09, 2006 at 12:59:22AM +0200, Krzysztof Lichota wrote:
> > > Polish. I think locales could be pre-generated as I don't see localedef
> > > do much more than generating LC_* files in /usr/lib/locale/$LANG.
> > 
> > They use an excessive amount of space when they are pregenerated.
> 
> I'm sort of with Krzysztof on this, actually. localedef takes 50MB of
> memory to generate practically any UTF-8 locale, as far as I can see
> (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=185010). This is an
> unreasonable amount of additional memory to require during installation;

I'm not at all opposed to shipping locales pre-generated in the long term,
but if we're going to address this probelm for Dapper, we should be
conservative in our approach.

It seems worthwhile to investigate why localedef is using what seems to be
an excessive amount of memory to do its job, since if that is fixable,
the fix is likely to be much more isolated.

> It is a fair bit of extra space, though. I generated all UTF-8 locales
> for all languages that the installer supports, and found:
> 
>   $ find /usr/lib/locale -type f | xargs cat | gzip -c | wc -c
>   30358457

find /usr/lib/locale -type f | xargs -n1 gzip -c |wc -c

should better approximate the space they might occupy on the live CD.  The
difference could be significant at that scale.

> Our baseline figure for the current Ubuntu i386 live CD (from
> /rofs/usr/lib/locale) is 7197824. We don't have space on all our CD
> images for this sort of increase. However, it's possible to cut down on
> this a bit. If I generate only the locales for the default country (so
> for example de_DE.UTF-8 but not de_AT.UTF-8; pt and zh excepted from
> this because in those cases they're actually different languages, and en
> excepted because all those locales are already generated), that brings
> it down to 17MB. If I further remove all the en_* locales apart from
> en_GB.UTF-8 and en_US.UTF-8, that brings it down to 14MB.
> 
> I feel a 7MB size penalty on the CD images, and a small amount of code
> in Ubiquity/localechooser to make sure we only ever generate locales for
> the default country on the running live CD, might well be worth it to
> avoid a 50MB memory hit (assuming there's nothing else spawned by
> Ubiquity that's quite so memory-hungry). We would need a small amount of
> judo to make sure that the real locale is generated in the installed
> system eventually, but we can install a temporary init script or
> something to do that.

At what point do you propose to pre-generate them?  During the package build
or the livefs build?  Which packages in total would need to be changed in
order to support this?

> Obviously I'll try to optimise Ubiquity's memory use in other ways. I've
> found a few places where I should be able to extract fair-sized savings,
> although nothing approaching 50MB.

I also found some low-hanging fruit in casper:

https://launchpad.net/distros/ubuntu/+source/casper/+bug/43706

-- 
 - mdz



More information about the ubuntu-devel mailing list