Skip to content

Commit

Permalink
chore(RHIDP-4040): 1.3-mvp-catalog-size-api-20g
Browse files Browse the repository at this point in the history
  • Loading branch information
yogananth-subramanian committed Oct 8, 2024
1 parent 2da2f9d commit af8fe44
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
21 changes: 21 additions & 0 deletions config/cluster_read_config.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}
Expand Down
17 changes: 17 additions & 0 deletions test.env
Original file line number Diff line number Diff line change
Expand Up @@ -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/

0 comments on commit af8fe44

Please sign in to comment.