3 Replies Latest reply on May 19, 2008 6:39 AM by mvecera

    Performance with max-thread option

    standard

      Hi,

      I have a question about the max-thread option in the service configuration.
      I wanted to do some performance measures with this option (1 vs. 2 threads)
      and a service that does a Smooks-based transformation.
      But when I ran the tests I couldn't detect any differences in performance at all.

      I don't have the best test-system at hand, and my measures might be a little crude.
      Also the way I generate the messages my measurements are based on is rather sequential.
      But still I expected to see some differences in performance.
      I also did some other comparisons of services (e.g. different Smooks-based Transformations vs. Java/XSLT-based ones),
      and I always could determine some differences.
      But with the max-thread option it is like nothing changes at all.

      For the tests I configured the service I wanted to measure alternating with 1 and 2 threads,
      and measured the start- and end-time in a service before and after this service respectively (both always using only one thread).

      I wanted to ask whether any of you has an idea how this could be,
      or if the max-thread feature perhaps isn't really implemented yet.
      Perhaps I just have a wrong idea about how this works.

      Thanks for the infos!

      regards
      Andreas

        • 1. Re: Performance with max-thread option
          tfennelly

          Max threads is implemented for sure, but only for the Message Aware Listener (i.e. not gateways). I'm afraid you're going to have to provide more info in order for us to help you here!

          • 2. Re: Performance with max-thread option
            standard

            Hi,

            the listener in question is a Message Aware Listener (not a gateway).
            Basically i read in a file that generates a bunch of messages.
            These messages a handled after that by a sequence of services
            (e.g. are being published on a JMS-topic, picked up from that topic by another service and other stuff before that).
            At some point (after being picked up from the topic) all of these messages are being transformed by the service
            I want to measure performance for.
            So the service is pretty much at the end of the whole processing of these messages.
            The messages are being send to this service by the preceding service (picking the messages from the topic) using the ServiceInvoker,
            and being send to the next service (further processing the transformed messages) after the transformation the same way.
            The 2 services "around" the transforming service are the ones the measures are being made in.

            My guess was, that since all the processing of the messages before that service is sequential,
            the service can't really make use of it's 2 threads.
            But I'm not sure about that, and I wanted to ask your opinion about it.

            Does that make the situation clearer?

            Thanks and regards
            Andreas

            • 3. Re: Performance with max-thread option
              mvecera

              Hello,

              as I was running performance tests I recognized that it has sence to have 2 threads for one CPU core, e.g. on my dual core CPU, 4 threads are the best option. More threads didn't make the performance better for me.

              Moreover, you could use JCA gateway listener which has max-threads implemented. The same with threads count applies here...