cloudspannerecosystem / autoscaler

Automatically scale the capacity of your Spanner instances based on their utilization.
Apache License 2.0
86 stars 33 forks source link

Best practice scaling metrics using MAX? #345

Closed alexlo03 closed 3 months ago

alexlo03 commented 3 months ago

Hello,

Out of the box this project uses, if I am reading it correctly, the maximum CPU value it sees over a 60s period. Is this recommended? It seems a bit spiky in practice. Would moving to ALIGN_PERCENTILE_95 instead of ALIGN_MAX be recommended or contraindicated?

davidcueva commented 3 months ago

hi Alex,

We have not had reports so far about spikiness because of using ALIGN_MAX, but that may be a side-effect of using a margin which smooths out the spikes. I cannot say for sure if ALIGN_PERCENTILE_95 might be better, but I'm happy to hear your feedback, if you'd like to test it.

Feel free to reopen this thread if you want to report back.

David

alexlo03 commented 3 months ago

For anyone else: "message": "Field aggregation.perSeriesAligner had an invalid value of \"ALIGN_PERCENTILE_95\": The aligner cannot be applied to metrics with kind GAUGE and value type DOUBLE.",