From cbac4497f690bdb0aa88e3138af43478c068a921 Mon Sep 17 00:00:00 2001 From: Kostiantyn Masliuk <1pkg@protonmail.com> Date: Fri, 13 Sep 2024 16:51:07 -0700 Subject: [PATCH] benchmark standalone mode configurable profiles --- systemtest/cmd/moxy/main.go | 2 ++ testing/benchmark/main.tf | 4 ++-- .../benchmark/system-profiles/16GBx2zone.tfvars | 13 +++++++++++-- .../benchmark/system-profiles/1GBx1zone.tfvars | 11 +++++++++++ .../benchmark/system-profiles/2GBx1zone.tfvars | 13 ++++++++++++- .../benchmark/system-profiles/32GBx2zone.tfvars | 13 +++++++++++-- .../benchmark/system-profiles/4GBx1zone.tfvars | 13 ++++++++++++- .../benchmark/system-profiles/8GBx1zone.tfvars | 13 +++++++++++-- testing/benchmark/terraform.tfvars.example | 6 ++++++ testing/benchmark/variables.tf | 16 +++++++++++++++- 10 files changed, 93 insertions(+), 11 deletions(-) diff --git a/systemtest/cmd/moxy/main.go b/systemtest/cmd/moxy/main.go index 908b0020064..557da1bf432 100644 --- a/systemtest/cmd/moxy/main.go +++ b/systemtest/cmd/moxy/main.go @@ -92,6 +92,7 @@ func handler(logger *zap.Logger, username, password string) http.Handler { w.WriteHeader(http.StatusUnauthorized) return } + first := true var body io.Reader switch r.Header.Get("Content-Encoding") { @@ -146,6 +147,7 @@ func handler(logger *zap.Logger, username, password string) http.Handler { jsonw.Write([]byte(`]}`)) w.Write(jsonw.Bytes()) } + // TODO additionally report events throughput metric here, to index into benchmarks. default: logger.Error("unknown path", zap.String("path", r.URL.Path)) } diff --git a/testing/benchmark/main.tf b/testing/benchmark/main.tf index 42ae7d4c968..68f3f9bfbeb 100644 --- a/testing/benchmark/main.tf +++ b/testing/benchmark/main.tf @@ -137,7 +137,7 @@ module "moxy" { source = "../infra/terraform/modules/moxy" vpc_id = module.vpc.vpc_id - instance_type = var.worker_instance_type + instance_type = var.standalone_moxy_instance_size moxy_bin_path = var.moxy_bin_path aws_provisioner_key_name = var.private_key @@ -153,7 +153,7 @@ module "standalone_apm_server" { vpc_id = module.vpc.vpc_id aws_os = "amzn2-ami-hvm-*-x86_64-ebs" - apm_instance_type = var.worker_instance_type + apm_instance_type = var.standalone_apm_server_instance_size apm_server_bin_path = var.apm_server_bin_path ea_managed = false diff --git a/testing/benchmark/system-profiles/16GBx2zone.tfvars b/testing/benchmark/system-profiles/16GBx2zone.tfvars index d081604f332..e6ba492fa43 100644 --- a/testing/benchmark/system-profiles/16GBx2zone.tfvars +++ b/testing/benchmark/system-profiles/16GBx2zone.tfvars @@ -1,5 +1,11 @@ user_name = "USER" +# APM bench + +worker_instance_type = "c6i.2xlarge" + +# Elastic Cloud + # The number of AZs the APM Server should span. apm_server_zone_count = 1 # The Elasticsearch cluster node size. @@ -10,5 +16,8 @@ elasticsearch_zone_count = 2 apm_server_size = "16g" # Number of shards for the ES indices apm_shards = 4 -# Benchmarks executor size executor -worker_instance_type = "c6i.2xlarge" + +# Standalone + +standalone_apm_server_instance_size = "c6i.4xlarge" +standalone_moxy_instance_size = "c6i.8xlarge" diff --git a/testing/benchmark/system-profiles/1GBx1zone.tfvars b/testing/benchmark/system-profiles/1GBx1zone.tfvars index a2ca3dac002..8b1ff546e60 100644 --- a/testing/benchmark/system-profiles/1GBx1zone.tfvars +++ b/testing/benchmark/system-profiles/1GBx1zone.tfvars @@ -1,5 +1,11 @@ user_name = "USER" +# APM bench + +worker_instance_type = "c6i.large" + +# Elastic Cloud + # The number of AZs the APM Server should span. apm_server_zone_count = 1 # The Elasticsearch cluster node size. @@ -8,3 +14,8 @@ elasticsearch_size = "16g" elasticsearch_zone_count = 2 # APM server instance size apm_server_size = "1g" + +# Standalone + +standalone_apm_server_instance_size = "c6i.large" +standalone_moxy_instance_size = "c6i.xlarge" diff --git a/testing/benchmark/system-profiles/2GBx1zone.tfvars b/testing/benchmark/system-profiles/2GBx1zone.tfvars index 668f12f9edf..a3114b4b989 100644 --- a/testing/benchmark/system-profiles/2GBx1zone.tfvars +++ b/testing/benchmark/system-profiles/2GBx1zone.tfvars @@ -1,5 +1,11 @@ user_name = "USER" +# APM bench + +worker_instance_type = "c6i.large" + +# Elastic Cloud + # The number of AZs the APM Server should span. apm_server_zone_count = 1 # The Elasticsearch cluster node size. @@ -7,4 +13,9 @@ elasticsearch_size = "16g" # The number of AZs the Elasticsearch cluster should have. elasticsearch_zone_count = 2 # APM server instance size -apm_server_size = "2g" \ No newline at end of file +apm_server_size = "2g" + +# Standalone + +standalone_apm_server_instance_size = "c6i.large" +standalone_moxy_instance_size = "c6i.xlarge" diff --git a/testing/benchmark/system-profiles/32GBx2zone.tfvars b/testing/benchmark/system-profiles/32GBx2zone.tfvars index 10a9180257b..7735b9f7695 100644 --- a/testing/benchmark/system-profiles/32GBx2zone.tfvars +++ b/testing/benchmark/system-profiles/32GBx2zone.tfvars @@ -1,5 +1,11 @@ user_name = "USER" +# APM bench + +worker_instance_type = "c6i.2xlarge" + +# Elastic Cloud + # The number of AZs the APM Server should span. apm_server_zone_count = 1 # The Elasticsearch cluster node size. @@ -12,5 +18,8 @@ elasticsearch_dedicated_masters = true apm_server_size = "32g" # Number of shards for the ES indices apm_shards = 4 -# Benchmarks executor size executor -worker_instance_type = "c6i.2xlarge" + +# Standalone + +standalone_apm_server_instance_size = "c6i.8xlarge" +standalone_moxy_instance_size = "c6i.16xlarge" diff --git a/testing/benchmark/system-profiles/4GBx1zone.tfvars b/testing/benchmark/system-profiles/4GBx1zone.tfvars index f55f9099444..23732bb8448 100644 --- a/testing/benchmark/system-profiles/4GBx1zone.tfvars +++ b/testing/benchmark/system-profiles/4GBx1zone.tfvars @@ -1,5 +1,11 @@ user_name = "USER" +# APM bench + +worker_instance_type = "c6i.xlarge" + +# Elastic Cloud + # The number of AZs the APM Server should span. apm_server_zone_count = 1 # The Elasticsearch cluster node size. @@ -7,4 +13,9 @@ elasticsearch_size = "32g" # The number of AZs the Elasticsearch cluster should have. elasticsearch_zone_count = 2 # APM server instance size -apm_server_size = "4g" \ No newline at end of file +apm_server_size = "4g" + +# Standalone + +standalone_apm_server_instance_size = "c6i.xlarge" +standalone_moxy_instance_size = "c6i.2xlarge" diff --git a/testing/benchmark/system-profiles/8GBx1zone.tfvars b/testing/benchmark/system-profiles/8GBx1zone.tfvars index 62719a89b15..a5802b19e29 100644 --- a/testing/benchmark/system-profiles/8GBx1zone.tfvars +++ b/testing/benchmark/system-profiles/8GBx1zone.tfvars @@ -1,5 +1,11 @@ user_name = "USER" +# APM bench + +worker_instance_type = "c6i.xlarge" + +# Elastic Cloud + # The number of AZs the APM Server should span. apm_server_zone_count = 1 # The Elasticsearch cluster node size. @@ -8,5 +14,8 @@ elasticsearch_size = "64g" elasticsearch_zone_count = 2 # APM server instance size apm_server_size = "8g" -# Benchmarks executor size executor -worker_instance_type = "c6i.2xlarge" + +# Standalone + +standalone_apm_server_instance_size = "c6i.2xlarge" +standalone_moxy_instance_size = "c6i.4xlarge" diff --git a/testing/benchmark/terraform.tfvars.example b/testing/benchmark/terraform.tfvars.example index d58973b61b1..2b44a828d6c 100644 --- a/testing/benchmark/terraform.tfvars.example +++ b/testing/benchmark/terraform.tfvars.example @@ -67,3 +67,9 @@ user_name = "USER" # Override the default shard settings for APM indices. Defaults to 0, which doesn't # change the default shard settings. # apm_shards = 12 + +# Override the default APM Server VM size in standalone bench mode. +# standalone_apm_server_instance_size = "c6i.2xlarge" + +# Override the default Moxy VM size in standalone bench mode. +# standalone_moxy_instance_size = "c6i.4xlarge" \ No newline at end of file diff --git a/testing/benchmark/variables.tf b/testing/benchmark/variables.tf index 80cd0950907..e08406aaffa 100644 --- a/testing/benchmark/variables.tf +++ b/testing/benchmark/variables.tf @@ -93,6 +93,8 @@ variable "drop_pipeline" { type = bool } +# Standalone + variable "apm_server_bin_path" { default = "../../build" type = string @@ -105,6 +107,18 @@ variable "moxy_bin_path" { description = "Optional path to the moxy binary" } +variable "standalone_apm_server_instance_size" { + default = "c6i.2xlarge" + type = string + description = "Optional instance type to use for the APM Server VM" +} + +variable "standalone_moxy_instance_size" { + default = "c6i.4xlarge" + type = string + description = "Optional instance type to use for the Moxy VM" +} + ## VPC Network settings variable "vpc_cidr" { @@ -136,7 +150,7 @@ variable "apmbench_bin_path" { } variable "worker_instance_type" { - default = "c6i.2xlarge" + default = "c6i.xlarge" type = string description = "Optional instance type to use for the worker VM" }