Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(RHIDP-4040): 1.3-mvp-catalog-size-component-20g #87

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci-scripts/rhdh-setup/create_resource.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ clone_and_upload() {
ACCESS_TOKEN=$(get_token "rhdh")
curl -k "$(backstage_url)/api/catalog/locations" --cookie "$COOKIE" --cookie-jar "$COOKIE" -X POST -H 'Accept-Encoding: gzip, deflate, br' -H 'Authorization: Bearer '"$ACCESS_TOKEN" -H 'Content-Type: application/json' --data-raw '{"type":"url","target":"'"${upload_url}"'"}'

timeout=1800
timeout=3600
timeout_timestamp=$(date -d "$timeout seconds" "+%s")
last_count=-1
while true; do
Expand Down
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
18 changes: 18 additions & 0 deletions test.env
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,21 @@
# 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 1:10000 1:20000 1:30000 1:35000 1:40000 1:45000'
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/