
We added undo segments to Postgres, and got 20% higher OLTP throughput
With the database size of 24G, three InnoDB buffer pool sizes were tested, each representing a distinct workload characteristic:
以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。
With the database size of 24G, three InnoDB buffer pool sizes were tested, each representing a distinct workload characteristic:
Additionally, the WAL log space was adjusted according to the actual shared_buffers size. This ensures that checkpoints consistently trigger at fixed time intervals.
The schema contains 20 tables with 5M rows in each one adding up to 100M rows.
The size of the database files on the disk is 24G.
A common configuration was applied to all engines to ensure fairness. The buffer pool specifications were layered on top
Create the test database “bench”:
createdb bench
Use the sysbench command to load test data into the “bench” database:
sysbench oltp_read_write
--tables=20
--table_size=5000000
--pgsql-user=postgres
--pgsql-db=bench
prepare
After loading the test data, vacuum the “bench” database:
vacuumdb bench
Run the performance benchmark test:
sysbench oltp_read_write
--pgsql-user=postgres
--pgsql-db=bench
--tables=20
--table_size=5000000
--threads=128
--time=600
--report-interval=10
run
Note: The first run is a warmup phase and is not recorded as formal test result data.
The TPS (Transactions Per Second) metrics collected below represent the number of transactions processed by the database per second. In the Sysbench read-write testing model, a single transaction contains 20 query statements, so the Queries Per Second (QPS) processed by the database is approximately 20 times the TPS.
Instance Type: c9.8xlarge.4 (32vCPU 128GB)
正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。