Skip to content

Commit

Permalink
introduce common operations directory for OSB workloads (#514)
Browse files Browse the repository at this point in the history
* restructure common operations folder based on discussion with ian

Signed-off-by: Michael Oviedo <[email protected]>

* refactor common ops changes based on discussion with ian

Signed-off-by: Michael Oviedo <[email protected]>

* rework common ops configuration

Signed-off-by: Michael Oviedo <[email protected]>

* add missing params and update geonames workload

Signed-off-by: Michael Oviedo <[email protected]>

* parameterize request-timeout and warmup-time-period

Signed-off-by: Michael Oviedo <[email protected]>

---------

Signed-off-by: Michael Oviedo <[email protected]>
(cherry picked from commit 5119393)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Dec 12, 2024
1 parent 00a6367 commit cd2321d
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 244 deletions.
12 changes: 12 additions & 0 deletions common_operations/check_cluster_health.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "check-cluster-health",
"operation": {
"operation-type": "cluster-health",
"index": "{{ index_name }}",
"request-params": {
"wait_for_status": "{{cluster_health | default('green')}}",
"wait_for_no_relocating_shards": "true"
},
"retry-until-success": true
}
}
6 changes: 6 additions & 0 deletions common_operations/create_index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"operation": {
"operation-type": "create-index",
"settings": {{index_settings | default(default_index_settings | default({})) | tojson}}
}
}
3 changes: 3 additions & 0 deletions common_operations/delete_index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"operation": "delete-index"
}
25 changes: 25 additions & 0 deletions common_operations/force_merge.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"operation": {
"operation-type": "force-merge",
"request-timeout": {{ request_timeout | default(60) | tojson }}{%- if max_num_segments is defined %},
"max-num-segments": {{ max_num_segments | tojson }}
{%- 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
}
}
10 changes: 10 additions & 0 deletions common_operations/index_append.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"operation": "index-append",
"warmup-time-period": {{ warmup_time_period | default(120) | tojson }},
"clients": {{bulk_indexing_clients | default(8)}},
"ignore-response-error-level": "{{error_level | default('non-fatal')}}"
},
{
"name": "refresh-after-index",
"operation": "refresh"
}
5 changes: 5 additions & 0 deletions common_operations/workload_setup.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{ benchmark.collect(parts="delete_index.json") }},
{{ benchmark.collect(parts="create_index.json") }},
{{ benchmark.collect(parts="check_cluster_health.json") }},
{{ benchmark.collect(parts="index_append.json") }},
{{ benchmark.collect(parts="force_merge.json") }}
266 changes: 22 additions & 244 deletions geonames/test_procedures/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,60 +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": "geonames",
"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
}
},
{% with default_index_settings={} %}
{{ benchmark.collect(parts="../../common_operations/workload_setup.json") }},
{% endwith %}
{
"operation": "index-stats",
"warmup-iterations": {{ index_stats_warmup_iterations or warmup_iterations | default(500) | tojson }},
Expand Down Expand Up @@ -239,214 +188,43 @@
"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": "geonames",
"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')}}"
},
{
"operation": {
"operation-type": "force-merge",
"request-timeout": 7200
}
},
{
"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={} %}
{{ benchmark.collect(parts="../../common_operations/workload_setup.json") }}
{% endwith %}
]
},
{
"name": "append-sorted-no-conflicts",
"description": "Indexes the whole document corpus in an index sorted by country_code field in ascending order. Document ids are unique so all index operations are append only.",
"schedule": [
{
"operation": "delete-index"
},
{
"operation": {
"operation-type": "create-index",
"settings": {%- if index_settings is defined %} {{index_settings | tojson}} {%- else %} {
"index.sort.field": ["country_code.raw", "admin1_code.raw"],
"index.sort.order": ["asc", "asc"]
}{%- endif %}
}
},
{
"name": "check-cluster-health",
"operation": {
"operation-type": "cluster-health",
"index": "geonames",
"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')}}"
},
{
"operation": {
"operation-type": "force-merge",
"request-timeout": 7200
}
},
{
"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.sort.field": ["country_code.raw", "admin1_code.raw"],
"index.sort.order": ["asc", "asc"]
} %}
{{ benchmark.collect(parts="../../common_operations/workload_setup.json") }}
{% endwith %}
]
},
{
"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": "geonames",
"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": 45,
"clients": {{bulk_indexing_clients | default(8)}},
"ignore-response-error-level": "{{error_level | default('non-fatal')}}"
},
{
"operation": {
"operation-type": "force-merge",
"request-timeout": 7200
}
},
{
"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 %}
]
},
{
"name": "significant-text",
"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": "geonames",
"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)}}
},
{
"operation": {
"operation-type": "force-merge",
"request-timeout": 7200
}
},
{
"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={} %}
{{ benchmark.collect(parts="../../common_operations/workload_setup.json") }},
{% endwith %}
{
"operation": "significant_text_selective",
"warmup-iterations": {{ significant_text_selective_warmup_iterations or warmup_iterations | default(200) | tojson }},
Expand Down

0 comments on commit cd2321d

Please sign in to comment.