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

IndexHashJoin got performance regression because of usage of sync.Pool #38695

Closed
guo-shaoge opened this issue Oct 27, 2022 · 2 comments · Fixed by #38741
Closed

IndexHashJoin got performance regression because of usage of sync.Pool #38695

guo-shaoge opened this issue Oct 27, 2022 · 2 comments · Fixed by #38741
Assignees
Labels

Comments

@guo-shaoge
Copy link
Collaborator

guo-shaoge commented Oct 27, 2022

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Internal process to reproduce(incall-211).

Performance of IndexHashJoin_242 got regression compared to v6.1.0. #38591 revert this #34878, IndexHashJoin_242 is normal again.

2. What did you expect to see? (Required)

image

3. What did you see instead (Required)

NewIterator4Slice() takes too much cpu.

image

4. What is your TiDB version? (Required)

v6.2/v6.3

@guo-shaoge guo-shaoge added the type/bug The issue is confirmed as a bug. label Oct 27, 2022
@guo-shaoge guo-shaoge self-assigned this Oct 28, 2022
@ti-chi-bot ti-chi-bot added may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. 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.0 may-affects-6.1 labels Oct 28, 2022
@Yui-Song Yui-Song added sig/execution SIG execution and removed may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. 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-5.0 This bug maybe affects 5.0.x versions. may-affects-6.0 may-affects-6.1 labels Oct 28, 2022
@XuHuaiyu
Copy link
Contributor

Does it mean IndexHashJoin does not invoke the pool correctly?

@guo-shaoge
Copy link
Collaborator Author

Multiple goroutines of IndexHashJoin call NewIterator4Slice concurrently for each outer row(500W), I think the there are some lock contentions in sync.Pool.Get()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants