You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2021/11/02 09:20:22 UTC

[GitHub] [qpid-jms] franz1981 edited a comment on pull request #44: QPIDJMS-552 JMS 2 Completion threads shouldn't scale with the number of sessions

franz1981 edited a comment on pull request #44:
URL: https://github.com/apache/qpid-jms/pull/44#issuecomment-957253435


   I've sent a change that it's introducing `HolderSuppliers` (bad name, so happy to receive feedbacks/suggestions) and `SharedDisposable` as a util that could be used on https://github.com/apache/qpid-jms/pull/45 to handle shared disposable/pre-configured reference counted resources.
   
   Some points re this change:
   
   1. thanks to FJ work stealing having a thread busy/blocked processing completions isn't a big deal as long as other FJ threads can handle other sessions completions 
   2. fairness isn't still "right": a perfectly fair system should just process a single completion and continue on the FJ pool, to guarantee other completions to get their chance to get executed; I've chosen to execute burst of completions to amortize the "virtual context switch" cost, improving locality, but in theory would be better to cap (time based) for how much time a burst of completions should keep a single thread busy (a good number could be the N * default timeslack_ns of linux ie N* 50 us)
   
   It can now save creating a number of completion threads that is bounded to the number of sessions, just by adding `completionThreads=N` to the qpid url 
   
   This is one run of the [previous benchmarks](https://github.com/apache/qpid-jms/pull/44#issuecomment-951904530) with `completionThreads=2`, in violet, the FJ pool (single) thread in action, with 89 + 88 = 177 samples:
   ![image](https://user-images.githubusercontent.com/13125299/139819115-115c45fd-a7e2-436c-9157-9ae04ed7349d.png)
   
   ```
    -> TEST        16,959  msg/sec
    -> TEST        17,391  msg/sec
    -> TEST        16,986  msg/sec
    -> TEST        17,377  msg/sec
    -> TEST        16,997  msg/sec
    -> TEST        17,415  msg/sec
    -> TEST        16,978  msg/sec
    -> TEST        17,379  msg/sec
    -> TEST        16,987  msg/sec
    -> TEST        17,385  msg/sec
    -> *   171,857 msg/sec
   ```
   
   
   


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org