11 Replies Latest reply on Jun 4, 2010 9:21 AM by pemex nospam

    performance vs message size

    pemex nospam Newbie

      Hi,

      My target is to transfer 1M Byte messages, without persistance and failover.

      I try the core/perf example on a single server.

       

      Without persistance. With various message size, I get those results:

      message size =1k -> about 20 MBytes / s. CPU limit

      message size =16k -> 20-25 MBytes / s. CPU limit

      message size =128k -> 50-60 MBytes / s. CPU limit

      message size =512k -> 27 MBytes / s

      message size =256k -> 60 MBytes / s

      message size =768k -> 27 MBytes / s

      message size =1MBytes -> 30 MBytes / s

       

      The server is 3GBytes RAM. Server is Xms2048M Xmx2048M.

       

      Why the CPU is not limiting, when message size >  128kBytes ?

      Can someone explain what is the performance variations, here ?

      What should I tune ?

        • 1. Re: performance vs message size
          Andy Taylor Master

          firstly, did you run a large enough sample, sending a hundred messages will not really give you accurate figures you need to run thousands if not hundreds of thousands.

           

          secondly there is a tuning section in the manual, have you read this.

           

          Typically anything from paging/large message size, memory etc etc would have an effect as well as how many producers/consumers you have.

          • 2. Re: performance vs message size
            pemex nospam Newbie

            Settings are test perf defaults.

             

            1/perf test is 100 000 messages.

            The speed is pretty stable (when msg size > 16k), one run to another.

            I don't stop the server, one test to another. So, it is really 'warm'.

             

            2/I read tuning section (I'm newbie, by the way)

             

            3/perf test is one producer to one consumer.

            I should clone clients after solving this.

             

            Can someone launch /examples/core/perf with various message size, and post results ?

            thanks

            • 3. Re: performance vs message size
              Tim Fox Master

              How are you measuring the figure in MB/s ?

               

              Also, you didn't say what network you're using, whether it's isolated or not.

               

              Whether you're using separate machines or not. There's really not enough info provided to make much comment.

              • 4. Re: performance vs message size
                Tim Fox Master

                If you're doing this on a single server, I don't see how any results will be relevant to real world where you have a real network and different machines...

                • 5. Re: performance vs message size
                  pemex nospam Newbie

                  MB/s = msgs/s * msg size

                  msgs/s are read after the perf test.

                  The business is looking for throughput.

                   

                  I'm on a single server : Sender is local. Consumer is local. So, the network is virtually not limiting.

                  Server is one virtual machine, with 4 cores.

                   

                  Next, I plan to set up more clients, on separated machines.

                  This is the first basic test, to see top speed of the messaging component alone.

                  This will help to choose a 1GB or 10GB network, or not.

                   

                  • 6. Re: performance vs message size
                    Tim Fox Master

                    First thing:

                     

                    1) That's not a correct calculation for msgs/sec

                     

                    You have messages going to the server, then you have messages coming from the server, then you also have acks going from client to server. So MB/s is probably more like 2.1 * msgs/sec * msg size

                     

                    2) Don't test on just one machine - it's kind of meaningless. Firstly you have three different processes (server, client1 and client2) all computing for CPU. Secondly you're not using a real network, and loopback will have completely different characteristics to a real network. It's a waste of time.

                     

                    Test on the real hardware. Don't test on a desktop or laptop machine.

                    • 7. Re: performance vs message size
                      Tim Fox Master

                      pemex nospam wrote:

                       


                      I'm on a single server : Sender is local. Consumer is local. So, the network is virtually not limiting.

                      That's not correct. The loopback interface can definitely be the limiting factor sometimes.

                      • 8. Re: performance vs message size
                        Tim Fox Master

                        For the record, on a dedicated 1 GiB ethernet with three physical machines:

                         

                        1 server machine, 1 producer machine, 1 consumer machine

                         

                        We can do around 1 million msgs/sec with 1 producer and 15 consumers (publish/subscribe). That's total messages to all subscribers. These are JMS messages, JMS message body is 12 bytes (total message size is around 60 bytes)

                         

                        For larger messages on a 1 GiB ethernet you'll find that you quickly saturate the network before you're limited by CPU.

                         

                        You'll saturate the network with around 100K msgs/sec on a 1 GiB ethernet. That's a network hardware limit. To go beyond that you'll need 10 GiB ethernet

                         

                        (We'll be publishing these results pretty soon)

                        1 of 1 people found this helpful
                        • 9. Re: performance vs message size
                          pemex nospam Newbie

                          Ok, I'm going to install 3 servers : sender, server, consumer. I'll post updates.

                           

                          I note your remark that I should be limited by network before cpu.

                          Thanks for your experience.

                           

                          Question though:

                          Could it be more interesting to use JBoss Cache ? (i.e: store msgs data in cache and send a message with cache ID)

                          Do you think this would worth a test ?

                          • 10. Re: performance vs message size
                            Tim Fox Master

                            pemex nospam wrote:

                             


                             

                            Question though:

                            Could it be more interesting to use JBoss Cache ? (i.e: store msgs data in cache and send a message with cache ID)

                            Do you think this would worth a test ?

                            Interesting in what sense?

                             

                            This would be more complex to setup, and involve extra network round-trip to retrieve the message. ===> performace would plummet since you'd be limited by network latency, not bandwidth.

                             

                            BTW, I assume you're using 2.1? If so, use the ThroughputConnectionFactory for best throughput (this is discussed in performance tuning chapter)

                            • 11. Re: performance vs message size
                              pemex nospam Newbie

                              You seems right : I just hit the network speed limit !