-
Notifications
You must be signed in to change notification settings - Fork 7
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
Speed up PostGIS database with with synchronous_commit=off and more #94
base: master
Are you sure you want to change the base?
Conversation
Some rudimentary benchmarks: TODO Before
boundaries populated with database dump:
with fsync=off, /var/lib/docker/volumes on NFS
with fsync=off sychronous_commit full_page_writes=off; /var/lib/docker/volumes on NFS
|
So with fsync off it's 51 minutes faster? |
Hi @jvanulde, thanks for looking into this... ...even though this PR as well as the "benchmarks" are at a very premature stage. I am using this space sort of as a "brain-dump" for convenience sake, even though the results aren't ready. The tests that I have made thus far are actually very sloppy 😅, as in:
I was expecting to see 10× difference in speed as some reported, but I am not seeing that, getting pretty confused by the sloppy logs. For example: Before, without fsync=off (supposedly): 1m14s
After, with fsync=off (supposedly): 1m28s
After, with fsync=off synchronous_commit=off full_page_writes=off (supposedly): 1m9s
So, very inconclusive, i.e. junk benchmark results. Sorry! I'd better double check to see this PR is doing anything by using a special benchmark script like the one at https://pythonspeed.com/articles/faster-db-tests/ ... Sorry again! |
Good news: Setting Using an adopted test https://pythonspeed.com/articles/faster-db-tests/ (see the test-pgsql-speed branch, running
while modifying Real-life benchmark with actual OpenDRR data will have to wait. 😅 <grin, duck, run> |
New idea: Use add_data.sh to change the three settings (fsync=off, etc.) instead? I realized just today that these settings (fsync, synchronous_commit and full_page_writes) can be modified on-the-fly with, say, Maybe References:
|
Fixes #77
Not quite ready yet:
ps auxwww
does shows apostgres -c fsync=off -c full_page_writes=off -c synchronous_commit=off
process, but do need to verify if the command-line options actually reach the PostgreSQL server