[Tilesathome] Patch for Tiles at home running with two processes
Milenko
milenko at king-nerd.com
Tue Nov 20 00:51:34 GMT 2007
Just tested this diff (I see it's now in svn - haven't tested that).
On tile 1186 1519 it took 15:37 with fork-0 and 10:50 with fork=1.
Looks like about the same performance increase that you saw. If there's a
way to do the same to the transforming and beizercurvehinting, that would
further improve the times.
-Jeremy
----- Original Message -----
From: "Jocelyn Jaubert" <jocelyn.jaubert at gmail.com>
To: <tilesathome at openstreetmap.org>
Sent: Monday, November 19, 2007 2:24 PM
Subject: [Tilesathome] Patch for Tiles at home running with two processes
> Hi,
>
> I have just made a patch so that tilesGen.pl forks in RenderTile
> function (which generates png from svg). It is quite simple, as it
> calls fork() at the first run of RenderTile. Parent and child then just
> draw a different part of the tile.
>
> I originally wanted to make it multi-thread, but it segfaulted in the
> for loop line 1237, but I didn't investigate any more. (it could be a
> problem in how GD library is used).
>
> Patch contains the following modifications:
>
> * make temporary files safer, by using tempfile() to generate unique
> file names.
> * addition of $parent_pid so that the child can get the name of the
> output-* files used by xml2svg(). This could be replaced by using
> coordinates of the tile in file name.
> * a new configuration in tilesAtHome.conf to enable or deactivate
> fork().
>
> I measured time on a very simple tile (2129,1489) which contains only a
> road. Total time went from 2:30 to 1:30 on my dual core.
>
>
> The patch can be easily be modified to use 3 children instead of only 1,
> and I think that xml2svg could use some fork() too.
>
>
> Jocelyn
--------------------------------------------------------------------------------
> _______________________________________________
> Tilesathome mailing list
> Tilesathome at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/tilesathome
>
--------------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.503 / Virus Database: 269.16.0/1139 - Release Date: 11/19/2007
12:35 PM
More information about the Tilesathome
mailing list