Skip to content

Commit

Permalink
Ansible flamestream lenta bench
Browse files Browse the repository at this point in the history
  • Loading branch information
faucct committed May 17, 2019
1 parent 42802f4 commit 269bd83
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 4 deletions.
2 changes: 1 addition & 1 deletion benchmark/ansible/flamestream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
- name: Run the benchmark
hosts: bench
roles:
- { role: flamestream-bench , bench_class: com.spbsu.flamestream.example.benchmark.LentaBenchStand }
- { role: flamestream-lenta-bench , bench_class: com.spbsu.flamestream.example.benchmark.LentaBenchStand }

- name: Destroy flamestream
hosts: workers
Expand Down
4 changes: 1 addition & 3 deletions benchmark/ansible/roles/flamestream-bench/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: Copy the wiki dump
copy:
src: lenta-ru-news.csv
src: wiki.xml
dest: "{{ flamestream_dir }}/wiki.xml"

- name: Copy the deployer file
Expand All @@ -21,8 +21,6 @@
-cp '{{ flamestream_dir }}/lib/*'
{{ bench_class }}
{{ flamestream_dir }}/bench.conf {{ flamestream_dir }}/deployer.conf > {{ flamestream_dir }}/bench.log 2>&1
environment:
LOCAL_ADDRESS: "{{ inventory_hostname }}:{{ flamestream_worker_port }}"
- name: Fetch bench logs
fetch:
Expand Down
Empty file.
35 changes: 35 additions & 0 deletions benchmark/ansible/roles/flamestream-lenta-bench/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
- name: Copy the lenta feed
copy:
src: lenta-ru-news.csv
dest: "{{ flamestream_dir }}/lenta-ru-news.csv"

- name: Copy the deployer file
template:
src: deployer.conf.j2
dest: "{{ flamestream_dir }}/deployer.conf"

- name: Copy the bench configuration file
template:
src: bench.conf.j2
dest: "{{ flamestream_dir }}/bench.conf"

- name: Start the flamestream bench
shell: >
java
-Daeron.term.buffer.length=4194304 -Daeron.mtu.length=16384 -Xms500m -Xmx500m -XX:+PrintGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+HeapDumpOnOutOfMemoryError
-cp '{{ flamestream_dir }}/lib/*'
{{ bench_class }}
{{ flamestream_dir }}/bench.conf {{ flamestream_dir }}/deployer.conf > {{ flamestream_dir }}/bench.log 2>&1
- name: Fetch bench logs
fetch:
src: "{{ flamestream_dir }}/bench.log"
dest: "{{ results_dir }}/flamestream/bench.log"
flat: true

- name: Fetch latencies
fetch:
src: /tmp/lat.data
dest: "{{ results_dir }}/flamestream/latency/lat.data"
flat: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
benchmark {
bench-host = "{{ groups['bench'][0] }}"
input-host = "{{ groups['input'][0] }}"
bench-source-port = 4567
bench-sink-port = 5678

lenta-dump-path = "{{ flamestream_dir }}/lenta-ru-news.csv"
sleep-between-docs-ms = {{ rate }}
validator = com.spbsu.flamestream.example.benchmark.validators.{{ validator }}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
deployer {
remote {
zk = "{{ groups['manager'][0] }}:{{ zookeeper_client_port }}"
}
}

0 comments on commit 269bd83

Please # to comment.