You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/02/14 13:48:25 UTC
[GitHub] [rocketmq] Erik1288 opened a new pull request #3847: [ISSUE #3831] Swapping mapped-byte-buffer to save memory on a system with extra-large disks.
Erik1288 opened a new pull request #3847:
URL: https://github.com/apache/rocketmq/pull/3847
**Make sure set the target branch to `develop`**
## What is the purpose of the change
Swapping mapped-byte-buffer to save memory on a system with ultra-large disks(more than 10TB).
## Brief changelog
periodically clean up the mmap of "cold data".
## Verifying this change
pass ut.
Follow this checklist to help us incorporate your contribution quickly and easily. Notice, `it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR`.
- [x] Make sure there is a [Github issue](https://github.com/apache/rocketmq/issues) filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
- [x] Format the pull request title like `[ISSUE #123] Fix UnknownException when host config not exist`. Each commit in the pull request should have a meaningful subject line and body.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in [test module](https://github.com/apache/rocketmq/tree/master/test).
- [x] Run `mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle` to make sure basic checks pass. Run `mvn clean install -DskipITs` to make sure unit-test pass. Run `mvn clean test-compile failsafe:integration-test` to make sure integration-test pass.
- [ ] If this contribution is large, please file an [Apache Individual Contributor License Agreement](http://www.apache.org/licenses/#clas).
--
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] zhouxinyu commented on pull request #3847: [ISSUE #3831] Swapping mapped-byte-buffer to save memory on a system with extra-large disks.
Posted by GitBox <gi...@apache.org>.
zhouxinyu commented on pull request #3847:
URL: https://github.com/apache/rocketmq/pull/3847#issuecomment-1039797956
More suggested comments:
1. Add some comments for interface Swappable, it's difficult to understand the specific meaning of `swapMap` and `cleanSwappedMap` directly.
2. Add unit tests for this PR, and the implementations of `Swappable`.
3. Maybe only MappedFile and MappedFileQueue implement `Swappable` is enough, it's a little strange that CommitLog and ConsumeQueueStore also is a subclass of this interface.
And a technical question:
1. We mapped twice for writing when the old buffer hasn't been cleaned, is there a write conflict problem in this situation? Although the cleaner won't clean the last writing file, the file doesn't know it.
--
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] coveralls commented on pull request #3847: [ISSUE #3831] Swapping mapped-byte-buffer to save memory on a system with extra-large disks.
Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #3847:
URL: https://github.com/apache/rocketmq/pull/3847#issuecomment-1039194596
[![Coverage Status](https://coveralls.io/builds/46519080/badge)](https://coveralls.io/builds/46519080)
Coverage increased (+0.09%) to 52.707% when pulling **40a86b371132090f76ebe54c86837c71583297d8 on Erik1288:5.0.0-alpha-swap-page-table** into **de76e06d6da8e8646d2ac59ea061e8dc2653aae8 on apache:5.0.0-alpha**.
--
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] zhouxinyu removed a comment on pull request #3847: [ISSUE #3831] Swapping mapped-byte-buffer to save memory on a system with extra-large disks.
Posted by GitBox <gi...@apache.org>.
zhouxinyu removed a comment on pull request #3847:
URL: https://github.com/apache/rocketmq/pull/3847#issuecomment-1039797956
More suggested comments:
1. Add some comments for interface Swappable, it's difficult to understand the specific meaning of `swapMap` and `cleanSwappedMap` directly.
2. Add unit tests for this PR, and the implementations of `Swappable`.
3. Maybe only MappedFile and MappedFileQueue implement `Swappable` is enough, it's a little strange that CommitLog and ConsumeQueueStore also is a subclass of this interface.
And a technical question:
1. We mapped twice for writing when the old buffer hasn't been cleaned, is there a write conflict problem in this situation? Although the cleaner won't clean the last writing file, the file doesn't know it.
--
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] Erik1288 closed pull request #3847: [ISSUE #3831] Swapping mapped-byte-buffer to save memory on a system with extra-large disks.
Posted by GitBox <gi...@apache.org>.
Erik1288 closed pull request #3847:
URL: https://github.com/apache/rocketmq/pull/3847
--
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] Erik1288 closed pull request #3847: [ISSUE #3831] Swapping mapped-byte-buffer to save memory on a system with extra-large disks.
Posted by GitBox <gi...@apache.org>.
Erik1288 closed pull request #3847:
URL: https://github.com/apache/rocketmq/pull/3847
--
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] zhouxinyu commented on pull request #3847: [ISSUE #3831] Swapping mapped-byte-buffer to save memory on a system with extra-large disks.
Posted by GitBox <gi...@apache.org>.
zhouxinyu commented on pull request #3847:
URL: https://github.com/apache/rocketmq/pull/3847#issuecomment-1039778656
The commits are confused, we have 126 commits with only two simple code segments. I suggest squashing these commits to one commit.
--
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] zhouxinyu removed a comment on pull request #3847: [ISSUE #3831] Swapping mapped-byte-buffer to save memory on a system with extra-large disks.
Posted by GitBox <gi...@apache.org>.
zhouxinyu removed a comment on pull request #3847:
URL: https://github.com/apache/rocketmq/pull/3847#issuecomment-1039797956
More suggested comments:
1. Add some comments for interface Swappable, it's difficult to understand the specific meaning of `swapMap` and `cleanSwappedMap` directly.
2. Add unit tests for this PR, and the implementations of `Swappable`.
3. Maybe only MappedFile and MappedFileQueue implement `Swappable` is enough, it's a little strange that CommitLog and ConsumeQueueStore also is a subclass of this interface.
And a technical question:
1. We mapped twice for writing when the old buffer hasn't been cleaned, is there a write conflict problem in this situation? Although the cleaner won't clean the last writing file, the file doesn't know it.
--
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] zhouxinyu commented on pull request #3847: [ISSUE #3831] Swapping mapped-byte-buffer to save memory on a system with extra-large disks.
Posted by GitBox <gi...@apache.org>.
zhouxinyu commented on pull request #3847:
URL: https://github.com/apache/rocketmq/pull/3847#issuecomment-1039778656
--
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] codecov-commenter commented on pull request #3847: [ISSUE #3831] Swapping mapped-byte-buffer to save memory on a system with extra-large disks.
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #3847:
URL: https://github.com/apache/rocketmq/pull/3847#issuecomment-1039178570
# [Codecov](https://codecov.io/gh/apache/rocketmq/pull/3847?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#3847](https://codecov.io/gh/apache/rocketmq/pull/3847?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (40a86b3) into [5.0.0-alpha](https://codecov.io/gh/apache/rocketmq/commit/de76e06d6da8e8646d2ac59ea061e8dc2653aae8?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (de76e06) will **increase** coverage by `0.09%`.
> The diff coverage is `85.18%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/rocketmq/pull/3847/graphs/tree.svg?width=650&height=150&src=pr&token=4w0sxP1wZv&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/rocketmq/pull/3847?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## 5.0.0-alpha #3847 +/- ##
=================================================
+ Coverage 46.50% 46.59% +0.09%
- Complexity 5330 5349 +19
=================================================
Files 641 641
Lines 44348 44375 +27
Branches 6117 6121 +4
=================================================
+ Hits 20624 20677 +53
+ Misses 20998 20971 -27
- Partials 2726 2727 +1
```
| [Impacted Files](https://codecov.io/gh/apache/rocketmq/pull/3847?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...org/apache/rocketmq/store/DefaultMessageStore.java](https://codecov.io/gh/apache/rocketmq/pull/3847/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL0RlZmF1bHRNZXNzYWdlU3RvcmUuamF2YQ==) | `58.45% <85.18%> (+0.68%)` | :arrow_up: |
| [...rocketmq/broker/filtersrv/FilterServerManager.java](https://codecov.io/gh/apache/rocketmq/pull/3847/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvZmlsdGVyc3J2L0ZpbHRlclNlcnZlck1hbmFnZXIuamF2YQ==) | `20.00% <0.00%> (-14.29%)` | :arrow_down: |
| [...che/rocketmq/acl/plain/PlainPermissionManager.java](https://codecov.io/gh/apache/rocketmq/pull/3847/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YWNsL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9hY2wvcGxhaW4vUGxhaW5QZXJtaXNzaW9uTWFuYWdlci5qYXZh) | `70.53% <0.00%> (-1.34%)` | :arrow_down: |
| [...ava/org/apache/rocketmq/filter/util/BitsArray.java](https://codecov.io/gh/apache/rocketmq/pull/3847/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZmlsdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9maWx0ZXIvdXRpbC9CaXRzQXJyYXkuamF2YQ==) | `59.82% <0.00%> (ø)` | |
| [...etmq/client/latency/LatencyFaultToleranceImpl.java](https://codecov.io/gh/apache/rocketmq/pull/3847/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvbGF0ZW5jeS9MYXRlbmN5RmF1bHRUb2xlcmFuY2VJbXBsLmphdmE=) | `50.00% <0.00%> (ø)` | |
| [...mq/client/impl/producer/DefaultMQProducerImpl.java](https://codecov.io/gh/apache/rocketmq/pull/3847/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9wcm9kdWNlci9EZWZhdWx0TVFQcm9kdWNlckltcGwuamF2YQ==) | `46.13% <0.00%> (+0.24%)` | :arrow_up: |
| [...he/rocketmq/client/trace/AsyncTraceDispatcher.java](https://codecov.io/gh/apache/rocketmq/pull/3847/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvdHJhY2UvQXN5bmNUcmFjZURpc3BhdGNoZXIuamF2YQ==) | `78.21% <0.00%> (+0.49%)` | :arrow_up: |
| [...main/java/org/apache/rocketmq/store/CommitLog.java](https://codecov.io/gh/apache/rocketmq/pull/3847/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL0NvbW1pdExvZy5qYXZh) | `67.95% <0.00%> (+0.49%)` | :arrow_up: |
| [...va/org/apache/rocketmq/store/util/PerfCounter.java](https://codecov.io/gh/apache/rocketmq/pull/3847/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL3V0aWwvUGVyZkNvdW50ZXIuamF2YQ==) | `65.96% <0.00%> (+1.04%)` | :arrow_up: |
| [...n/java/org/apache/rocketmq/store/ConsumeQueue.java](https://codecov.io/gh/apache/rocketmq/pull/3847/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL0NvbnN1bWVRdWV1ZS5qYXZh) | `67.20% <0.00%> (+1.06%)` | :arrow_up: |
| ... and [4 more](https://codecov.io/gh/apache/rocketmq/pull/3847/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/rocketmq/pull/3847?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/rocketmq/pull/3847?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [de76e06...40a86b3](https://codecov.io/gh/apache/rocketmq/pull/3847?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org