Closed kimmobrunfeldt closed 8 years ago
1GB is way to small for processing a planet file. You can reduce the memory usage of Imposm by creating a custom cache config [1], but it should still take ages. Importing OSM data is not a streaming operation. It needs to access the coordinate cache when buildings ways and relations and this cache is around 25 GB for a planet. Without any caching in memory, you will hit the disk for nearly every single way and relation.
[1] See https://github.com/omniscale/imposm3/blob/master/cache/config.go Point IMPOSM_CACHE_CONFIG environment to a custom config file. Use defaultConfig as a guidance.
Ok thanks for the information. To me it seems that the default cache limitations are quite small, or does "BunchCacheCapacity": 8096
mean that imposm can use 8GB memory?
Do you think the planet import would work with 16GB RAM?
edit: I just found this benchmark section: https://github.com/omniscale/imposm3/wiki/Benchmarks, so at least someone has successfully imported the planet data with 16GB RAM.
It's the memory the underlying LevelDB uses for internal caching for each of the different LevelDB (Imposm cache) files. The LevelDB files them self can become much larger and the OS will use all your "free" memory to cache these files, so that it doesn't have to hit the disk for each read operation.
The WriteBufferSizeM
can be allocated twice by LevelDB during write operations. This is why the actual memory consumption of Imposm is larger then the sum of the SizeM options.
BunchCacheCapacity
is the size of how many blocks of compressed coordinates are stored.
For full speed you will need 64GB of RAM nowadays. It should theoretically work with 2GB, but I guess it would need a couple of days, if not weeks on such a machine.
After 9h 30min running, my planet import process failed to
out of memory
.I know I'm using a quite limited server in DigitalOcean: 1GB Memory, 1 Core Processor, 30GB SSD Disk, plus additional 350GB SSD which is used for imposm3 cache directory and postgres data directory.
Is there any way I could get the initial import working with my limited resources e.g. by increasing swap or limiting imposm3 memory usage? If not, what are the minimum RAM and disk space requirements?
I'm currently importing the planet with the following command, using imposm3-0.2.0dev-20160615-d495ca4-linux-x86-64 prebuilt binary.
Partial stack trace below: