From d7a435f563efe6758b47e0ae497ba74efae037aa Mon Sep 17 00:00:00 2001 From: Dinakar Guniguntala Date: Wed, 22 Jan 2025 15:20:18 +0530 Subject: [PATCH 1/3] Add first_responder search space JSONs for power optimization Signed-off-by: Dinakar Guniguntala --- .../first_responder_eap-jvm_search_space.json | 268 ++++++++++++++++++ .../first_responder_eap_search_space.json | 76 +++++ 2 files changed, 344 insertions(+) create mode 100644 hpo/hpo_helpers/first_responder_eap-jvm_search_space.json create mode 100644 hpo/hpo_helpers/first_responder_eap_search_space.json diff --git a/hpo/hpo_helpers/first_responder_eap-jvm_search_space.json b/hpo/hpo_helpers/first_responder_eap-jvm_search_space.json new file mode 100644 index 00000000..f93f31d2 --- /dev/null +++ b/hpo/hpo_helpers/first_responder_eap-jvm_search_space.json @@ -0,0 +1,268 @@ +{ + "experiment_name": "first_responder_eap_jvm", + "experiment_id": "fr_eap_jvm_1", + "total_trials": 100, + "parallel_trials":1, + "objective_function": "1000*(125*THROUGHPUT_RATE_3m)/(150*RESPONSE_TIME_RATE_3m)/(25*MAX_POWER_CONSUMPTION)", + "value_type": "double", + "hpo_algo_impl": "optuna_tpe", + "direction": "maximize", + "function_variables": [ + { + "name": "THROUGHPUT_RATE_3m", + "value_type": "double" + }, + { + "name": "RESPONSE_TIME_RATE_3m", + "value_type": "double" + }, + { + "name": "MAX_POWER_CONSUMPTION", + "value_type": "double" + } + ], + "tunables": [ + { + "name": "SUBSYSTEM_EJB3_STRICT_MAX_BEAN_INSTANCE_POOL_SLSB_STRICT_MAX_POOL__MAX_POOL_SIZE", + "value_type": "integer", + "upper_bound": 1000, + "lower_bound": 1, + "step": 10 + }, + { + "name": "SUBSYSTEM_EJB3__DEFAULT_STATEFUL_BEAN_SESSION_TIMEOUT", + "value_type": "long", + "upper_bound": 10000, + "lower_bound": -1, + "step": 100 + }, + { + "name": "SUBSYSTEM_DATASOURCES_DATA_SOURCE_FRDemoDS__MIN_POOL_SIZE", + "value_type": "integer", + "upper_bound": 10, + "lower_bound": 1, + "step": 1 + }, + { + "name": "SUBSYSTEM_DATASOURCES_DATA_SOURCE_FRDemoDS__MAX_POOL_SIZE", + "value_type": "integer", + "upper_bound": 1000, + "lower_bound": 10, + "step": 10 + }, + { + "name": "SUBSYSTEM_IO_WORKER_DEFAULT__TASK_MAX_THREADS", + "value_type": "integer", + "upper_bound": 500, + "lower_bound": 1, + "step": 4 + }, + { + "name": "SUBSYSTEM_UNDERTOW_BYTE_BUFFER_POOL_DEFAULT__BUFFER_SIZE", + "value_type": "categorical", + "choices": ["true", "false"] + }, + { + "name": "SUBSYSTEM_UNDERTOW_BYTE_BUFFER_POOL_DEFAULT__DIRECT", + "value_type": "categorical", + "choices": ["true", "false"] + }, + { + "name": "SUBSYSTEM_TRANSACTIONS__USE_JOURNAL_STORE", + "value_type": "categorical", + "choices": ["true", "false"] + }, + { + "name": "gc", + "value_type": "categorical", + "choices": ["G1GC", "ParallelGC", "SerialGC", "ShenandoahGC", "ZGC"] + }, + { + "name": "FreqInlineSize", + "value_type": "integer", + "upper_bound": 500, + "lower_bound": 325, + "step": 1 + }, + { + "name": "MaxInlineLevel", + "value_type": "integer", + "upper_bound": 50, + "lower_bound": 9, + "step": 1 + }, + { + "name": "MinInliningThreshold", + "value_type": "integer", + "upper_bound": 200, + "lower_bound": 0, + "step": 1 + }, + { + "name": "CompileThreshold", + "value_type": "integer", + "upper_bound": 10000, + "lower_bound": 1000, + "step": 10 + }, + { + "name": "CompileThresholdScaling", + "value_type": "double", + "upper_bound": 15, + "lower_bound": 1, + "step": 0.1 + }, + { + "name": "ConcGCThreads", + "value_type": "integer", + "upper_bound": 8, + "lower_bound": 0, + "step": 1 + }, + { + "name": "InlineSmallCode", + "value_type": "integer", + "upper_bound": 5000, + "lower_bound": 500, + "step": 5 + }, + { + "name": "LoopUnrollLimit", + "value_type": "integer", + "upper_bound": 250, + "lower_bound": 20, + "step": 1 + }, + { + "name": "LoopUnrollMin", + "value_type": "integer", + "upper_bound": 20, + "lower_bound": 0, + "step": 1 + }, + { + "name": "MinSurvivorRatio", + "value_type": "integer", + "upper_bound": 48, + "lower_bound": 3, + "step": 1 + }, + { + "name": "NewRatio", + "value_type": "integer", + "upper_bound": 10, + "lower_bound": 1, + "step": 1 + }, + { + "name": "TieredStopAtLevel", + "value_type": "integer", + "upper_bound": 4, + "lower_bound": 0, + "step": 1 + }, + { + "name": "MinHeapFreeRatio", + "value_type": "integer", + "upper_bound": 70, + "lower_bound": 5, + "step": 1 + }, + { + "name": "MaxHeapFreeRatio", + "value_type": "integer", + "upper_bound": 100, + "lower_bound": 20, + "step": 1 + }, + { + "name": "GCTimeRatio", + "value_type": "integer", + "upper_bound": 100, + "lower_bound": 1, + "step": 1 + }, + { + "name": "AdaptiveSizePolicyWeight", + "value_type": "integer", + "upper_bound": 100, + "lower_bound": 1, + "step": 1 + }, + { + "name": "TieredCompilation", + "value_type": "categorical", + "choices": ["true", "false"] + }, + { + "name": "AllowParallelDefineClass", + "value_type": "categorical", + "choices": ["true", "false"] + }, + { + "name": "AllowVectorizeOnDemand", + "value_type": "categorical", + "choices": ["true", "false"] + }, + { + "name": "AlwaysCompileLoopMethods", + "value_type": "categorical", + "choices": ["true", "false"] + }, + { + "name": "AlwaysPreTouch", + "value_type": "categorical", + "choices": ["true", "false"] + }, + { + "name": "AlwaysTenure", + "value_type": "categorical", + "choices": ["true", "false"] + }, + { + "name": "BackgroundCompilation", + "value_type": "categorical", + "choices": ["true", "false"] + }, + { + "name": "DoEscapeAnalysis", + "value_type": "categorical", + "choices": ["true", "false"] + }, + { + "name": "UseInlineCaches", + "value_type": "categorical", + "choices": ["true", "false"] + }, + { + "name": "UseLoopPredicate", + "value_type": "categorical", + "choices": ["true", "false"] + }, + { + "name": "UseStringDeduplication", + "value_type": "categorical", + "choices": ["true", "false"] + }, + { + "name": "UseSuperWord", + "value_type": "categorical", + "choices": ["true", "false"] + }, + { + "name": "UseTypeSpeculation", + "value_type": "categorical", + "choices": ["true", "false"] + }, + { + "name": "StackTraceInThrowable", + "value_type": "categorical", + "choices": ["true", "false"] + }, + { + "name": "nettyBufferCheck", + "value_type": "categorical", + "choices": ["true", "false"] + } + ] +} diff --git a/hpo/hpo_helpers/first_responder_eap_search_space.json b/hpo/hpo_helpers/first_responder_eap_search_space.json new file mode 100644 index 00000000..e874fa78 --- /dev/null +++ b/hpo/hpo_helpers/first_responder_eap_search_space.json @@ -0,0 +1,76 @@ +{ + "experiment_name": "first_responder_eap", + "experiment_id": "fr_eap_1", + "total_trials": 100, + "parallel_trials":1, + "objective_function": "1000*(125*THROUGHPUT_RATE_3m)/(150*RESPONSE_TIME_RATE_3m)/(25*MAX_POWER_CONSUMPTION)", + "value_type": "double", + "hpo_algo_impl": "optuna_tpe", + "direction": "maximize", + "function_variables": [ + { + "name": "THROUGHPUT_RATE_3m", + "value_type": "double" + }, + { + "name": "RESPONSE_TIME_RATE_3m", + "value_type": "double" + }, + { + "name": "MAX_POWER_CONSUMPTION", + "value_type": "double" + } + ], + "tunables": [ + { + "name": "SUBSYSTEM_EJB3_STRICT_MAX_BEAN_INSTANCE_POOL_SLSB_STRICT_MAX_POOL__MAX_POOL_SIZE", + "value_type": "integer", + "upper_bound": 1000, + "lower_bound": 1, + "step": 10 + }, + { + "name": "SUBSYSTEM_EJB3__DEFAULT_STATEFUL_BEAN_SESSION_TIMEOUT", + "value_type": "long", + "upper_bound": 10000, + "lower_bound": -1, + "step": 100 + }, + { + "name": "SUBSYSTEM_DATASOURCES_DATA_SOURCE_FRDemoDS__MIN_POOL_SIZE", + "value_type": "integer", + "upper_bound": 10, + "lower_bound": 1, + "step": 1 + }, + { + "name": "SUBSYSTEM_DATASOURCES_DATA_SOURCE_FRDemoDS__MAX_POOL_SIZE", + "value_type": "integer", + "upper_bound": 1000, + "lower_bound": 10, + "step": 10 + }, + { + "name": "SUBSYSTEM_IO_WORKER_DEFAULT__TASK_MAX_THREADS", + "value_type": "integer", + "upper_bound": 500, + "lower_bound": 1, + "step": 4 + }, + { + "name": "SUBSYSTEM_UNDERTOW_BYTE_BUFFER_POOL_DEFAULT__BUFFER_SIZE", + "value_type": "categorical", + "choices": ["true","false"] + }, + { + "name": "SUBSYSTEM_UNDERTOW_BYTE_BUFFER_POOL_DEFAULT__DIRECT", + "value_type": "categorical", + "choices": ["true","false"] + }, + { + "name": "SUBSYSTEM_TRANSACTIONS__USE_JOURNAL_STORE", + "value_type": "categorical", + "choices": ["true","false"] + } + ] +} From d69df26fc273e303ec5db94cdec1f8884e92a3c0 Mon Sep 17 00:00:00 2001 From: Dinakar Guniguntala Date: Fri, 24 Jan 2025 18:15:48 +0530 Subject: [PATCH 2/3] Updated var names to match horreum Signed-off-by: Dinakar Guniguntala --- .../first_responder_eap-jvm_search_space.json | 12 ++++-------- .../first_responder_eap_search_space.json | 12 ++++-------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/hpo/hpo_helpers/first_responder_eap-jvm_search_space.json b/hpo/hpo_helpers/first_responder_eap-jvm_search_space.json index f93f31d2..3a626dc2 100644 --- a/hpo/hpo_helpers/first_responder_eap-jvm_search_space.json +++ b/hpo/hpo_helpers/first_responder_eap-jvm_search_space.json @@ -3,21 +3,17 @@ "experiment_id": "fr_eap_jvm_1", "total_trials": 100, "parallel_trials":1, - "objective_function": "1000*(125*THROUGHPUT_RATE_3m)/(150*RESPONSE_TIME_RATE_3m)/(25*MAX_POWER_CONSUMPTION)", + "objective_function": "1000*(125*Throughput)/(25*Avg_Watts)", "value_type": "double", "hpo_algo_impl": "optuna_tpe", "direction": "maximize", "function_variables": [ { - "name": "THROUGHPUT_RATE_3m", + "name": "Throughput", "value_type": "double" }, { - "name": "RESPONSE_TIME_RATE_3m", - "value_type": "double" - }, - { - "name": "MAX_POWER_CONSUMPTION", + "name": "Avg_Watts", "value_type": "double" } ], @@ -31,7 +27,7 @@ }, { "name": "SUBSYSTEM_EJB3__DEFAULT_STATEFUL_BEAN_SESSION_TIMEOUT", - "value_type": "long", + "value_type": "integer", "upper_bound": 10000, "lower_bound": -1, "step": 100 diff --git a/hpo/hpo_helpers/first_responder_eap_search_space.json b/hpo/hpo_helpers/first_responder_eap_search_space.json index e874fa78..02d71386 100644 --- a/hpo/hpo_helpers/first_responder_eap_search_space.json +++ b/hpo/hpo_helpers/first_responder_eap_search_space.json @@ -3,21 +3,17 @@ "experiment_id": "fr_eap_1", "total_trials": 100, "parallel_trials":1, - "objective_function": "1000*(125*THROUGHPUT_RATE_3m)/(150*RESPONSE_TIME_RATE_3m)/(25*MAX_POWER_CONSUMPTION)", + "objective_function": "1000*(125*Throughput)/(25*Avg_Watts)", "value_type": "double", "hpo_algo_impl": "optuna_tpe", "direction": "maximize", "function_variables": [ { - "name": "THROUGHPUT_RATE_3m", + "name": "Throughput", "value_type": "double" }, { - "name": "RESPONSE_TIME_RATE_3m", - "value_type": "double" - }, - { - "name": "MAX_POWER_CONSUMPTION", + "name": "Avg_Watts", "value_type": "double" } ], @@ -31,7 +27,7 @@ }, { "name": "SUBSYSTEM_EJB3__DEFAULT_STATEFUL_BEAN_SESSION_TIMEOUT", - "value_type": "long", + "value_type": "integer", "upper_bound": 10000, "lower_bound": -1, "step": 100 From f1320b226b80560f62466ecc32f3625fd2ea63af Mon Sep 17 00:00:00 2001 From: Dinakar Guniguntala Date: Wed, 5 Feb 2025 14:49:41 +0530 Subject: [PATCH 3/3] Update objective_function to the right one Signed-off-by: Dinakar Guniguntala --- ...h_space.json => first_responder_eap_1.json} | 18 +++++++++--------- ...ace.json => first_responder_eap_jvm_1.json} | 12 ++++++------ 2 files changed, 15 insertions(+), 15 deletions(-) rename hpo/hpo_helpers/{first_responder_eap_search_space.json => first_responder_eap_1.json} (82%) rename hpo/hpo_helpers/{first_responder_eap-jvm_search_space.json => first_responder_eap_jvm_1.json} (96%) diff --git a/hpo/hpo_helpers/first_responder_eap_search_space.json b/hpo/hpo_helpers/first_responder_eap_1.json similarity index 82% rename from hpo/hpo_helpers/first_responder_eap_search_space.json rename to hpo/hpo_helpers/first_responder_eap_1.json index 02d71386..0ff67034 100644 --- a/hpo/hpo_helpers/first_responder_eap_search_space.json +++ b/hpo/hpo_helpers/first_responder_eap_1.json @@ -1,20 +1,20 @@ { - "experiment_name": "first_responder_eap", - "experiment_id": "fr_eap_1", + "experiment_name": "first_responder_eap_1", + "experiment_id": "first_responder_eap_1", "total_trials": 100, "parallel_trials":1, - "objective_function": "1000*(125*Throughput)/(25*Avg_Watts)", - "value_type": "double", + "objective_function": "1000*(Throughput)/(Avg_Watts**2)", + "value_type": "float", "hpo_algo_impl": "optuna_tpe", "direction": "maximize", "function_variables": [ { "name": "Throughput", - "value_type": "double" + "value_type": "float" }, { "name": "Avg_Watts", - "value_type": "double" + "value_type": "float" } ], "tunables": [ @@ -56,17 +56,17 @@ { "name": "SUBSYSTEM_UNDERTOW_BYTE_BUFFER_POOL_DEFAULT__BUFFER_SIZE", "value_type": "categorical", - "choices": ["true","false"] + "choices": ["true", "false"] }, { "name": "SUBSYSTEM_UNDERTOW_BYTE_BUFFER_POOL_DEFAULT__DIRECT", "value_type": "categorical", - "choices": ["true","false"] + "choices": ["true", "false"] }, { "name": "SUBSYSTEM_TRANSACTIONS__USE_JOURNAL_STORE", "value_type": "categorical", - "choices": ["true","false"] + "choices": ["true", "false"] } ] } diff --git a/hpo/hpo_helpers/first_responder_eap-jvm_search_space.json b/hpo/hpo_helpers/first_responder_eap_jvm_1.json similarity index 96% rename from hpo/hpo_helpers/first_responder_eap-jvm_search_space.json rename to hpo/hpo_helpers/first_responder_eap_jvm_1.json index 3a626dc2..3f24da09 100644 --- a/hpo/hpo_helpers/first_responder_eap-jvm_search_space.json +++ b/hpo/hpo_helpers/first_responder_eap_jvm_1.json @@ -1,20 +1,20 @@ { - "experiment_name": "first_responder_eap_jvm", - "experiment_id": "fr_eap_jvm_1", + "experiment_name": "first_responder_eap_jvm_1", + "experiment_id": "first_responder_eap_jvm_1", "total_trials": 100, "parallel_trials":1, - "objective_function": "1000*(125*Throughput)/(25*Avg_Watts)", - "value_type": "double", + "objective_function": "1000*(Throughput)/(Avg_Watts**2)", + "value_type": "float", "hpo_algo_impl": "optuna_tpe", "direction": "maximize", "function_variables": [ { "name": "Throughput", - "value_type": "double" + "value_type": "float" }, { "name": "Avg_Watts", - "value_type": "double" + "value_type": "float" } ], "tunables": [