-
Notifications
You must be signed in to change notification settings - Fork 826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System tuning for Docker-based setup #2698
Comments
Default settings:
|
Any workaround should be a little bit dirty due to docker/compose#1377. |
Maybe we should make simple postgis-based container which will ensure that .env file is created and safely pass the values to a Postgres? |
I can make the
But It requires env to be present in IMHO, instead of creating |
It's not too stable - removing .env file will cause the container to fail probably. I also like to have as quick and automated start as possible. Editing variables should be possible, but not required. |
Then make a postgis-based container seems to be the best way to go. |
I think the best way is to make a custom Dockerfile, running And we can prompt user to change that by either using A working Dockerfile is like below:
|
It should test for .env file and use these values instead if available. Probably it means |
How about making another
Then in Drawback is that the environment variable will only be applied when the postgresql database is initiated after destroyed. |
Maybe the best way is not to deal with that but prompt user to try `ALTER
SYSTEM`?
2017-08-01 10:12 GMT+08:00 kocio-pl <[email protected]>:
… It should test for .env file and use these values instead if available.
Probably it means docker-startup.sh should be used here and modified so
that Postgres and osm2pgsql default variables are created.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2698 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAFB83xeiuRee53l6Jfp50s91cm6EJ0Gks5sTol_gaJpZM4OgUKZ>
.
--
Littlebtc / 笨笨的小B / 小犬 (Xiaoquan)
http://blog.littleb.tc
|
Docker environment should be user friendly, there should be no need to install or alter anything other than simple configuration file - and only if you need decent performance. Otherwise it should work out of the box. |
We should allow easy system tuning for Docker-based setup, since big database extract could make tester's life harder. When I disabled PostgreSQL tuning on my regular system, import of low zoom Europe data took 125 min instead of 57 min, which is a substantial difference.
On https://switch2osm.org/loading-osm-data/ there are two sections to consider:
First one is about overcommit settings (I have it enabled and haven't tested how disabling it affects the performance) and the second one is about PostgreSQL memory settings. According to that page setting
maintenance_work_mem
andwork_mem
are "probably enough on a development or testing machine".docker-compose.yml
file can have a block like this (using conservative settings for 2 GB of RAM as default):but it just doesn't work:
Even if it works, we would have another place to change settings instead of
.env
file, where we store osm2pgsql settings - anddocker-compose.yml
is watched by git. But we create.env
when startingimport
container, which is executed afterdb
container is running, so PostgreSQL would still fail.What could we do with it?
The text was updated successfully, but these errors were encountered: