File tree Expand file tree Collapse file tree 4 files changed +32
-5
lines changed Expand file tree Collapse file tree 4 files changed +32
-5
lines changed Original file line number Diff line number Diff line change 4949
5050- hosts : clients
5151 tasks :
52+ - name : increase open files
53+ shell : " echo '{{ansible_ssh_user}} soft nofile 65535' > /etc/security/limits.d/cluster.conf"
54+ args :
55+ creates : " /etc/security/limits.d/cluster.conf"
56+ sudo : yes
57+
5258 - name : copy pg source
5359 copy : src=./{{item}} dest=~/{{item}} mode=0755
5460 with_items :
Original file line number Diff line number Diff line change 11[clients]
2- client1 ansible_ssh_user=cluster offset=6001
2+ 158.250.29.4 ansible_ssh_user=cluster offset=1
3+ 158.250.29.7 ansible_ssh_user=cluster ansible_ssh_port=2299 offset=100001
34
45[nodes]
5- nodes1 ansible_ssh_user=cluster offset=2001
6+ 158.250.29.5 ansible_ssh_user=cluster
7+ 158.250.29.6 ansible_ssh_user=cluster
8+ 158.250.29.8 ansible_ssh_user=cluster
9+ 158.250.29.9 ansible_ssh_user=cluster
10+ 158.250.29.10 ansible_ssh_user=cluster
611
712[master]
8- master1 ansible_ssh_user=cluster offset=1
13+ 158.250.29.10 ansible_ssh_user=cluster
14+
15+ [local]
16+ localhost
Original file line number Diff line number Diff line change 3434 shell : sysctl kernel.sem='1000 128000 128 512'
3535 sudo : yes
3636
37+ - name : increase open files
38+ shell : " echo '{{ansible_ssh_user}} soft nofile 65535' > /etc/security/limits.d/cluster.conf"
39+ args :
40+ creates : " /etc/security/limits.d/cluster.conf"
41+ sudo : yes
42+
3743# ############################################################################
3844
3945- name : clone postgres sources
7379- stat : path={{pg_datadir}}/postmaster.pid
7480 register : pg_pidfile
7581
82+ # - name: stop postgres if it was running
83+ # command: "{{pg_dst}}/bin/pg_ctl stop -w -D {{pg_datadir}}"
84+ # environment:
85+ # LD_LIBRARY_PATH: "{{pg_dst}}/lib"
86+ # when: pg_pidfile.stat.exists
87+
7688- name : stop postgres if it was running
77- command : " {{pg_dst}}/bin/pg_ctl stop -w -D {{pg_datadir}}"
89+ shell : " kill -9 `head -n 1 {{pg_datadir}}/postmaster.pid` "
7890 environment :
7991 LD_LIBRARY_PATH : " {{pg_dst}}/lib"
8092 when : pg_pidfile.stat.exists
Original file line number Diff line number Diff line change 3737- hosts : clients
3838 gather_facts : no
3939 tasks :
40+
4041 - name : run transfers
41- shell : ' ~/pg_cluster/install/bin/dtmbench {{connections}} -w {{item}} -s {{offset}} -d 100000 -r 1 -n 1000 -a 2000000 | sed "s/^/`hostname`:/"'
42+ shell : ' ~/pg_cluster/install/bin/dtmbench {{connections}} -w {{item}} -s {{offset}} -d 100000 -r 1 -n 1000 -a 2000000 | tee -a perf.results | sed "s/^/`hostname`:/"'
4243 register : transfers_result
4344 environment :
4445 LD_LIBRARY_PATH : " /home/{{ansible_ssh_user}}/pg_cluster/install/lib"
You can’t perform that action at this time.
0 commit comments