neondatabase / autoscaling

Postgres vertical autoscaling in k8s
Apache License 2.0
163 stars 21 forks source link

Scheduler only migrates highest-priority VM at a time #355

Open sharnoff opened 1 year ago

sharnoff commented 1 year ago

This isn't a bug per se, but when we have a lot of VMs, this will impact the effectiveness of migration enough that it's worth fixing.

In particular, this line is the culprit:

https://github.com/neondatabase/autoscaling/blob/d574fbbb05d6f949510c70009ae7bfd3f83d73a5/pkg/plugin/run.go#L283

sharnoff commented 1 year ago

Looks like we can use https://pkg.go.dev/github.com/tidwall/btree#BTreeG.GetAt to implement this in O(log n).

sharnoff commented 11 months ago

Unassigning myself as I'm not currently working on this.