matrixorigin / matrixone

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

[Tech Request]: support dynamic hardware resources reflection #16537

Open aylei opened 3 months ago

aylei commented 3 months 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 ?

Support dynamic hardware resources reflection in MO, the hardware resources MO reported to HAKeeper should be refreshed when the underlying allocated resources changed.

Why is this needed ?

Currently, MO discover the allocated hardware resources only once. In dynamic environments where the resource of MO is not consistent (e.g. tune cpu/memory limit via cgroup dynamically), the discovered value would be stale.

Additional information

No response

xzxiong commented 2 weeks ago

change:

  1. mo 计算当前cn 的 cgroup配置,并通过 hakeeper 推送给所有的cn, https://github.com/matrixorigin/matrixone/pull/18167
  2. 基于query_service 提供 rpc 接口对 go runtime 参数 GOMAXPROCS 和 GOMEMLIMIT 进行修改 https://github.com/matrixorigin/matrixone/pull/18330
    • 接口 GoMaxProcs
    • 接口 GoMemLimit