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

abnormal memory usage by the grpc packet #34849

Open
tiancaiamao opened this issue May 20, 2022 · 0 comments
Open

abnormal memory usage by the grpc packet #34849

tiancaiamao opened this issue May 20, 2022 · 0 comments
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@tiancaiamao
Copy link
Contributor

Enhancement

Analyzing the memory usage of this case

mysql -h 127.0.0.1 -u root -P 4000  -e 'select * from  (select * from ens_rb001.rb_acct_balance union all select * from ens_rb002.rb_acct_balance union all select * from ens_rb003.rb_acct_balance union all select * from ens_rb004.rb_acct_balance)' > /dev/null

image

Union all on 4 tables, and the default distsql scan concurrency is 15, it means that in in theory, there should be at most 4*15 = 60 inflight packet.

530.16M/3.51M > 150, there are more than 150 packet inuse grpc packet, which is counterintuitive.

It's caused by that we use buffered channel, so even the distsql scan concurrency is 15,
there will be much more packets than the worker count.

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
Development

No branches or pull requests

1 participant