forked from akardapolov/ASH-Viewer
-
Notifications
You must be signed in to change notification settings - Fork 18
Impact of synchronous_commit and fsync
dbacvetkov edited this page Jul 9, 2018
·
6 revisions
Let's look for example at the charts with database load when different values of synchronous_commit/fsync are set.
I used a pgbench with the following parameters:
pgbench -b simple-update -c 30 -T600 -R 3000 postgres
"-R 3000" means target rate 3000 transactions per second, to make identical load in every case.
I ran the load three times:
- synchronous_commit = on, fsync = on.
- synchronous_commit = off, fsync = on.
- synchronous_commit = off, fsync = off.
You may notice that in second run we got rid of LWLock wait type (deep red). Now look at Details -> LWLock and see that it was WALWriteLock (because i have slow disks).
Also you may notice that there is not much difference between second and third runs. So there's no point in setting dangerous parameter fsync=off.