7 Replies Latest reply on Nov 15, 2013 5:15 PM by tmonk

    Performance issue in ScheduledDeliveryHandlerImpl$ScheduledDeliveryRunnable.run()

    tmonk

      We are using HornetQ 2.2.24 in an application where we schedule ~400,000 messages in a single queue to be consumed several hours into the future, with large bursts of messages to be consumed as quickly as possible. In this application, we have found that HornetQ's rate of consuming scheduled messages is limited by CPU. From performance profiling, we found that the method

       

      org.hornetq.core.server.impl.ScheduledDeliveryHandlerImpl$ScheduledDeliveryRunnable.run()

       

      is consuming approximately 70-80% of the CPU cycles during bursts. Looking at the code, this is due to the full traversal of the scheduledReferences linked list on every call to run():

      https://github.com/hornetq/hornetq/blob/HornetQ_2_2_24_EAP_GA/src/main/org/hornetq/core/server/impl/ScheduledDeliveryHandlerImpl.java#L181

       

      This method could be made significantly more efficient.

       

      I can't find any mention of this performance issue in the forums or in HornetQ's JIRA. Has this performance issue been reported before?

       

      I can provide more detailed steps to reproduce if necessary...

       

      Thanks,

      Tom