Global memory quota for tidb to avoid OOM
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
Even though there's setting to set memory quota per single query, for a heavy loaded cluster it's often not enough, and as result, while a single query does not exceed the quota, when there's plenty of them running in parallel, this ends up with tidb crashing with OOM.
Therefore, there's need to have global quota as well - to abort most recent or most heavy query if global quota is reached instead of being killed by OOM (and aborting all queries being executed via this instance).
Furthermore, tidb node killed by OOM is often unable to rejoin cluster without another manual restart, what makes things even more complicated (details to be provided separately).
Contributor guide
Assessment
This issue has not been assessed yet.