Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ab0fa23

Browse files
committed
Passing pgbench opts manually.
1 parent 944ec30 commit ab0fa23

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

devops/pgbench_run.yml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
### Run pgbench benchmark.
2-
# Controlling vars: tmstmp (true/false), tname, clients, t (true/false),
3-
# seconds, xacts
2+
# Controlling vars: tmstmp (true/false), tname, pgbench_opts
43

54

65
# set global var to use in all plays, oh my
@@ -20,10 +19,7 @@
2019

2120
- hosts: workers
2221
vars:
23-
clients: 1
24-
seconds: 5
25-
xacts: 100
26-
t: False
22+
pgbench_opts: ""
2723
environment:
2824
PATH: "{{ pg_dst }}/bin:{{ ansible_env.PATH }}"
2925

@@ -32,17 +28,10 @@
3228
command: >
3329
psql -p {{ pg_port }} -U {{ ansible_user }} -c "VACUUM;"
3430
35-
- name: run pgbench -T {{ seconds }}
31+
- name: run pgbench --report-latencies --no-vacuum {{ pgbench_opts }}
3632
shell: >
3733
pgbench -p {{ pg_port }} --report-latencies --no-vacuum
38-
-c {{ clients }} -T {{ seconds }} 2>&1 > "{{ test_id }}.out"
39-
when: not ( t | bool )
40-
41-
- name: run pgbench -t {{ xacts }}
42-
shell: >
43-
pgbench -p {{ pg_port }} --report-latencies --no-vacuum
44-
-c {{ clients }} -t {{ xacts }} 2>&1 > "{{ test_id }}.out"
45-
when: t | bool
34+
{{ pgbench_opts }} 2>&1 > "{{ test_id }}.out"
4635
4736
- name: clear log dir
4837
local_action: file path="res/{{ test_id }}/" state=absent

devops/readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ nodes': ansible-playbook -i inventory_ec2/ psql.yml --limit 'workers' -e "cmd='\
5959
Create, fill and shard pgbench tables:
6060
ansible-playbook -i inventory_ec2/ pgbench_prepare.yml -e "scale=10 nparts=3 repfactor=0"
6161
Run pgbench test:
62-
ansible-playbook -i inventory_ec2/ pgbench_run.yml -e "tmstmp=false tname=test seconds=30"
62+
ansible-playbook -i inventory_ec2/ pgbench_run.yml -e 'tmstmp=false tname=t pgbench_opts="-c 1 -T 5"'
6363
Run pgbench on single worker (to estimate shardman overhead):
6464
ansible-playbook -i inventory_ec2/ pgbench_single.yml -e "scale=10 tmstmp=false tname=test t=false clients=8 seconds=15"
6565

0 commit comments

Comments
 (0)