mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-14 10:13:05 +02:00
ea9147e2e0
The prior default was determined by benchmarking the Perl code prior to the 1.0 release. In general buffer allocation was more expensive in Perl so large buffers gave the best performance. This was due to multiple buffer allocations for each filter in an IO operation. The C code allocates fixed buffers for each IO operation so the cost for buffer allocation is lower than Perl. That being the case it made sense to benchmark the C code to determine the optimal buffer default. The performance/storage tests were used to measure the performance of a variety of filters. 1GiB of data was processed by each filter 10 times and the results of the tests were averaged. While most buffer sizes gave similar performance, 1MiB appeared to perform the best overall. Of course, different architectures are likely to yield different results but this seems like a sensible default. The buffer-size option may still need to be manually configured to give optimal results. Raw test data for reference: 4MB buffer (prior default) copy time 1807ms, avg time 180ms, avg throughput: 5942MB/s md5 time 14200ms, avg time 1420ms, avg throughput: 756MB/s sha1 time 11431ms, avg time 1143ms, avg throughput: 939MB/s sha256 time 23463ms, avg time 2346ms, avg throughput: 457MB/s gzip -6 time 381199ms, avg time 38119ms, avg throughput: 28MB/s lz4 -1 time 15484ms, avg time 1548ms, avg throughput: 693MB/s 1MB buffer (new default) copy time 1760ms, avg time 176ms, avg throughput: 6100MB/s md5 time 13739ms, avg time 1373ms, avg throughput: 781MB/s sha1 time 11025ms, avg time 1102ms, avg throughput: 973MB/s sha256 time 22539ms, avg time 2253ms, avg throughput: 476MB/s gzip -6 time 372995ms, avg time 37299ms, avg throughput: 28MB/s lz4 -1 time 15118ms, avg time 1511ms, avg throughput: 710MB/s 512K buffer copy time 1782ms, avg time 178ms, avg throughput: 6025MB/s md5 time 13724ms, avg time 1372ms, avg throughput: 782MB/s sha1 time 10959ms, avg time 1095ms, avg throughput: 979MB/s sha256 time 22982ms, avg time 2298ms, avg throughput: 467MB/s gzip -6 time 378120ms, avg time 37812ms, avg throughput: 28MB/s lz4 -1 time 15484ms, avg time 1548ms, avg throughput: 693MB/s 256K buffer copy time 1805ms, avg time 180ms, avg throughput: 5948MB/s md5 time 13706ms, avg time 1370ms, avg throughput: 783MB/s sha1 time 11074ms, avg time 1107ms, avg throughput: 969MB/s sha256 time 22588ms, avg time 2258ms, avg throughput: 475MB/s gzip -6 time 372645ms, avg time 37264ms, avg throughput: 28MB/s lz4 -1 time 16346ms, avg time 1634ms, avg throughput: 656MB/s |
||
---|---|---|
.. | ||
auto | ||
dtd | ||
coding.xml | ||
contributing.xml | ||
documentation.xml | ||
faq.xml | ||
index.xml | ||
metric.xml | ||
reference.xml | ||
release.xml | ||
user-guide-index.xml | ||
user-guide.xml |