Re: Speed up Clog Access by increasing CLOG buffers
Amit Kapila <amit.kapila16@gmail.com>
Attachments
- group_update_clog_v6.patch (application/octet-stream) patch v6
- perf_write_clogcontrollock_data_v6.ods (application/vnd.oasis.opendocument.spreadsheet)
On Tue, Feb 23, 2016 at 7:06 PM, Robert Haas <robertmhaas@gmail.com> wrote: > On Sun, Feb 21, 2016 at 7:45 PM, Amit Kapila <amit.kapila16@gmail.com> > wrote: > >> I mean, my basic feeling is that I would not accept a 2-3% regression in >>> the single client case to get a 10% speedup in the case where we have 128 >>> clients. >>> >> >> When I tried by running the pgbench first with patch and then with Head, I see 1.2% performance increase with patch. TPS with patch is 976 and with Head it is 964. For 3, 30 mins TPS data, refer "Patch – group_clog_update_v5" and before that "HEAD – Commit 481725c0" in perf_write_clogcontrollock_data_v6.ods attached with this mail. Nonetheless, I have observed that below new check has been added by the patch which can effect single client performance. So I have changed it such that new check is done only when we there is actually a need of group update which means when multiple clients tries to update clog at-a-time. + if (!InRecovery && + all_trans_same_page && + nsubxids < PGPROC_MAX_CACHED_SUBXIDS && + !IsGXactActive()) > I understand your point. I think to verify whether it is run-to-run >> variation or an actual regression, I will re-run these tests on single >> client multiple times and post the result. >> > > Perhaps you could also try it on a couple of different machines (e.g. > MacBook Pro and a couple of different large servers). > Okay, I have tried latest patch (group_update_clog_v6.patch) on 2 different big servers and then on Mac-Pro. The detailed data for various runs can be found in attached document perf_write_clogcontrollock_data_v6.ods. I have taken the performance data for higher client-counts with somewhat larger scale factor (1000) and data for median of same is as below: M/c configuration ----------------------------- RAM - 500GB 8 sockets, 64 cores(Hyperthreaded128 threads total) Non-default parameters ------------------------------------ max_connections = 1000 shared_buffers=32GB min_wal_size=10GB max_wal_size=15GB checkpoint_timeout =35min maintenance_work_mem = 1GB checkpoint_completion_target = 0.9 wal_buffers = 256MB Client_Count/Patch_ver 1 8 64 128 256 HEAD 871 5090 17760 17616 13907 PATCH 900 5110 18331 20277 19263 Here, we can see that there is a gain of ~15% to ~38% at higher client count. The attached document (perf_write_clogcontrollock_data_v6.ods) contains data, mainly focussing on single client performance. The data is for multiple runs on different machines, so I thought it is better to present in form of document rather than dumping everything in e-mail. Do let me know if there is any confusion in understanding/interpreting the data. Thanks to Dilip Kumar for helping me in conducting test of this patch on MacBook-Pro. With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com
Commits
-
Use group updates when setting transaction status in clog.
- baaf272ac908 11.0 landed
- ccce90b39867 10.0 landed
-
Improve 64bit atomics support.
- e8fdbd58fe56 10.0 landed
-
Add ProcArrayGroupUpdate wait event.
- d4116a771925 10.0 landed
-
Make the different Unix-y semaphore implementations ABI-compatible.
- be7b2848c6d8 10.0 cited
-
Fix broken ALTER INDEX documentation
- 2143f5e12790 9.6.0 cited
-
Code and docs review for commit 3187d6de0e5a9e805b27c48437897e8c39071d45.
- d12e5bb79bb5 9.6.0 cited
-
Partition the freelist for shared dynahash tables.
- 44ca4022f3f9 9.6.0 cited
-
Correct StartupSUBTRANS for page wraparound
- 481725c0ba73 9.6.0 cited
-
Make idle backends exit if the postmaster dies.
- ac1d7945f866 9.6.0 cited
-
contrib/sslinfo: add ssl_extension_info SRF
- 49124613f134 9.6.0 cited
-
Reduce ProcArrayLock contention by removing backends in batches.
- 0e141c0fbb21 9.6.0 cited
-
Fix `make installcheck` for serializable transactions.
- 253de7e1eb9a 9.6.0 cited
-
Lockless StrategyGetBuffer clock sweep hot path.
- d72731a70450 9.5.0 cited
-
Reduce sinval synchronization overhead.
- b4fbe392f8ff 9.2.0 cited