Skip to content

Commit

Permalink
Added benchmarks for multi-term aggregation (#89)
Browse files Browse the repository at this point in the history
Signed-off-by: Ketan Verma <ketan9495@gmail.com>
Signed-off-by: Govind Kamat <govkamat@amazon.com>
  • Loading branch information
ketanv3 authored and gkamat committed Aug 11, 2023
1 parent 5c7c62b commit 2b5ff98
Show file tree
Hide file tree
Showing 2 changed files with 333 additions and 0 deletions.
27 changes: 27 additions & 0 deletions http_logs/operations/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,33 @@
}
}
},
{
"name": "multi_term_agg",
"operation-type": "search",
"index": "logs-*",
"body": {
"size": 0,
"query": {
"range": {
"@timestamp": {
"gte": "1998-05-03T00:00:00Z",
"lt": "1998-05-07T00:00:00Z"
}
}
},
"aggs": {
"mterms": {
"multi_terms": {
"terms": [
{"field": "clientip"},
{"field": "status"},
{"field": "size"}
]
}
}
}
}
},
{
"name": "scroll",
"operation-type": "search",
Expand Down
306 changes: 306 additions & 0 deletions http_logs/test_procedures/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,313 @@
},
{
"operation": "hourly_agg",
"warmup-iterations": 50,
"iterations": 100
{%- if not target_throughput %}
,"target-throughput": 0.2
{%- elif target_throughput is string and target_throughput.lower() == 'none' %}
{%- else %}
,"target-throughput": {{ target_throughput | tojson }}
{%- endif %}
{%-if search_clients is defined and search_clients %}
,"clients": {{ search_clients | tojson}}
{%- endif %}
},
{
"operation": "multi_term_agg",
"warmup-iterations": 50,
"iterations": 100
{%- if not target_throughput %}
,"target-throughput": 0.2
{%- elif target_throughput is string and target_throughput.lower() == 'none' %}
{%- else %}
,"target-throughput": {{ target_throughput | tojson }}
{%- endif %}
{%-if search_clients is defined and search_clients %}
,"clients": {{ search_clients | tojson}}
{%- endif %}
},
{
"operation": "scroll",
"warmup-iterations": 100,
"iterations": 200,
"#COMMENT": "Throughput is considered per request. So we issue one scroll request per second which will retrieve 25 pages",
"target-throughput": 1
},
{
"operation": "desc_sort_timestamp",
"warmup-iterations": 200,
"iterations": 100
{%- if not target_throughput %}
,"target-throughput": 0.5
{%- elif target_throughput is string and target_throughput.lower() == 'none' %}
{%- else %}
,"target-throughput": {{ target_throughput | tojson }}
{%- endif %}
{%-if search_clients is defined and search_clients %}
,"clients": {{ search_clients | tojson}}
{%- endif %}
},
{
"operation": "asc_sort_timestamp",
"warmup-iterations": 200,
"iterations": 100
{%- if not target_throughput %}
,"target-throughput": 0.5
{%- elif target_throughput is string and target_throughput.lower() == 'none' %}
{%- else %}
,"target-throughput": {{ target_throughput | tojson }}
{%- endif %}
{%-if search_clients is defined and search_clients %}
,"clients": {{ search_clients | tojson}}
{%- endif %}
},
{
"operation": "desc_sort_with_after_timestamp",
"warmup-iterations": 10,
"iterations": 100
{%- if not target_throughput %}
,"target-throughput": 0.5
{%- elif target_throughput is string and target_throughput.lower() == 'none' %}
{%- else %}
,"target-throughput": {{ target_throughput | tojson }}
{%- endif %}
{%-if search_clients is defined and search_clients %}
,"clients": {{ search_clients | tojson}}
{%- endif %}
},
{
"operation": "asc_sort_with_after_timestamp",
"warmup-iterations": 10,
"iterations": 100
{%- if not target_throughput %}
,"target-throughput": 0.5
{%- elif target_throughput is string and target_throughput.lower() == 'none' %}
{%- else %}
,"target-throughput": {{ target_throughput | tojson }}
{%- endif %}
{%-if search_clients is defined and search_clients %}
,"clients": {{ search_clients | tojson}}
{%- endif %}
},
{
"name": "force-merge-1-seg",
"operation": {
"operation-type": "force-merge",
"max-num-segments": 1,
"request-timeout": 7200
}
},
{
"name": "refresh-after-force-merge-1-seg",
"operation": "refresh"
},
{
"name": "wait-until-merges-1-seg-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
}
},
{
"name": "desc-sort-timestamp-after-force-merge-1-seg",
"operation": "desc_sort_timestamp",
"warmup-iterations": 200,
"iterations": 100
{%- if not target_throughput %}
,"target-throughput": 2
{%- elif target_throughput is string and target_throughput.lower() == 'none' %}
{%- else %}
,"target-throughput": {{ target_throughput | tojson }}
{%- endif %}
{%-if search_clients is defined and search_clients %}
,"clients": {{ search_clients | tojson}}
{%- endif %}
},
{
"name": "asc-sort-timestamp-after-force-merge-1-seg",
"operation": "asc_sort_timestamp",
"warmup-iterations": 200,
"iterations": 100
{%- if not target_throughput %}
,"target-throughput": 2
{%- elif target_throughput is string and target_throughput.lower() == 'none' %}
{%- else %}
,"target-throughput": {{ target_throughput | tojson }}
{%- endif %}
{%-if search_clients is defined and search_clients %}
,"clients": {{ search_clients | tojson}}
{%- endif %}
},
{
"name": "desc-sort-with-after-timestamp-after-force-merge-1-seg",
"operation": "desc_sort_with_after_timestamp",
"warmup-iterations": 10,
"iterations": 100
{%- if not target_throughput %}
,"target-throughput": 0.5
{%- elif target_throughput is string and target_throughput.lower() == 'none' %}
{%- else %}
,"target-throughput": {{ target_throughput | tojson }}
{%- endif %}
{%-if search_clients is defined and search_clients %}
,"clients": {{ search_clients | tojson}}
{%- endif %}
},
{
"name": "asc-sort-with-after-timestamp-after-force-merge-1-seg",
"operation": "asc_sort_with_after_timestamp",
"warmup-iterations": 10,
"iterations": 100
{%- if not target_throughput %}
,"target-throughput": 0.5
{%- elif target_throughput is string and target_throughput.lower() == 'none' %}
{%- else %}
,"target-throughput": {{ target_throughput | tojson }}
{%- endif %}
{%-if search_clients is defined and search_clients %}
,"clients": {{ search_clients | tojson}}
{%- endif %}
}
]
},
{
"name": "append-no-conflicts-original",
"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.",
"schedule": [
{
"operation": "delete-index"
},
{
"operation": {
"operation-type": "create-index",
"settings": {{index_settings | default({}) | tojson}}
}
},
{
"name": "check-cluster-health",
"operation": {
"operation-type": "cluster-health",
"index": "logs-*",
"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": 240,
"clients": {{bulk_indexing_clients | default(8)}}
},
{
"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
}
},
{
"operation": "default",
"warmup-iterations": 500,
"iterations": 100
{%- if not target_throughput %}
,"target-throughput": 8
{%- elif target_throughput is string and target_throughput.lower() == 'none' %}
{%- else %}
,"target-throughput": {{ target_throughput | tojson }}
{%- endif %}
{%-if search_clients is defined and search_clients %}
,"clients": {{ search_clients | tojson}}
{%- endif %}
},
{
"name": "term",
"operation": "term",
"warmup-iterations": 500,
"iterations": 100
{%- if not target_throughput %}
,"target-throughput": 50
{%- elif target_throughput is string and target_throughput.lower() == 'none' %}
{%- else %}
,"target-throughput": {{ target_throughput | tojson }}
{%- endif %}
{%-if search_clients is defined and search_clients %}
,"clients": {{ search_clients | tojson}}
{%- endif %}
},
{
"operation": "range",
"warmup-iterations": 100,
"iterations": 100
{%- if not target_throughput %}
,"target-throughput": 1
{%- elif target_throughput is string and target_throughput.lower() == 'none' %}
{%- else %}
,"target-throughput": {{ target_throughput | tojson }}
{%- endif %}
{%-if search_clients is defined and search_clients %}
,"clients": {{ search_clients | tojson}}
{%- endif %}
},
{
"operation": "200s-in-range",
"warmup-iterations": 500,
"iterations": 100
{%- if not target_throughput %}
,"target-throughput": 33
{%- elif target_throughput is string and target_throughput.lower() == 'none' %}
{%- else %}
,"target-throughput": {{ target_throughput | tojson }}
{%- endif %}
{%-if search_clients is defined and search_clients %}
,"clients": {{ search_clients | tojson}}
{%- endif %}
},
{
"operation": "400s-in-range",
"warmup-iterations": 500,
"iterations": 100
{%- if not target_throughput %}
,"target-throughput": 50
{%- elif target_throughput is string and target_throughput.lower() == 'none' %}
{%- else %}
,"target-throughput": {{ target_throughput | tojson }}
{%- endif %}
{%-if search_clients is defined and search_clients %}
,"clients": {{ search_clients | tojson}}
{%- endif %}
},
{
"operation": "hourly_agg",
"warmup-iterations": 50,
"iterations": 100
{%- if not target_throughput %}
,"target-throughput": 0.2
Expand Down

0 comments on commit 2b5ff98

Please sign in to comment.