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

Memory-aware autoscaling for worker nodes #219

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
1 change: 1 addition & 0 deletions charts/trino/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Fast distributed SQL query engine for big data analytics that helps you explore
* `server.autoscaling.enabled` - bool, default: `false`
* `server.autoscaling.maxReplicas` - int, default: `5`
* `server.autoscaling.targetCPUUtilizationPercentage` - int, default: `50`
* `server.autoscaling.targetMemoryUtilizationPercentage` - int, default: `80`
* `server.autoscaling.behavior` - object, default: `{}`

Configuration for scaling up and down.
Expand Down
6 changes: 6 additions & 0 deletions charts/trino/templates/autoscaler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ spec:
target:
type: Utilization
averageUtilization: {{ .Values.server.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be wrapped in a conditional block, and .Values.server.autoscaling.targetCPUUtilizationPercentage not have a default? I'm wondering if memory based scaling always makes sense - is any Trino cluster able to utilize more memory, or it depends on the datasources, stats, data skew, etc.

resource:
name: memory
target:
type: Utilization
averageUtilization: {{ .Values.server.autoscaling.targetMemoryUtilizationPercentage }}
{{ if .Values.server.autoscaling.behavior -}}
behavior:
{{- toYaml .Values.server.autoscaling.behavior | nindent 4 }}
Expand Down
1 change: 1 addition & 0 deletions charts/trino/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ server:
enabled: false
maxReplicas: 5
targetCPUUtilizationPercentage: 50
targetMemoryUtilizationPercentage: 80
behavior: {}
# server.autoscaling.behavior -- Configuration for scaling up and down.
# @raw
Expand Down