1 2 Previous Next 17 Replies Latest reply on May 14, 2008 3:40 AM by timfox Go to original post
      • 15. Re: JBoss 2.0 Thread model
        timfox

         

        "david.lloyd@jboss.com" wrote:

        As far as using a concurrent queue - perhaps you could squeeze out a tiny bit more performance, but unless it shows up as a blip on a profiler, I'm not going to bother because frankly I doubt that there will be significant (unwanted) contention for the lock. (Remember that the purpose is to serialize access, after all)


        After profiling JBM, this actually appears as the single largest point of contention in the application (the second being the MINA DefaultIOSessiondataStructureFactory) contributing to about 12% performance degradation when sending / consuming a lot of messages.

        • 16. Re: JBoss 2.0 Thread model
          trustin

          MINA also uses ConcurrentLinkedQueue a lot internally. I tried a synchronized circular queue, which is similar to ArrayDequeue, but the performance difference was negligible.

          Seeing sun.misc.Unsafe or compareAndSwap() in your profiler as a hot spot might mean there's not much room left for performance improvement, unless any innovative redesign exists. Our mileage might vary though. :)

          • 17. Re: JBoss 2.0 Thread model
            timfox

             

            "trustin" wrote:
            MINA also uses ConcurrentLinkedQueue a lot internally. I tried a synchronized circular queue, which is similar to ArrayDequeue, but the performance difference was negligible


            Looking in the MINA code I can still see CircularQueue used in IOSessionDataStructureFactory.DefaultWriteRequestQueue and also in AbstractIOSession.CloseRequestAwareWriteRequestQueue

            1 2 Previous Next