I'm doing a full planet import on an Ubuntu machine with 28GB of RAM. I've changed the postgres.conf proportionally to what is recommended on the wiki and kicked off the import process with the following options:
Nodes import quickly enough, but Ways are moving at less than 1/1000th the speed in terms of k/s. The process is chugging along and using lot's of memory but relatively little CPU compared to when it was importing Nodes. I know that Ways are supposed to take longer than Nodes to import but what I've read in the benchmarks and elsewhere, this doesn't seem right. Here's the current output:
Ways started processing about 12 hours ago. Any idea what could be going on here? Should I just be patient? EDIT: being that I'm from the Windows world, the muscle memory around Ctrl+C to copy is strong and as a result has caused me to kill the import. If I need to adjust settings and restart the import, that's no longer a problem. asked 07 Oct '15, 14:15 joelmdev |
Would like to make some contribution here on exactly the same problem: my semi-production nominatim installation test setup initially included 2GB of RAM for VM with Ubuntu 16.04. While installing using the guideline I kept all postgresql buffer sizes to their defaults (e.g. did not increase them to 2G/10G/24G as this manual suggests), and also decreased --osm2pgsql-cache setting by 10x, e.g. running:
However this attempt failed with exactly the same problem as Op described, producing processing speed as follows (approx. values, as I did not keep the 1st attempt logs):
The thread was stuck for hours at this stage with 0,11k/s throughput for Way processing, so I cancelled the import, decided to increase VM RAM from 2GB to 8GB. This lead to success: both import speed doubled and the processing stage was finished, overall import continued to next stages:
While writing this lines I'm waiting for Load Data stage completion:
answered 05 May '18, 18:19 Ivan M3 |
Have you checked if/how much your system is paging? (In linux getting it wrong terms "swaping") 28GB is likely not really enough memory for a current planet all things considered.
@SimonPoole swap is not currently configured on the machine. It's a fresh VM, and I tried to use proportional RAM settings for postgres and osm2pgsql as what were outlined in the wiki. The wiki had also pointed out that swapping should be avoided, so I didn't pursue it any further. I'm assuming I could create a swap file via the instructions here https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04 but I'd need some guidance on how large to make it and how to tweak the kernel. I can also bump the machine up to 56GB during the import if needed. Also worth noting that I intend to drop the resources on the machine significantly after the import is finished.
Not really answer, but someone else was looking at the same thing https://www.openstreetmap.org/user/baditaflorin/diary/35848 and https://www.openstreetmap.org/user/baditaflorin/diary/35848
Bumping up the memory would likely be a good idea in any case.
I'm sure that more memory would be good, but would memory alone be enough to cause the Ways to import this slowly?