[ 
https://issues.apache.org/jira/browse/ARTEMIS-4814?focusedWorklogId=923144&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-923144
 ]

ASF GitHub Bot logged work on ARTEMIS-4814:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/Jun/24 14:17
            Start Date: 12/Jun/24 14:17
    Worklog Time Spent: 10m 
      Work Description: joshb1050 commented on PR #4972:
URL: 
https://github.com/apache/activemq-artemis/pull/4972#issuecomment-2163134836

   @clebertsuconic I believe I have fixed, though I wasn't able to see all of 
those test failures when running locally (and it shows me as the CI passing as 
well).
   
   This is needed because each time one connection disconnects, say, with a few 
thousand consumers, the `TempQueueCleanerUpper` needs to clean each of these 
up, and it invokes `getDirectBindings` for each—so then this ends up being `O(k 
* n)` where `k` is the number of queues on the server and `n` is the number of 
consumers on the connection. It completely stops the server from functioning, 
and seems to be a blocker for any setup that has a few hundred thousand plus 
temp queues. 




Issue Time Tracking
-------------------

    Worklog Id:     (was: 923144)
    Time Spent: 40m  (was: 0.5h)

> Remove linear iteration to get direct bindings
> ----------------------------------------------
>
>                 Key: ARTEMIS-4814
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-4814
>             Project: ActiveMQ Artemis
>          Issue Type: Task
>          Components: Broker
>            Reporter: Josh Byster
>            Priority: Minor
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Currently, with 500K+ queues, the cleanup step of {{TempQueueCleanerUpper}} 
> requires invoking {{WildcardAddressManager#getDirectBindings}}, which is O(k) 
> in the number of queues.
> From method profiling, this can consume up to 95% of our CPU time when 
> needing to clean up many of these. 
> It would be nice to make this more efficient, which shouldn't be difficult 
> given the iteration just does a simple equality check.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@activemq.apache.org
For additional commands, e-mail: issues-h...@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact


Reply via email to