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

HPA enabling usability improvement #770

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
9 changes: 6 additions & 3 deletions helm-charts/HPA.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ HPA controlled _CPU_ pods SHOULD have appropriate resource requests or affinity
subcharts and tested to work) so that k8s scheduler does not schedule too many of them on the same
node(s). Otherwise they never reach ready state.

If you use different models than the default ones, update TGI and TEI resource requests to match
model requirements.
If you use different models than the default ones, update inferencing services (vLLM, TGI, TEI) resource
requests to match model requirements.

Too large requests would not be a problem as long as pods still fit to available nodes. However,
unless rules have been added to pods preventing them from being scheduled on same nodes, too
Expand Down Expand Up @@ -142,7 +142,7 @@ $ kubectl -n $prom_ns delete $(kubectl -n $prom_ns get pod --selector $selector
After [verifying that service metrics work](monitoring.md#verify),
one can verify that HPA rules can access custom metrics based on them.

Verify that there are (TGI and/or TEI) custom metrics prefixed with chart name:
Verify that there are custom metrics from inferencing service(s), prefixed with the chart name:

```console
$ kubectl get --raw /apis/custom.metrics.k8s.io/v1beta1 | jq .resources[].name
Expand All @@ -154,3 +154,6 @@ And HPA rules have TARGET values for HPA controlled service deployments (instead
$ ns=default # OPEA namespace
$ kubectl -n $ns get hpa
```

**NOTE**: inferencing services provide metrics only after they've processed their first request.
And reranking service is used only after query context data has been uploaded!
4 changes: 4 additions & 0 deletions helm-charts/chatqna/hpa-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
autoscaling:
enabled: true

global:
# K8s custom metrics (used for scaling thresholds) are based on metrics from service monitoring
monitoring: true

# Override values in specific subcharts

# Enabling "autoscaling" for any of the subcharts requires enabling it also above!
Expand Down
6 changes: 3 additions & 3 deletions helm-charts/monitoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ or in its `values.yaml` file. Otherwise Prometheus ignores the installed

## Install

Install Helm chart with `global.monitoring:true` option.
Install Helm chart with `--set global.monitoring=true` option.

## Verify

Expand Down Expand Up @@ -91,5 +91,5 @@ $ curl --no-progress-meter $prom_url/api/v1/query? \
--data-urlencode 'query=tgi_queue_size{service="'$chart'-tgi"}' | jq
```

**NOTE**: services provide metrics only after they've processed their first request.
And ChatQnA uses (TEI) reranking service only after query context data has been uploaded!
**NOTE**: inferencing services provide metrics only after they've processed their first request.
And reranking service only after query context data has been uploaded!
Loading