Speed up PostGIS database with with synchronous_commit=off and more#94
Speed up PostGIS database with with synchronous_commit=off and more#94anthonyfok wants to merge 1 commit intoOpenDRR:masterfrom
Conversation
|
Some rudimentary benchmarks: TODO Beforeboundaries populated with database dump:with fsync=off, /var/lib/docker/volumes on NFSwith 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 auxwwwdoes shows apostgres -c fsync=off -c full_page_writes=off -c synchronous_commit=offprocess, but do need to verify if the command-line options actually reach the PostgreSQL server