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

Colin Watson cjwatson at ubuntu.com
Tue May 9 19:27:22 BST 2006


On Tue, May 09, 2006 at 10:52:18AM -0700, Matt Zimmerman wrote:
> On Tue, May 09, 2006 at 05:55:34PM +0100, Colin Watson wrote:
> > 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.

Yeah. I haven't had time to look at that yet; I figured if drow hadn't
managed to do it since the conversation in #185010 above, it was
probably not entirely trivial :-), but he might just never have got
round to it.

> > 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.

Oh, really? I thought that files in the same directory would probably be
adjacent in the squashfs and thus compressed all at once.

As it happens, though, it makes little difference. My numbers are:

                            xargs cat   |   xargs -n1 gzip -c
  /rofs                      7197824             7025851
  all installer locales     17448087            17021765

> > 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?

During the livefs build, by strategic calls to locale-gen. Ubiquity and
localechooser would need to be changed.

-- 
Colin Watson                                       [cjwatson at ubuntu.com]



More information about the ubuntu-devel mailing list