Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1089838 - [GSS] (6.3.0) Full scheduledReferences traversal in every call to ScheduledDeliveryHandlerImpl$ScheduledDeliveryRunnable.run()
[GSS] (6.3.0) Full scheduledReferences traversal in every call to ScheduledDe...
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: HornetQ (Show other bugs)
6.2.1
Unspecified Unspecified
unspecified Severity unspecified
: DR2
: EAP 6.3.0
Assigned To: Clebert Suconic
Miroslav Novak
Russell Dickenson
:
Depends On:
Blocks: 1064596 1084639 1088600
  Show dependency treegraph
 
Reported: 2014-04-22 00:34 EDT by Jimmy Wilson
Modified: 2014-08-06 10:36 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
In previous versions of JBoss EAP 6, if a very large number of messages were scheduled with a small interval, excessive CPU load would result. The root cause of this issue was that at every instance messages were to be consumed, the *whole* of the `scheduledReferences` linked list was traversed unecessarily. This issue has been resolved in this release.
Story Points: ---
Clone Of: 1088600
Environment:
Last Closed: 2014-08-06 10:36:48 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jimmy Wilson 2014-04-22 00:34:37 EDT
+++ This bug was initially created as a clone of Bug #1088600 +++

The method ScheduledDeliveryHandlerImpl$ScheduledDeliveryRunnable.run() unnecessarily does a full traversal of the scheduledReferences linked list on each and every call.

When the number of scheduled messages is very large, this traversal severely impacts HornetQ's performance when consuming scheduled messages.

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
Comment 1 Kabir Khan 2014-07-01 10:26:41 EDT
Should be fixed by upgrade https://bugzilla.redhat.com/show_bug.cgi?id=1064596 for DR2
Comment 2 Miroslav Novak 2014-07-02 03:57:41 EDT
Verified using provided ScheduledDeliveryHandlerTest during EAP 6.3.0.ER7. Thanks!

Note You need to log in before you can comment on or make changes to this bug.