Skip to content

Add tokio runtime memory tracker #2356

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

Merged
merged 7 commits into from
Oct 21, 2021

Conversation

zhang2014
Copy link
Member

@zhang2014 zhang2014 commented Oct 20, 2021

I hereby agree to the terms of the CLA available at: https://databend.rs/policies/cla/

Summary

Add tokio runtime memory tracker

Changelog

  • Improvement

Related Issues

#2299 (comment)
Fixes #1148

Test Plan

Unit Tests

Stateless Tests

@databend-bot
Copy link
Member

Thanks for the contribution!
I have applied any labels matching special text in your PR Changelog.

Please review the labels and make any necessary changes.

@drmingdrmer
Copy link
Member

Love it XDDD

@zhang2014 zhang2014 marked this pull request as ready for review October 21, 2021 10:21
@zhang2014
Copy link
Member Author

zhang2014 commented Oct 21, 2021

memory_usage may be incorrect and we fix it in another pr

@zhang2014 zhang2014 requested review from drmingdrmer, sundy-li and BohuTANG and removed request for drmingdrmer and sundy-li October 21, 2021 10:23
@codecov-commenter
Copy link

codecov-commenter commented Oct 21, 2021

Codecov Report

Merging #2356 (522462f) into main (9f3e325) will decrease coverage by 0%.
The diff coverage is 71%.

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #2356   +/-   ##
=====================================
- Coverage     71%     71%   -1%     
=====================================
  Files        636     638    +2     
  Lines      35853   35941   +88     
=====================================
+ Hits       25515   25576   +61     
- Misses     10338   10365   +27     
Impacted Files Coverage Δ
common/base/src/shutdown_signal.rs 0% <ø> (ø)
common/mem/mem-allocator/src/allocators.rs 100% <ø> (ø)
...src/datasources/database/system/processes_table.rs 30% <25%> (-1%) ⬇️
common/base/src/runtime_tracker.rs 69% <69%> (ø)
common/base/src/runtime.rs 94% <82%> (-3%) ⬇️
common/base/src/thread.rs 88% <88%> (ø)
query/src/common/mod.rs 69% <0%> (-4%) ⬇️
common/management/src/namespace/namespace_mgr.rs 70% <0%> (-3%) ⬇️
common/clickhouse-srv/src/cmd.rs 84% <0%> (+1%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9f3e325...522462f. Read the comment docs.

@zhang2014 zhang2014 changed the title Add tokio runtime tracker Add tokio runtime memory tracker Oct 21, 2021
@BohuTANG
Copy link
Member

Love it \XDDD

@drmingdrmer
Copy link
Member

/lgtm

refreshing!

@databend-bot
Copy link
Member

Approved! Thank you for the PR @zhang2014

@drmingdrmer
Copy link
Member

Curious about how to accumulate the session memory cost 🤔 :

As it is a tree of threads.
Is there some one-to-one mapping between session and a node on the tree?

@databend-bot
Copy link
Member

CI Passed
Reviewer Approved
Let's Merge

@databend-bot databend-bot merged commit d5b307c into databendlabs:main Oct 21, 2021
@zhang2014
Copy link
Member Author

Curious about how to accumulate the session memory cost 🤔 :
As it is a tree of threads.
Is there some one-to-one mapping between session and a node on the tree?

There is always a one-to-one mapping between tokio runtime and session in the databend query

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

Successfully merging this pull request may close these issues.

[memory] session memory usage
6 participants