You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Kevin Yaussy (JIRA)" <ji...@apache.org> on 2007/04/16 20:39:34 UTC

[jira] Created: (AMQ-1231) Performance issues with org/apache/activemq/broker/region/PrefetchSubscription.java and org/apache/activemq/store/kahadaptor/KahaTopicMessageStore.java

Performance issues with org/apache/activemq/broker/region/PrefetchSubscription.java and org/apache/activemq/store/kahadaptor/KahaTopicMessageStore.java
-------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: AMQ-1231
                 URL: https://issues.apache.org/activemq/browse/AMQ-1231
             Project: ActiveMQ
          Issue Type: Improvement
          Components: Broker
    Affects Versions: 4.2.0
            Reporter: Kevin Yaussy
             Fix For: 4.2.0
         Attachments: KahaTopicMessageStore.java, PrefetchSubscription.java

Using Solaris 10 DTrace, I found a couple intense synchronization pinch-points in the Broker.  Without altering the locking semantics, I converted the synchronized methods and one synchronized code block to the JDK 1.5 ReentrantLock.  There was a pretty significant performance benefit with this change.  I've attached the code, together with the old synchronized code commented out for ease of change examination.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-1231) Performance issues with org/apache/activemq/broker/region/PrefetchSubscription.java and org/apache/activemq/store/kahadaptor/KahaTopicMessageStore.java

Posted by "Kevin Yaussy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-1231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41218#action_41218 ] 

Kevin Yaussy commented on AMQ-1231:
-----------------------------------

Rob, sorry for the delay in responding.  I've taken the 1/17/2008 snapshot and have been testing with that for the last couple weeks.  Base Kaha performance actually seems better, anyway. So, I think what you've got is good.

Thanks.  

Kevin.


> Performance issues with org/apache/activemq/broker/region/PrefetchSubscription.java and org/apache/activemq/store/kahadaptor/KahaTopicMessageStore.java
> -------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1231
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1231
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Broker
>    Affects Versions: 5.0.0
>            Reporter: Kevin Yaussy
>            Assignee: Rob Davies
>             Fix For: 5.1.0
>
>         Attachments: KahaTopicMessageStore.java, PrefetchSubscription.java
>
>
> Using Solaris 10 DTrace, I found a couple intense synchronization pinch-points in the Broker.  Without altering the locking semantics, I converted the synchronized methods and one synchronized code block to the JDK 1.5 ReentrantLock.  There was a pretty significant performance benefit with this change.  I've attached the code, together with the old synchronized code commented out for ease of change examination.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (AMQ-1231) Performance issues with org/apache/activemq/broker/region/PrefetchSubscription.java and org/apache/activemq/store/kahadaptor/KahaTopicMessageStore.java

Posted by "Rob Davies (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rob Davies reassigned AMQ-1231:
-------------------------------

    Assignee: Rob Davies

> Performance issues with org/apache/activemq/broker/region/PrefetchSubscription.java and org/apache/activemq/store/kahadaptor/KahaTopicMessageStore.java
> -------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1231
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1231
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Broker
>    Affects Versions: 5.0.0
>            Reporter: Kevin Yaussy
>            Assignee: Rob Davies
>             Fix For: 5.1.0
>
>         Attachments: KahaTopicMessageStore.java, PrefetchSubscription.java
>
>
> Using Solaris 10 DTrace, I found a couple intense synchronization pinch-points in the Broker.  Without altering the locking semantics, I converted the synchronized methods and one synchronized code block to the JDK 1.5 ReentrantLock.  There was a pretty significant performance benefit with this change.  I've attached the code, together with the old synchronized code commented out for ease of change examination.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AMQ-1231) Performance issues with org/apache/activemq/broker/region/PrefetchSubscription.java and org/apache/activemq/store/kahadaptor/KahaTopicMessageStore.java

Posted by "Rob Davies (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rob Davies resolved AMQ-1231.
-----------------------------

    Resolution: Fixed

Thanks Kevin!

I've spent alot of time looking into this - and I did see some big performance gains. However, 
1) because we needed to handle a large number of concurrent queues - which cut across PretetchSubscription 
2) synchronized is meant to be optimized even further in future JRE releases
3) I've found it easier to find concurrent issues with synchronized (locks show in stack traces)

for now I've opted to reduce the amount of large synchronizations

If you get the time - could you verify that the latest snapshot helps your performance ?

> Performance issues with org/apache/activemq/broker/region/PrefetchSubscription.java and org/apache/activemq/store/kahadaptor/KahaTopicMessageStore.java
> -------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1231
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1231
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Broker
>    Affects Versions: 5.0.0
>            Reporter: Kevin Yaussy
>            Assignee: Rob Davies
>             Fix For: 5.1.0
>
>         Attachments: KahaTopicMessageStore.java, PrefetchSubscription.java
>
>
> Using Solaris 10 DTrace, I found a couple intense synchronization pinch-points in the Broker.  Without altering the locking semantics, I converted the synchronized methods and one synchronized code block to the JDK 1.5 ReentrantLock.  There was a pretty significant performance benefit with this change.  I've attached the code, together with the old synchronized code commented out for ease of change examination.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.