You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/11/03 14:57:03 UTC

[GitHub] [pulsar] lordcheng10 opened a new pull request #12604: OverloadShedder: Sort by throughput in ascending order

lordcheng10 opened a new pull request #12604:
URL: https://github.com/apache/pulsar/pull/12604


   ### Motivation
   In the OverloadShedder strategy, to select a bundle on the broker, first select the one with the largest throughput for unloading, and at least unload a bundle from the broker, which may cause repeated unloads between brokers.
   
   
   ### Modifications
   In the OverloadShedder strategy, to select a bundle on the broker, first select the one with the largest throughput for unloading, and at least unload a bundle from the broker, which may cause repeated unloads between brokers:
   https://github.com/apache/pulsar/blob/6b3fb4193857c324c748ea53ae5e6028137b2e35/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/OverloadShedder.java#L123-L126
   
   ### Documentation
   
   Check the box below and label this PR (if you have committer privilege).
   
   Need to update docs? 
   
   - [ ] `doc-required` 
     
     (If you need help on updating docs, create a doc issue)
     
   - [ ] `no-need-doc` 
     
     (Please explain why)
     
   - [ ] `doc` 
     
     (If this PR contains doc changes)
   
   
   


-- 
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@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lordcheng10 commented on pull request #12604: Optimize OverloadShedder: Sort bundle by throughput in ascending order

Posted by GitBox <gi...@apache.org>.
lordcheng10 commented on pull request #12604:
URL: https://github.com/apache/pulsar/pull/12604#issuecomment-959730273






-- 
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@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lordcheng10 commented on pull request #12604: Optimize OverloadShedder: Sort bundle by throughput in ascending order

Posted by GitBox <gi...@apache.org>.
lordcheng10 commented on pull request #12604:
URL: https://github.com/apache/pulsar/pull/12604#issuecomment-959730273


   /pulsarbot run-failure-checks
   
   


-- 
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@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] github-actions[bot] commented on pull request #12604: Optimize OverloadShedder: Sort bundle by throughput in ascending order

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #12604:
URL: https://github.com/apache/pulsar/pull/12604#issuecomment-1052937924


   The pr had no activity for 30 days, mark with Stale label.


-- 
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@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] github-actions[bot] commented on pull request #12604: OverloadShedder: Sort by throughput in ascending order

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #12604:
URL: https://github.com/apache/pulsar/pull/12604#issuecomment-959341128


   @lordcheng10:Thanks for providing doc info!


-- 
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@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] Jason918 commented on a change in pull request #12604: Optimize OverloadShedder: Sort bundle by throughput in ascending order

Posted by GitBox <gi...@apache.org>.
Jason918 commented on a change in pull request #12604:
URL: https://github.com/apache/pulsar/pull/12604#discussion_r742473185



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/OverloadShedder.java
##########
@@ -121,8 +121,8 @@
                 }).filter(e ->
                         localData.getBundles().contains(e.getLeft())
                 ).sorted((e1, e2) -> {
-                    // Sort by throughput in reverse order
-                    return Double.compare(e2.getRight(), e1.getRight());
+                    // Sort by throughput in ascending order

Review comment:
       Are you changing "pick the biggest N bundles" to "pick the smallest N bundles" to unload?
   It's better you could come up with more solid reasons to do so.
   Using the smallest still won't avoid repeated unloading completely.




-- 
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@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] github-actions[bot] commented on pull request #12604: OverloadShedder: Sort by throughput in ascending order

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #12604:
URL: https://github.com/apache/pulsar/pull/12604#issuecomment-959340614


   @lordcheng10:Thanks for your contribution. For this PR, do we need to update docs?
   (The [PR template contains info about doc](https://github.com/apache/pulsar/blob/master/.github/PULL_REQUEST_TEMPLATE.md#documentation), which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)


-- 
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@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lordcheng10 commented on pull request #12604: Optimize OverloadShedder: Sort bundle by throughput in ascending order

Posted by GitBox <gi...@apache.org>.
lordcheng10 commented on pull request #12604:
URL: https://github.com/apache/pulsar/pull/12604#issuecomment-959730273






-- 
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@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] github-actions[bot] commented on pull request #12604: OverloadShedder: Sort by throughput in ascending order

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #12604:
URL: https://github.com/apache/pulsar/pull/12604#issuecomment-959340614






-- 
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@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] github-actions[bot] commented on pull request #12604: OverloadShedder: Sort by throughput in ascending order

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #12604:
URL: https://github.com/apache/pulsar/pull/12604#issuecomment-959340614






-- 
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@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org