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

Colin Watson cjwatson at ubuntu.com
Tue May 9 17:55:34 BST 2006


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:
> > Matt Zimmerman napisał(a):
> > > Yes, generating some locales takes more memory than others.  Which languages
> > > are you using in your testing?  It's possible that we can do something to
> > > reduce this temporary memory usage.
> > 
> > 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;
we can get away with it in the text-mode installation because we're not
trying to run a desktop environment as well, but on top of a desktop
environment it's painful.

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

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.

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.

-- 
Colin Watson                                       [cjwatson at ubuntu.com]



More information about the ubuntu-devel mailing list