matrixorigin / matrixone

Hyperconverged cloud-edge native database
https://docs.matrixorigin.cn/en
Apache License 2.0
1.79k stars 277 forks source link

[Tech Request]: dynamic adjustment of GCPercent via RPC #19416

Open xzxiong opened 1 month ago

xzxiong commented 1 month ago

Is there an existing issue for the same tech request?

Does this tech request not affect user experience?

What would you like to be added ?

An API that allows set/get GCPercent at runtime, the change should take effect before the RPC returns.

Why is this needed ?

The ability to dynamically adjust the GCPercent parameter at runtime via RPC, instead of setting GOMEMLIMIT byte paramter. A better way to adjust gc trigger.

Additional information

No response

reusee commented 3 weeks ago

https://pkg.go.dev/runtime/debug#SetMemoryLimit

https://pkg.go.dev/runtime/debug#SetGCPercent

用这两个函数即可。

TangxingZhou commented 4 days ago
image

测试通过