pingcap / pingcap/tidb

Disk spill is better placed in actionMuForSoftLimit than actionMuForHardLimit

Open
#38,398 1 comment 0 reactions 0 assignees View on GitHub
type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Enhancement
The action (distsplillaction sortspillaction) in {{actionMuForHardLimit}}. I think it would be better to put it in {{actionMuForSoftLimit}}. This way, assuming the statement quota memory limit is 1GB, I can set it to trigger disk spill when 50% of the statement memory limit is reached. And the softlimit ratio (default: 0.8) can be set by the user.

https://github.com/pingcap/tidb/blob/accff686216c62c8a1f7bdb597141e666e3f2bde/util/memory/tracker.go#L68

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.