[Tilesathome] [OSM-talk] t at h memory issues ? / Renderability

Jochen Frieling J.Frieling at gmx.de
Tue Feb 5 15:46:12 GMT 2008


Hi,

> I have similar problem. My system is debian lenny .I have 3GB of 
> physical ram and 3GB of swap.

That's some fair amount of memory. But after enabling your software
to use all of it (see below), you will notice that those hefty tiles
like Amsterdam, Rotterdam, Den Haag will demand 4GB physical RAM (to be
more precise, something like 3.8 to 3.9E09 bytes). I'm writing physical,
because practice has shown that the operations performed by Inkscape
are not at all swap-friendly. The tiles can theoretically be rendered
with virtual memory, but swapping will slow down the process to something
like 20 hours per tile or worse.
Beforehand, one thing has to be set up correctly:

> And when I try :
> u64 at debian:~$ /usr/bin/inkscape /tmp/output-31396-z12.svg
> Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS

This error(-message) does originate not from Inkscape itself, but from
the memory management it uses. Here, we are talking about Boehm's Garbage
Collector (GC). There's nothing wrong with the GC. But it has to be
compiled with --enable-large-config for a use case like t at h.
So here's the problem: Debian comes with a package libgc1c2 which
does not have the large config enabled.

If you feel comfortable compiling applications by yourself, here are some
rough pointers on how to build a new Inkscape utilizing the enhanced
Boehm's GC library. With such an Inkscape, I've not had a single crash in
the last 3 weeks of trying it out).

1) Remove these packages:
libgc-dev - conservative garbage collector for C (development)
libgc1c2 - conservative garbage collector for C and C++

2) Make sure these packages are available (you might need some more)
g++ make autoconf automake libglib2.0-dev intltool libpng12-dev
fontconfig libxft-dev liblcms1-dev libsigc++-2.0-dev libcairo2-dev
libxslt1-dev libxml2-dev libgtkmm-2.4-dev libboost-dev libpopt-dev

3) Build and install Boehm's garbage collector
wget http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-7.0.tar.gz
./configure --enable-threads=posix --enable-cplusplus --enable-large-config
#                                                     ^^^^^^^^^^^^^^^^^^^^^ 
make
make check
make install
ldconfig

4) Build and install a new inkscape that will use the new GC
which inkscape  # the one on your system
svn co https://inkscape.svn.sourceforge.net/svnroot/inkscape/inkscape/trunk inkscape
./autogen.sh
./configure
make
make install
which inkscape  # should now indicate the freshly built one

Note that these are not complete step-by-step instructions. You should
be knowing would you are doing by using using above commands.

But that's all there is to be done to keep Inkscape from crashing,
once and forever...
One little flaw I havn't addressed yet is the Inkscape version string.
As long as Inkscape 0.46 hasn't been released (expected really soon know),
it will identify itself as '0.45'. That's why tilesGen.pl will warn you
with
* Please upgrade to inkscape 0.45.1 due to security problems with your inkscape version:
- Inkscape version 0.45
Well, you could set the version somewhere ahead of starting the build
process, but I haven't bothered, since this is a false alarm. (The correct
version string would be something like '0.46-pre1'.)

Happy rendering,
Jochen Frieling


-- 
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail




More information about the Tilesathome mailing list