Skip to content

[WIP] implement autoscaling #242

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

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
Draft

[WIP] implement autoscaling #242

wants to merge 16 commits into from

Conversation

knave
Copy link
Collaborator

@knave knave commented Jun 20, 2025

No description provided.

@knave knave marked this pull request as draft June 20, 2025 23:33
return true
}

func (w *WorkerState) AddVramSample(workload *WorkloadState, metrics *WorkerMetrics) bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

This could be calculated by select max in Greptime flow to offload memory based calculation


func (f *FakeMetricsProvider) GetHistoryMetrics() []*WorkerMetrics {
metrics := []*WorkerMetrics{}
startTime := time.Now().Add(-7 * 24 * time.Hour)
Copy link
Contributor

Choose a reason for hiding this comment

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

should be configurable

)

var (
safetyMarginFraction = flag.Float64("recommendation-margin-fraction", 0.15, `Fraction of usage added as the safety margin to the recommended request`)
Copy link
Contributor

Choose a reason for hiding this comment

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

should be in pool and scheduling config, not flags

// of 1 sample per minute, this metric is equal to N.
// This implementation is a very simple heuristic which looks at the total count
// of samples and the time between the first and the last sample.
func getConfidence(s *WorkloadState, confidenceInterval time.Duration) float64 {
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems not a normalized confidence factor

Resources tfv1.Resources
AutoScalingConfig tfv1.AutoScalingConfig

TflopsHistogram vpa.Histogram
Copy link
Contributor

Choose a reason for hiding this comment

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

coupled with vpa algorithm, can not extend with others like XGBoost / LightGBM / Prophet / MLP

@knave knave force-pushed the dev-autoscaling branch from 6c9bafc to e22b847 Compare June 30, 2025 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants