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

Commit be137ba

Browse files
committed
Fixed cleaning ec2 cache, perf installed, emacs packages installed.
1 parent ab0fa23 commit be137ba

File tree

6 files changed

+44
-5
lines changed

6 files changed

+44
-5
lines changed

devops/ec2.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626

2727
# good for both launch and termination
2828
- import_tasks: tasks/clean_ec2_cache.yml
29+
tags:
30+
- clean_ec2_cache
2931

3032
- name: terminate all ec2 instances
3133
ec2:

devops/inventory

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ shardman_version_tag=master
4040

4141
shardman_shardlord_connstring="host={{ shardlord_ip }} port={{ pg_port }} user={{ ansible_user }}"
4242

43+
fg_path="{{ ansible_env.HOME }}/FlameGraph"
44+
4345
test_id=""
4446
logs=logs
4547

devops/pgbench_run.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@
1717
- set_fact: test_id="{{ test_id }}-{{ now.stdout }}"
1818
when: tmstmp
1919

20-
- hosts: workers
20+
# run pgbench on active_workers workers, by default all of them.
21+
- hosts: workers[0:{{ (active_workers | int ) - 1 }}]
22+
environment:
23+
PATH: "{{ pg_dst }}/bin:{{ fg_path }}:{{ ansible_env.PATH }}"
2124
vars:
25+
active_workers: "{{ groups['workers'] | length }}"
2226
pgbench_opts: ""
23-
environment:
24-
PATH: "{{ pg_dst }}/bin:{{ ansible_env.PATH }}"
2527

2628
tasks:
2729
- name: vacuum

devops/provision.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,11 @@
147147
when: tags_not_specified is not defined
148148
tags: ars
149149

150+
- name: Install packages for Arseny's emacs
151+
command: emacs emacs -batch --eval '(message "Hi!")' -u {{ ansible_user}}
152+
when: tags_not_specified is not defined
153+
tags: ars
154+
150155
- name: set PATH in .bashrc
151156
lineinfile: dest=~/.bashrc line="export PATH={{ pg_dst }}/bin:$PATH"
152157
tags:
@@ -167,6 +172,31 @@
167172
tags:
168173
- allow_ptrace
169174

175+
- name: install perf for xenial
176+
apt: name=linux-tools-4.4.0-1022-aws state=installed
177+
when: ansible_os_family == "Debian"
178+
become: yes
179+
tags:
180+
- perf
181+
182+
- name: allow perfing
183+
shell: echo 0 | sudo tee /proc/sys/kernel/kptr_restrict
184+
become: yes
185+
tags: perf
186+
187+
- name: download flamegraph
188+
git: repo=https://github.com/brendangregg/FlameGraph.git
189+
dest="{{ fg_path }}"
190+
version=master
191+
depth=1
192+
accept_hostkey=True
193+
tags: perf
194+
195+
- name: set PATH in .bashrc
196+
lineinfile: dest=~/.bashrc line="export PATH={{ fg_path }}:$PATH"
197+
tags:
198+
- perf
199+
170200
- import_playbook: init.yml
171201
tags:
172202
- init

devops/readme.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ 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:
6262
ansible-playbook -i inventory_ec2/ pgbench_run.yml -e 'tmstmp=false tname=t pgbench_opts="-c 1 -T 5"'
63-
Run pgbench on single worker (to estimate shardman overhead):
63+
Run pgbench only on node:
64+
ansible-playbook -i inventory_ec2/ pgbench_run.yml -e 'tmstmp=false tname=t pgbench_opts="-c 1 -T 2" active_workers=1'
65+
Run pgbench on single node without shardman (to estimate shardman overhead):
6466
ansible-playbook -i inventory_ec2/ pgbench_single.yml -e "scale=10 tmstmp=false tname=test t=false clients=8 seconds=15"
6567

6668
Gather logs to ./logs:

devops/tasks/clean_ec2_cache.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
22

33
- name: clean ec2 cache
4-
shell: "rm -rf ~/.ansible/tmp/ansible-ec2-*"
4+
local_action: shell rm -rf ~/.ansible/tmp/ansible-ec2-*
5+
run_once: True

0 commit comments

Comments
 (0)