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 49
49
50
50
- hosts : clients
51
51
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
+
52
58
- name : copy pg source
53
59
copy : src=./{{item}} dest=~/{{item}} mode=0755
54
60
with_items :
Original file line number Diff line number Diff line change 1
1
[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
3
4
4
5
[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
6
11
7
12
[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 34
34
shell : sysctl kernel.sem='1000 128000 128 512'
35
35
sudo : yes
36
36
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
+
37
43
# ############################################################################
38
44
39
45
- name : clone postgres sources
73
79
- stat : path={{pg_datadir}}/postmaster.pid
74
80
register : pg_pidfile
75
81
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
+
76
88
- 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` "
78
90
environment :
79
91
LD_LIBRARY_PATH : " {{pg_dst}}/lib"
80
92
when : pg_pidfile.stat.exists
Original file line number Diff line number Diff line change 37
37
- hosts : clients
38
38
gather_facts : no
39
39
tasks :
40
+
40
41
- 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`:/"'
42
43
register : transfers_result
43
44
environment :
44
45
LD_LIBRARY_PATH : " /home/{{ansible_ssh_user}}/pg_cluster/install/lib"
You can’t perform that action at this time.
0 commit comments