[OSM-dev] osm2pgsql slow slim import

"Petr Morávek [Xificurk]" xificurk at gmail.com
Thu Dec 1 13:23:37 GMT 2011


Frederik Ramm napsal(a):
> Hi,
> 
> On 12/01/11 11:13, "Petr Morávek [Xificurk]" wrote:
>> Kai has suggested to me changing configuration of postgresql like this:
>>
>> fsync = off
>> synchronous_commit = off
>>
>> And this worked like a charm
> 
> Yes. I wonder if there's a way for osm2pgsql to query postgres about its
> settings and issue a "warning this might take longer" message if someone
> has fsync on?

Actually, I have just found out that the most important is

synchronous_commit = off

I have tried the import of my usual 370MB pbf extract and got:

1) fsync = off, synchronous_commit = off
1990 s = 33 min

2) fsync = on, synchronous_commit = off
3075 s = 51 min
Interestingly, most of the time difference comes from the initial import
of relations.

3) fsync = on, synchronous_commit = on
37720 s = 10.5 h
I did not let this one finish. The number is my estimate based on the
experiments with a much smaller extract.

Best regards,
Petr Morávek aka Xificurk

PS: On saturday I'm leaving for a week of vacation and I can let my
desktop run some benchmarks in that time (if you've got any ideas on
what to test).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xificurk.vcf
Type: text/x-vcard
Size: 211 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20111201/4505be27/attachment.vcf>


More information about the dev mailing list