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 2019/07/17 14:57:43 UTC

[GitHub] [qpid-dispatch] franz1981 edited a comment on issue #508: DISPATCH-1342 Replaced mutex with spin lock on qd_message content

franz1981 edited a comment on issue #508: DISPATCH-1342 Replaced mutex with spin lock on qd_message content
URL: https://github.com/apache/qpid-dispatch/pull/508#issuecomment-505461704
 
 
   @astitcher 
   I believe that the doc of spin lock is excessively conservative TBH (with good reasons, given how many archs it has to cover), but it gives nice hints to make things more resilient on not properly configured box/limited machines.
   Although not written on the stone, the router need at least 2 HW threads to run properly (1 core + 1 I/O worker) and it's true that a single core machine with HyperThread will suffer by using spin locks.  Same thing can be said if you run the router configuring (much) more threads then real cores...
   In those cases I'm not quite sure the router will perform optimally, but makes sense to account for them too: in all the other cases, assuming the previous correctness conditions to be met, I believe using spin locks would be just a win resource-wise, given the peculiar design of the router (no thread pools, just fixed numbers of threads with specific roles). 
   
   I suggest, if not possible to accept this PR, to consider pooling mutexes to reduce the allocation/deallocation rate for such heavyweight kernel resources.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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