You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "xinyiZzz (via GitHub)" <gi...@apache.org> on 2023/03/01 11:13:04 UTC
[GitHub] [doris] xinyiZzz opened a new pull request, #17301: [enhancement](memtracker) Make memory tracker faster and fix thread create and destroy track
xinyiZzz opened a new pull request, #17301:
URL: https://github.com/apache/doris/pull/17301
# Proposed changes
Issue Number: close #xxx
## Problem summary
1. Add a special counter for memtracker, faster, but relaxed ordering and not accurate in real time
2. Thread create and destroy memory tracking, previously removed due to performance loss, and added back
## Checklist(Required)
* [ ] Does it affect the original behavior
* [ ] Has unit tests been added
* [ ] Has document been added or modified
* [ ] Does it need to update dependencies
* [ ] Is this PR support rollback (If NO, please explain WHY)
## Further comments
If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #17301: [enhancement](memtracker) Make memory tracker faster and fix thread create and destroy track
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #17301:
URL: https://github.com/apache/doris/pull/17301#issuecomment-1449942457
PR approved by at least one committer and no changes requested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on a diff in pull request #17301: [enhancement](memtracker) Make memory tracker faster and fix thread create and destroy track
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #17301:
URL: https://github.com/apache/doris/pull/17301#discussion_r1121548757
##########
be/src/runtime/memory/mem_tracker.h:
##########
@@ -43,6 +43,50 @@ class MemTracker {
int64_t peak_consumption = 0;
};
+ // A counter that keeps track of the current and peak value seen.
+ // Relaxed ordering, not accurate in real time.
+ class MemCounter {
+ public:
+ MemCounter() : _current_value(0), _peak_value(0) {}
+
+ void add(int64_t delta) {
+ _current_value.fetch_add(delta, std::memory_order_relaxed);
+ update_peak();
+ }
+
+ void add_no_update_peak(int64_t delta) {
+ _current_value.fetch_add(delta, std::memory_order_relaxed);
+ }
+
+ bool try_add(int64_t delta, int64_t max) {
+ if (UNLIKELY(_current_value.load(std::memory_order_relaxed) + delta > max))
+ return false;
Review Comment:
warning: statement should be inside braces [readability-braces-around-statements]
```suggestion
if (UNLIKELY(_current_value.load(std::memory_order_relaxed) + delta > max)) {
return false;
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #17301: [enhancement](memtracker) Make memory tracker faster and fix thread create and destroy track
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #17301:
URL: https://github.com/apache/doris/pull/17301#issuecomment-1449942598
PR approved by anyone and no changes requested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] xinyiZzz commented on pull request #17301: [enhancement](memtracker) Make memory tracker faster and fix thread create and destroy track
Posted by "xinyiZzz (via GitHub)" <gi...@apache.org>.
xinyiZzz commented on PR #17301:
URL: https://github.com/apache/doris/pull/17301#issuecomment-1449953675
run buildall
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] hello-stephen commented on pull request #17301: [enhancement](memtracker) Make memory tracker faster and fix thread create and destroy track
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #17301:
URL: https://github.com/apache/doris/pull/17301#issuecomment-1450073730
TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 34.36 seconds
stream load tsv: 471 seconds loaded 74807831229 Bytes, about 151 MB/s
stream load json: 36 seconds loaded 2358488459 Bytes, about 62 MB/s
stream load orc: 67 seconds loaded 1101869774 Bytes, about 15 MB/s
stream load parquet: 28 seconds loaded 861443392 Bytes, about 29 MB/s
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230301123132_clickbench_pr_106481.html
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] yiguolei merged pull request #17301: [enhancement](memtracker) Add special counter for memtracker and fix thread create and destroy track
Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei merged PR #17301:
URL: https://github.com/apache/doris/pull/17301
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org