Skip to content
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

Frequently new a timer may cost too much memory #6719

Closed
rleungx opened this issue Jun 29, 2023 · 1 comment · Fixed by #6720 or #6730
Closed

Frequently new a timer may cost too much memory #6719

rleungx opened this issue Jun 29, 2023 · 1 comment · Fixed by #6720 or #6730
Assignees
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@rleungx
Copy link
Member

rleungx commented Jun 29, 2023

Enhancement Task

After we upgrade, PD consumes more memory compared to before.
ePWuRRzpCj
For each request, we will create a deadline that contains a timer. We should improve it in this kind of situation.

@rleungx rleungx added the type/enhancement The issue or PR belongs to an enhancement. label Jun 29, 2023
@lhy1024 lhy1024 self-assigned this Jun 29, 2023
@lhy1024
Copy link
Contributor

lhy1024 commented Jun 29, 2023

Besides TSDeadline, time.After also cost too much memory
image

It is unrecommended to use time.After in for-select

ti-chi-bot bot added a commit that referenced this issue Jun 30, 2023
close #6719, ref #6720

Signed-off-by: lhy1024 <[email protected]>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
ti-chi-bot bot added a commit that referenced this issue Jul 3, 2023
close #6719

Signed-off-by: lhy1024 <[email protected]>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
rleungx pushed a commit to rleungx/pd that referenced this issue Aug 2, 2023
close tikv#6719, ref tikv#6720

Signed-off-by: lhy1024 <[email protected]>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
rleungx pushed a commit to rleungx/pd that referenced this issue Aug 2, 2023
close tikv#6719

Signed-off-by: lhy1024 <[email protected]>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
rleungx pushed a commit to rleungx/pd that referenced this issue Aug 2, 2023
close tikv#6719, ref tikv#6720

Signed-off-by: lhy1024 <[email protected]>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
rleungx pushed a commit to rleungx/pd that referenced this issue Aug 2, 2023
close tikv#6719

Signed-off-by: lhy1024 <[email protected]>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
2 participants