From af8fe4499bfaa7700ba38c97b9c1d0f50fb9f5f3 Mon Sep 17 00:00:00 2001 From: Yogananth Subramanian Date: Sat, 21 Sep 2024 05:18:42 +0530 Subject: [PATCH] chore(RHIDP-4040): 1.3-mvp-catalog-size-api-20g --- config/cluster_read_config.test.yaml | 21 +++++++++++++++++++++ test.env | 17 +++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/config/cluster_read_config.test.yaml b/config/cluster_read_config.test.yaml index 2499d1d..25e6821 100644 --- a/config/cluster_read_config.test.yaml +++ b/config/cluster_read_config.test.yaml @@ -215,6 +215,27 @@ - name: measurements.postgresql.backstage-plugin-search.index command: oc exec $(oc get pods -A -o json | jq -r '.items[] | select(.metadata.namespace | match("{{ namespace_regex }}")) | select(.metadata.name | match("{{ pod_regex }}")).metadata.name') -n $(oc get pods -A -o json | jq -r '.items[] | select(.metadata.namespace | match("{{ namespace_regex }}")) | select(.metadata.name | match("{{ pod_regex }}")).metadata.namespace') -- psql -h localhost -U postgres backstage_plugin_search -c "SELECT relname, 100 * idx_scan / (seq_scan + idx_scan) percent_of_times_index_used, n_live_tup rows_in_table FROM pg_stat_user_tables ORDER BY n_live_tup DESC;" -A -F ',' |head -n -1|yq -p csv -o json output: json + +- name: measurements.postgresql.db.size.readable + command: oc exec $(oc get pods -A -o json | jq -r '.items[] | select(.metadata.namespace | match("{{ namespace_regex }}")) | select(.metadata.name | match("{{ pod_regex }}")).metadata.name') -n $(oc get pods -A -o json | jq -r '.items[] | select(.metadata.namespace | match("{{ namespace_regex }}")) | select(.metadata.name | match("{{ pod_regex }}")).metadata.namespace') -- psql -h localhost -U postgres backstage_plugin_search -c "SELECT pg_size_pretty(SUM(pg_database_size(datname))) AS total_size FROM pg_database;" -A -F ',' |head -n -1|yq -p csv -o json + output: json + +- name: measurements.postgresql.db.size.raw + command: oc exec $(oc get pods -A -o json | jq -r '.items[] | select(.metadata.namespace | match("{{ namespace_regex }}")) | select(.metadata.name | match("{{ pod_regex }}")).metadata.name') -n $(oc get pods -A -o json | jq -r '.items[] | select(.metadata.namespace | match("{{ namespace_regex }}")) | select(.metadata.name | match("{{ pod_regex }}")).metadata.namespace') -- psql -h localhost -U postgres backstage_plugin_search -c "SELECT SUM(pg_database_size(datname)) AS total_size_in_bytes FROM pg_database;" -A -F ',' |head -n -1|yq -p csv -o json + output: json + +- name: measurements.postgresql.dbs.size.readable + command: oc exec $(oc get pods -A -o json | jq -r '.items[] | select(.metadata.namespace | match("{{ namespace_regex }}")) | select(.metadata.name | match("{{ pod_regex }}")).metadata.name') -n $(oc get pods -A -o json | jq -r '.items[] | select(.metadata.namespace | match("{{ namespace_regex }}")) | select(.metadata.name | match("{{ pod_regex }}")).metadata.namespace') -- psql -h localhost -U postgres backstage_plugin_search -c "SELECT datname, pg_size_pretty(pg_database_size(datname)) AS size FROM pg_database;" -A -F ',' |head -n -1|yq -p csv -o json + output: json + +- name: measurements.postgresql.dbs.size.raw + command: oc exec $(oc get pods -A -o json | jq -r '.items[] | select(.metadata.namespace | match("{{ namespace_regex }}")) | select(.metadata.name | match("{{ pod_regex }}")).metadata.name') -n $(oc get pods -A -o json | jq -r '.items[] | select(.metadata.namespace | match("{{ namespace_regex }}")) | select(.metadata.name | match("{{ pod_regex }}")).metadata.namespace') -- psql -h localhost -U postgres backstage_plugin_search -c "SELECT datname, pg_database_size(datname) AS size_in_bytes FROM pg_database;" -A -F ',' |head -n -1|yq -p csv -o json + output: json + +- name: measurements.postgresql.disk.usage.readable + command: oc exec $(oc get pods -A -o json | jq -r '.items[] | select(.metadata.namespace | match("{{ namespace_regex }}")) | select(.metadata.name | match("{{ pod_regex }}")).metadata.name') -n $(oc get pods -A -o json | jq -r '.items[] | select(.metadata.namespace | match("{{ namespace_regex }}")) | select(.metadata.name | match("{{ pod_regex }}")).metadata.namespace') -- df -h /var/lib/pgsql/data |yq -p csv -o json + output: json + {%- endmacro %} {{ collect_index_usage('rhdh-performance.*', '(rhdh|backstage)-(postgresql|psql)-(primary|developer-hub)-0') }} diff --git a/test.env b/test.env index f9286e8..9e9a134 100644 --- a/test.env +++ b/test.env @@ -66,3 +66,20 @@ # export SCALE_DB_STORAGES="1Gi 2Gi" # export SCALE_CPU_REQUESTS_LIMITS=": 1:1" # export SCALE_MEMORY_REQUESTS_LIMITS=": 1Gi:1Gi" + +export DURATION=15m +export PRE_LOAD_DB=true +export SCALE_ACTIVE_USERS_SPAWN_RATES='100:5' +export SCALE_BS_USERS_GROUPS='10000:2000' +export SCALE_CATALOG_SIZES='1:1 10000:1 25000:1 50000:1 75000:1 100000:1' +export SCALE_CPU_REQUESTS_LIMITS=: +export SCALE_DB_STORAGES=20Gi +export SCALE_MEMORY_REQUESTS_LIMITS=: +export SCALE_REPLICAS=1 +export SCALE_WORKERS=20 +export SCENARIO=mvp +export USE_PR_BRANCH=true +export WAIT_FOR_SEARCH_INDEX=false +export RHDH_HELM_CHART=redhat-developer-hub +export AUTH_PROVIDER=keycloak +export RHDH_HELM_REPO=https://raw.githubusercontent.com/rhdh-bot/openshift-helm-charts/refs/heads/rhdh-1.3-rhel-9/installation/