-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unexpected cpu usage caused by tidb_server_memory_gc_trigger #48741
Labels
affects-6.5
This bug affects the 6.5.x(LTS) versions.
affects-7.1
This bug affects the 7.1.x(LTS) versions.
affects-7.5
This bug affects the 7.5.x(LTS) versions.
severity/major
sig/execution
SIG execution
type/bug
The issue is confirmed as a bug.
Comments
ti-chi-bot
bot
added
may-affects-5.3
This bug maybe affects 5.3.x versions.
may-affects-5.4
This bug maybe affects 5.4.x versions.
may-affects-6.1
may-affects-6.5
may-affects-7.1
may-affects-7.5
labels
Nov 22, 2023
XuHuaiyu
added
affects-6.5
This bug affects the 6.5.x(LTS) versions.
affects-7.1
This bug affects the 7.1.x(LTS) versions.
affects-7.5
This bug affects the 7.5.x(LTS) versions.
and removed
may-affects-5.3
This bug maybe affects 5.3.x versions.
may-affects-5.4
This bug maybe affects 5.4.x versions.
may-affects-6.1
may-affects-6.5
may-affects-7.1
may-affects-7.5
labels
Nov 23, 2023
13 tasks
This was referenced Nov 30, 2023
XuHuaiyu
pushed a commit
to XuHuaiyu/tidb
that referenced
this issue
Jul 1, 2024
13 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
affects-6.5
This bug affects the 6.5.x(LTS) versions.
affects-7.1
This bug affects the 7.1.x(LTS) versions.
affects-7.5
This bug affects the 7.5.x(LTS) versions.
severity/major
sig/execution
SIG execution
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
Analysis:
The tidb-server utilizes
tidb_server_memory_limit_gc_trigger
to set the memory threshold that actively triggers the golang garbage collection (GC). When theheapInUse
memory reaches the threshold oftidb_server_memory_limit * tidb_server_memory_limit_gc_trigger
, it actively triggers a golang GC. To avoid overly frequent GC, in the code implementation, after this threshold is touched once, it is adjusted from the default value of 0.7 to 1.1, and after 1 minute, it is reset back to 0.7.Due to the periodic update of global system variables by tidb-server, the operation of increasing
tidb_server_memory_limit_gc_trigger
from 0.7 to 1.1 to reduce the GC frequency is almost ineffective. Therefore, when theheapInUse
of tidb-server remains above the threshold oftidb_server_memory_limit * tidb_server_memory_limit_gc_trigger
for an extended period, a high-frequency GC phenomenon occurs, leading to the CPU being in a near-maximum utilization state for an extended duration.2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
v7.3.0
The text was updated successfully, but these errors were encountered: