pingcap / pingcap/tidb

Global memory quota for tidb to avoid OOM

Open
#35,981 0 comments 0 reactions 0 assignees View on GitHub
type/feature-request
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.