pgbench: performance drop when accessing via the service
When pgbench
tool is running through the pgbench service a performance degradation is noticed.
pgbench via kubectl exec:
kubectl exec -it test-0 -c postgres-util -- pgbench -s 50 -U aht -T 120 -j 4 pgbench
scale option ignored, using count from pgbench_branches table (50)
starting vacuum...end.
transaction type: <builtin: TPC-B (sort of)>
scaling factor: 50
query mode: simple
number of clients: 1
number of threads: 1
duration: 120 s
number of transactions actually processed: 73290
latency average = 1.637 ms
tps = 610.746251 (including connections establishing)
tps = 610.756288 (excluding connections establishing)
now via service:
kubectl exec -it pgbench -- bash
pgbench -s 50 -i -h test-primary -U aht -T 120 -j 4 pgbench
some of the specified options cannot be used in initialization (-i) mode
root@pgbench:/# pgbench -s 50 -h test-primary -U aht -T 120 -j 4 pgbench
Password:
scale option ignored, using count from pgbench_branches table (50)
starting vacuum...end.
transaction type: <builtin: TPC-B (sort of)>
scaling factor: 50
query mode: simple
number of clients: 1
number of threads: 1
duration: 120 s
number of transactions actually processed: 14500
latency average = 8.276 ms
tps = 120.825320 (including connections establishing)
tps = 120.831673 (excluding connections establishing)
Implementation plan
Create an SG cluster without backups and run the showed pgbench
commands.
Acceptance Criteria
Edited by Sergio Alejandro Ostapowicz