Skip to content

Commit 88ea1e1

Browse files
committed
increase open files; save intermediate bench results; force postgres stop
1 parent 7f4dd6b commit 88ea1e1

File tree

4 files changed

+32
-5
lines changed

4 files changed

+32
-5
lines changed

tests/deploy/cluster.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@
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:

tests/deploy/hosts.sample

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
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

tests/deploy/roles/postgres/tasks/main.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@
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
@@ -73,8 +79,14 @@
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

tests/perf.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@
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"

0 commit comments

Comments
 (0)