From 0b9abde54d47eefe8d15d2d03894591a324f17e7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 17 Dec 2024 18:01:24 +0000 Subject: [PATCH] refactor geo* workloads (#532) Signed-off-by: Michael Oviedo (cherry picked from commit 429382c160984584d3f8edc67a787907b1bd9fe6) Signed-off-by: github-actions[bot] --- geopoint/test_procedures/default.json | 181 +-------------------- geopointshape/test_procedures/default.json | 175 +------------------- geoshape/test_procedures/default.json | 24 +-- 3 files changed, 21 insertions(+), 359 deletions(-) diff --git a/geopoint/test_procedures/default.json b/geopoint/test_procedures/default.json index 62c16d1a..1a4bb05d 100644 --- a/geopoint/test_procedures/default.json +++ b/geopoint/test_procedures/default.json @@ -3,62 +3,7 @@ "description": "Indexes the whole document corpus using OpenSearch default settings. We only adjust the number of replicas as we benchmark a single node cluster and Benchmark will only start the benchmark if the cluster turns green. Document ids are unique so all index operations are append only. After that a couple of queries are run.", "default": true, "schedule": [ - { - "operation": "delete-index" - }, - { - "operation": { - "operation-type": "create-index", - "settings": {{index_settings | default({}) | tojson}} - } - }, - { - "name": "check-cluster-health", - "operation": { - "operation-type": "cluster-health", - "index": "osmgeopoints", - "request-params": { - "wait_for_status": "{{cluster_health | default('green')}}", - "wait_for_no_relocating_shards": "true" - }, - "retry-until-success": true - } - }, - { - "operation": "index-append", - "warmup-time-period": 120, - "clients": {{bulk_indexing_clients | default(8)}}, - "ignore-response-error-level": "{{error_level | default('non-fatal')}}" - }, - { - "name": "refresh-after-index", - "operation": "refresh" - }, - { - "operation": { - "operation-type": "force-merge", - "request-timeout": 7200{%- if max_num_segments is defined %}, - "max-num-segments": {{max_num_segments}} - {%- endif %} - } - }, - { - "name": "refresh-after-force-merge", - "operation": "refresh" - }, - { - "name": "wait-until-merges-finish", - "operation": { - "operation-type": "index-stats", - "index": "_all", - "condition": { - "path": "_all.total.merges.current", - "expected-value": 0 - }, - "retry-until-success": true, - "include-in-reporting": false - } - }, + {{ benchmark.collect(parts="../../common_operations/workload_setup.json") }}, { "operation": "polygon", "warmup-iterations": 200, @@ -93,127 +38,19 @@ "name": "append-no-conflicts-index-only", "description": "Indexes the whole document corpus using OpenSearch default settings. We only adjust the number of replicas as we benchmark a single node cluster and Benchmark will only start the benchmark if the cluster turns green. Document ids are unique so all index operations are append only.", "schedule": [ - { - "operation": "delete-index" - }, - { - "operation": { - "operation-type": "create-index", - "settings": {{index_settings | default({}) | tojson}} - } - }, - { - "name": "check-cluster-health", - "operation": { - "operation-type": "cluster-health", - "index": "osmgeopoints", - "request-params": { - "wait_for_status": "{{cluster_health | default('green')}}", - "wait_for_no_relocating_shards": "true" - }, - "retry-until-success": true - } - }, - { - "operation": "index-append", - "warmup-time-period": 120, - "clients": {{bulk_indexing_clients | default(8)}}, - "ignore-response-error-level": "{{error_level | default('non-fatal')}}" - }, - { - "name": "refresh-after-index", - "operation": "refresh" - }, - { - "operation": { - "operation-type": "force-merge", - "request-timeout": 7200{%- if max_num_segments is defined %}, - "max-num-segments": {{max_num_segments}} - {%- endif %} - } - }, - { - "name": "refresh-after-force-merge", - "operation": "refresh" - }, - { - "name": "wait-until-merges-finish", - "operation": { - "operation-type": "index-stats", - "index": "_all", - "condition": { - "path": "_all.total.merges.current", - "expected-value": 0 - }, - "retry-until-success": true, - "include-in-reporting": false - } - } + {{ benchmark.collect(parts="../../common_operations/workload_setup.json") }} ] }, { "name": "append-fast-with-conflicts", "description": "Indexes the whole document corpus using a setup that will lead to a larger indexing throughput than the default settings. Benchmark will produce duplicate ids in 25% of all documents (not configurable) so we can simulate a scenario with appends most of the time and some updates in between.", "schedule": [ - { - "operation": "delete-index" - }, - { - "operation": { - "operation-type": "create-index", - "settings": {%- if index_settings is defined %} {{index_settings | tojson}} {%- else %} { - "index.refresh_interval": "30s", - "index.number_of_shards": {{number_of_shards | default(6)}}, - "index.translog.flush_threshold_size": "4g" - }{%- endif %} - } - }, - { - "name": "check-cluster-health", - "operation": { - "operation-type": "cluster-health", - "index": "osmgeopoints", - "request-params": { - "wait_for_status": "{{cluster_health | default('green')}}", - "wait_for_no_relocating_shards": "true" - }, - "retry-until-success": true - } - }, - { - "operation": "index-update", - "warmup-time-period": 120, - "clients": {{bulk_indexing_clients | default(8)}}, - "ignore-response-error-level": "{{error_level | default('non-fatal')}}" - }, - { - "name": "refresh-after-index", - "operation": "refresh" - }, - { - "operation": { - "operation-type": "force-merge", - "request-timeout": 7200{%- if max_num_segments is defined %}, - "max-num-segments": {{max_num_segments}} - {%- endif %} - } - }, - { - "name": "refresh-after-force-merge", - "operation": "refresh" - }, - { - "name": "wait-until-merges-finish", - "operation": { - "operation-type": "index-stats", - "index": "_all", - "condition": { - "path": "_all.total.merges.current", - "expected-value": 0 - }, - "retry-until-success": true, - "include-in-reporting": false - } - } + {% with default_index_settings={ + "index.refresh_interval": "30s", + "index.number_of_shards": number_of_shards | default(6), + "index.translog.flush_threshold_size": "4g" + } %} + {{ benchmark.collect(parts="../../common_operations/workload_setup.json") }} + {% endwith %} ] } diff --git a/geopointshape/test_procedures/default.json b/geopointshape/test_procedures/default.json index dcf81b33..bd3646c2 100644 --- a/geopointshape/test_procedures/default.json +++ b/geopointshape/test_procedures/default.json @@ -3,60 +3,7 @@ "description": "Indexes the whole document corpus using OpenSearch default settings. We only adjust the number of replicas as we benchmark a single node cluster and Benchmark will only start the benchmark if the cluster turns green. Document ids are unique so all index operations are append only. After that a couple of queries are run.", "default": true, "schedule": [ - { - "operation": "delete-index" - }, - { - "operation": { - "operation-type": "create-index", - "settings": {{index_settings | default({}) | tojson}} - } - }, - { - "name": "check-cluster-health", - "operation": { - "operation-type": "cluster-health", - "index": "osmgeoshapes", - "request-params": { - "wait_for_status": "{{cluster_health | default('green')}}", - "wait_for_no_relocating_shards": "true" - }, - "retry-until-success": true - } - }, - { - "operation": "index-append", - "warmup-time-period": 120, - "clients": {{bulk_indexing_clients | default(8)}}, - "ignore-response-error-level": "{{error_level | default('non-fatal')}}" - }, - { - "name": "refresh-after-index", - "operation": "refresh" - }, - { - "operation": { - "operation-type": "force-merge", - "request-timeout": 7200 - } - }, - { - "name": "refresh-after-force-merge", - "operation": "refresh" - }, - { - "name": "wait-until-merges-finish", - "operation": { - "operation-type": "index-stats", - "index": "_all", - "condition": { - "path": "_all.total.merges.current", - "expected-value": 0 - }, - "retry-until-success": true, - "include-in-reporting": false - } - }, + {{ benchmark.collect(parts="../../common_operations/workload_setup.json") }}, { "operation": "polygon", "warmup-iterations": 200, @@ -77,123 +24,19 @@ "name": "append-no-conflicts-index-only", "description": "Indexes the whole document corpus using OpenSearch default settings. We only adjust the number of replicas as we benchmark a single node cluster and Benchmark will only start the benchmark if the cluster turns green. Document ids are unique so all index operations are append only.", "schedule": [ - { - "operation": "delete-index" - }, - { - "operation": { - "operation-type": "create-index", - "settings": {{index_settings | default({}) | tojson}} - } - }, - { - "name": "check-cluster-health", - "operation": { - "operation-type": "cluster-health", - "index": "osmgeoshapes", - "request-params": { - "wait_for_status": "{{cluster_health | default('green')}}", - "wait_for_no_relocating_shards": "true" - }, - "retry-until-success": true - } - }, - { - "operation": "index-append", - "warmup-time-period": 120, - "clients": {{bulk_indexing_clients | default(8)}}, - "ignore-response-error-level": "{{error_level | default('non-fatal')}}" - }, - { - "name": "refresh-after-index", - "operation": "refresh" - }, - { - "operation": { - "operation-type": "force-merge", - "request-timeout": 7200 - } - }, - { - "name": "refresh-after-force-merge", - "operation": "refresh" - }, - { - "name": "wait-until-merges-finish", - "operation": { - "operation-type": "index-stats", - "index": "_all", - "condition": { - "path": "_all.total.merges.current", - "expected-value": 0 - }, - "retry-until-success": true, - "include-in-reporting": false - } - } + {{ benchmark.collect(parts="../../common_operations/workload_setup.json") }} ] }, { "name": "append-fast-with-conflicts", "description": "Indexes the whole document corpus using a setup that will lead to a larger indexing throughput than the default settings. Benchmark will produce duplicate ids in 25% of all documents (not configurable) so we can simulate a scenario with appends most of the time and some updates in between.", "schedule": [ - { - "operation": "delete-index" - }, - { - "operation": { - "operation-type": "create-index", - "settings": {%- if index_settings is defined %} {{index_settings | tojson}} {%- else %} { - "index.refresh_interval": "30s", - "index.number_of_shards": {{number_of_shards | default(6)}}, - "index.translog.flush_threshold_size": "4g" - }{%- endif %} - } - }, - { - "name": "check-cluster-health", - "operation": { - "operation-type": "cluster-health", - "index": "osmgeoshapes", - "request-params": { - "wait_for_status": "{{cluster_health | default('green')}}", - "wait_for_no_relocating_shards": "true" - }, - "retry-until-success": true - } - }, - { - "operation": "index-update", - "warmup-time-period": 120, - "clients": {{bulk_indexing_clients | default(8)}}, - "ignore-response-error-level": "{{error_level | default('non-fatal')}}" - }, - { - "name": "refresh-after-index", - "operation": "refresh" - }, - { - "operation": { - "operation-type": "force-merge", - "request-timeout": 7200 - } - }, - { - "name": "refresh-after-force-merge", - "operation": "refresh" - }, - { - "name": "wait-until-merges-finish", - "operation": { - "operation-type": "index-stats", - "index": "_all", - "condition": { - "path": "_all.total.merges.current", - "expected-value": 0 - }, - "retry-until-success": true, - "include-in-reporting": false - } - } + {% with default_index_settings={ + "index.refresh_interval": "30s", + "index.number_of_shards": number_of_shards | default(6), + "index.translog.flush_threshold_size": "4g" + } %} + {{ benchmark.collect(parts="../../common_operations/workload_setup.json") }} + {% endwith %} ] } diff --git a/geoshape/test_procedures/default.json b/geoshape/test_procedures/default.json index 798eea25..22ad59ef 100644 --- a/geoshape/test_procedures/default.json +++ b/geoshape/test_procedures/default.json @@ -3,27 +3,9 @@ "description": "Indexes the whole document corpus using OpenSearch default settings. We only adjust the number of replicas as we benchmark a single node cluster and Benchmark will only start the benchmark if the cluster turns green. Document ids are unique so all index operations are append only. After that a couple of queries are run.", "default": true, "schedule": [ - { - "operation": "delete-index" - }, - { - "operation": { - "operation-type": "create-index", - "settings": {{index_settings | default({}) | tojson}} - } - }, - { - "name": "check-cluster-health", - "operation": { - "operation-type": "cluster-health", - "index": "osm*", - "request-params": { - "wait_for_status": "{{cluster_health | default('green')}}", - "wait_for_no_relocating_shards": "true" - }, - "retry-until-success": true - } - }, + {{ benchmark.collect(parts="../../common_operations/delete_index.json") }}, + {{ benchmark.collect(parts="../../common_operations/create_index.json") }}, + {{ benchmark.collect(parts="../../common_operations/check_cluster_health.json") }}, { "operation": "index-append-linestrings", "warmup-time-period": 120,