From 5aef8d7befcbe2e74d4eb7d92770a43a677997c2 Mon Sep 17 00:00:00 2001 From: Michael Maltese Date: Mon, 18 Mar 2024 14:34:13 -0400 Subject: [PATCH 1/5] driver-redpanda: ansible.cfg: enable pipelining Gives very large speedups --- driver-redpanda/deploy/ansible.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/driver-redpanda/deploy/ansible.cfg b/driver-redpanda/deploy/ansible.cfg index 697ea3fe..cca553ea 100644 --- a/driver-redpanda/deploy/ansible.cfg +++ b/driver-redpanda/deploy/ansible.cfg @@ -3,6 +3,7 @@ host_key_checking=false private_key_file=~/.ssh/redpanda_aws interpreter_python=auto inventory = hosts.ini +pipelining=true [privilege_escalation] become=true From ae70a69fede2e07e70d1bc741ab1482a1be7ca4e Mon Sep 17 00:00:00 2001 From: Michael Maltese Date: Mon, 18 Mar 2024 14:34:59 -0400 Subject: [PATCH 2/5] driver-redpanda: ansible.cfg: set forks=30 Since we typically have more hosts than the default number of forks (5), up the limit. --- driver-redpanda/deploy/ansible.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/driver-redpanda/deploy/ansible.cfg b/driver-redpanda/deploy/ansible.cfg index cca553ea..ff5a67e9 100644 --- a/driver-redpanda/deploy/ansible.cfg +++ b/driver-redpanda/deploy/ansible.cfg @@ -4,6 +4,7 @@ private_key_file=~/.ssh/redpanda_aws interpreter_python=auto inventory = hosts.ini pipelining=true +forks=30 [privilege_escalation] become=true From 382bfcc770d63973e41dffd4271de59a3ec91195 Mon Sep 17 00:00:00 2001 From: Michael Maltese Date: Mon, 18 Mar 2024 14:36:31 -0400 Subject: [PATCH 3/5] driver-redpanda: clean up list of packages to install --- driver-redpanda/deploy/deploy.yaml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/driver-redpanda/deploy/deploy.yaml b/driver-redpanda/deploy/deploy.yaml index d405a5ab..f8d56b02 100644 --- a/driver-redpanda/deploy/deploy.yaml +++ b/driver-redpanda/deploy/deploy.yaml @@ -17,28 +17,20 @@ # under the License. # -- name: Setup common packages on Redhat based systems +- name: Setup common packages hosts: all connection: ssh become: true tasks: - - name: Remove sysstat - package: - name: - - sysstat - state: absent - name: Install packages package: name: - mdadm - xfsprogs - iotop - - wget - sysstat - vim - chrony - - git - - gcc - tuned state: present update_cache: true @@ -52,7 +44,7 @@ when: ansible_os_family == 'Debian' package: name: - - openjdk-17-jdk + - openjdk-17-jre-headless state: present - name: set facts about drives From ffa17c4668610620ea71f99129fe9e91f6a06989 Mon Sep 17 00:00:00 2001 From: Michael Maltese Date: Mon, 18 Mar 2024 15:04:51 -0400 Subject: [PATCH 4/5] driver-redpanda: disable ansible facts gathering except when needed --- driver-redpanda/deploy/deploy.yaml | 38 ++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/driver-redpanda/deploy/deploy.yaml b/driver-redpanda/deploy/deploy.yaml index f8d56b02..138a752d 100644 --- a/driver-redpanda/deploy/deploy.yaml +++ b/driver-redpanda/deploy/deploy.yaml @@ -19,7 +19,10 @@ - name: Setup common packages hosts: all - connection: ssh + gather_subset: + - "!all" + - "!min" + - "os_family" become: true tasks: - name: Install packages @@ -62,6 +65,7 @@ hosts: - redpanda - client + gather_facts: false tags: server tasks: - block: @@ -81,6 +85,7 @@ hosts: - redpanda - client + gather_facts: false tasks: - block: - name: update syslog file size limits @@ -103,6 +108,7 @@ - name: Format raid drives if more then 2 drives hosts: redpanda + gather_facts: false tasks: - block: - name: define mdadm_arrays variable @@ -120,9 +126,9 @@ name: mrlesmithjr.mdadm when: nvme_devices_for_raid|length > 1 - - name: created a non raid disk hosts: redpanda + gather_facts: false tasks: - block: - name: create xfs file system @@ -139,6 +145,7 @@ - name: configure the data path hosts: redpanda + gather_facts: false tasks: - name: data path file: @@ -158,7 +165,7 @@ - name: Store server lists hosts: all - connection: ssh + gather_facts: false tags: client tasks: - set_fact: @@ -167,6 +174,10 @@ - name: install redpanda hosts: redpanda + gather_subset: + - "!all" + - "!min" + - "os_family" tasks: - set_fact: setup_repo: https://packages.vectorized.io/nzc4ZYQK3WRGd9sy/redpanda/cfg/setup/bash.deb.sh @@ -278,7 +289,10 @@ - name: Chrony setup hosts: client - connection: ssh + gather_subset: + - "!all" + - "!min" + - "os_family" become: true tasks: - name: Set chrony path @@ -304,6 +318,7 @@ - sasl - client hosts: all + gather_facts: false tasks: - set_fact: sasl_username: "{{ sasl_username | default('admin') }}" @@ -312,7 +327,10 @@ - name: Setup Benchmark client hosts: client - connection: ssh + gather_subset: + - "!all" + - "!min" + - "hardware" become: true tags: client tasks: @@ -418,6 +436,7 @@ # Install the monitoring stack - name: Install Node Exporter hosts: redpanda, client + gather_facts: false roles: - geerlingguy.node_exporter vars: @@ -430,7 +449,14 @@ tags: - node_exporter +- name: Get facts for Prometheus config + hosts: redpanda, client + gather_facts: true + tags: + - prometheus + - hosts: prometheus + gather_facts: false roles: - prometheus.prometheus.prometheus vars: @@ -450,6 +476,7 @@ - prometheus - hosts: prometheus + gather_facts: false roles: - grafana.grafana.grafana vars: @@ -487,6 +514,7 @@ - name: TLS facts hosts: all,localhost + gather_facts: false tags: tls tasks: - set_fact: From fee75aa083c60888bd77eb95f79f43a998feecf8 Mon Sep 17 00:00:00 2001 From: Michael Maltese Date: Mon, 18 Mar 2024 15:09:53 -0400 Subject: [PATCH 5/5] driver-redpanda: copy benchmark code before unarchiving, for idempotency Prevents needless re-uploads. --- driver-redpanda/deploy/deploy.yaml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/driver-redpanda/deploy/deploy.yaml b/driver-redpanda/deploy/deploy.yaml index 138a752d..3c8b3693 100644 --- a/driver-redpanda/deploy/deploy.yaml +++ b/driver-redpanda/deploy/deploy.yaml @@ -339,12 +339,27 @@ name: vm.max_map_count value: 92160 state: present - - file: path=/opt/benchmark state=absent + + # Copy tarfile first because unarchive isn't idempotent - name: Copy benchmark code - unarchive: + copy: src: ../../package/target/openmessaging-benchmark-0.0.1-SNAPSHOT-bin.tar.gz dest: /opt - - shell: mv /opt/openmessaging-benchmark-0.0.1-SNAPSHOT /opt/benchmark + register: benchmark_archive + - stat: + path: /opt/benchmark + register: benchmark_directory + - when: benchmark_archive.changed or not benchmark_directory.stat.exists + block: + - file: + path: /opt/benchmark + state: absent + - name: Unarchive benchmark code + unarchive: + src: ../../package/target/openmessaging-benchmark-0.0.1-SNAPSHOT-bin.tar.gz + dest: /opt + - shell: mv /opt/openmessaging-benchmark-0.0.1-SNAPSHOT /opt/benchmark + #- shell: tuned-adm profile latency-performance - name: Get list of driver config files