1 2 3 Previous Next 37 Replies Latest reply on May 26, 2006 2:30 PM by gohip Go to original post
      • 15. Re: JBoss Mail Server Performance and Throughput
        acoliver

        yes. My logic for what user sends to what user was a little goofy IIRC. 56 ms per message isn't bad. The question that must be answered is "when are they actually delivered' and ARE they actually delivered? You need the POP side for that :-)

        • 16. Re: JBoss Mail Server Performance and Throughput
          gohip

          Okay, now I am running into dropped emails, after you mentioned I should check...

          It seems that anything >= approx 135 threads and >= approx 100 or so emails, causes emails to begin to be dropped.

          On creating a connection, i get connection refused exceptions.

          I tried adjusting all the things I could think of, i.e. mySql, the JVM's, and the jbossservice (increasing the thread pool up to 100, after many failed runs)

          still to no avail, now I am a loss, as to what to tweak next...any ideas andrew?

          if i create a 1000 threads, and 500 emails, i lose about 400

          if i create a 1000 thr and 1000 emails, i lose about 888

          500/500=379
          500/250=160

          so, it appears at the moment, that just the connections are the bottlekneck, any insight or recommendations, greatly appreciated...

          • 17. Re: JBoss Mail Server Performance and Throughput
            acoliver

            Umm depending on the system 100 simultaneous connections (which means some many more number of users) may be rather large. 1000 threads would be a pretty big system. Is the system your testing big enough for this kind of load?

            Sounds like you hit all the common bottlenecks. Also check your message driven bean pool (server/default/conf/standardjboss.xml Standard Message Driven....). I'd have to really look at your system in a lot of detail to tune it for heavy load (and of course you need a RAID drive). However if you're working on hte load tool now then you don't need that.

            Your numbers 1000 threads for 500 emails is totally wack though. I'm not even sure the logic will handle that. I never anticipated "every other thread" will send an email and the others won't.... I do no "validity checking" in the load tool. So you can put in bogus values like that. A burst of 1000 connections comming in at once simultaneously is crazy talk....are you planning a DoS attack against Yahoo?

            Lots more mails....less threads. You're not testing threading, you're testing message rate first and concurrency second (many thousands of users will not == many thousands of simultaneous threads for SMTP or POP)

            • 18. Re: JBoss Mail Server Performance and Throughput
              gohip

              lol...no Dos attacks, etc.

              My Boss, says we need to be able to handle approx 6,000 emails per second, these emails, every single one(none sent by internal users/all sent to internal users) will all come from external domains

              now I know this is unreasonable, of just one machine, and one instance of JBoss Mail, but I am trying to find a threshold of such, a way, if any, to figure out how many instances, machines (a cluster) would be reqd to achieve this feat

              it seems though, that JBoss, is not allowing more than twenty or so instances of a SMTP listener, as I see everything go in waves, queuing the connections, and processing them 20 or so at a time.(I could mail the output?)

              Umm depending on the system 100 simultaneous connections (which means some many more number of users) may be rather large. 1000 threads would be a pretty big system. Is the system your testing big enough for this kind of load?


              Do you mean my machine? It's got a gig or so of ram, 64bit AMD proc, and I shut down all uneeded apps, it did not once evr slow to a crawl, except when I assigned almost all the mem to the two instances of the JVM

              I mean, technically, i guess, we could buy more hardware, but still need to figure out how much...

              Sounds like you hit all the common bottlenecks. Also check your message driven bean pool (server/default/conf/standardjboss.xml Standard Message Driven....). I'd have to really look at your system in a lot of detail to tune it for heavy load (and of course you need a RAID drive). However if you're working on hte load tool now then you don't need that.


              "server/default/conf/standardjboss.xml Standard Message Driven" I'll take a look at this thanks. Shouldnt there just be a spot where you could increase this SMTP connection threshhold, or is that what your thinking, is that it might be in the bean pool....

              Your numbers 1000 threads for 500 emails is totally wack though. I'm not even sure the logic will handle that. I never anticipated "every other thread" will send an email and the others won't.... I do no "validity checking" in the load tool. So you can put in bogus values like that. A burst of 1000 connections comming in at once simultaneously is crazy talk....are you planning a DoS attack against Yahoo?


              no, again, no DOS attack. the tool, after some massaging, was sending 1000 emails in... heres some output...

              UM initialSize=2000
              done starting threads
              with 999 users it tooks us 1172 milliseconds to launch the threads
              **********Total Refused Connections: 895**********
              (I slept and got this output, when all threads were finished with mail server)
              with 999 users it tooks us 8609 milliseconds

              at about 1 message per user that is 8 milliseconds per message

              so the java app, you wrote, given enough memory, can spawn the threads and make the connections,

              it's just the mail server app is having trouble keeping up

              Lots more mails....less threads. You're not testing threading, you're testing message rate first and concurrency second (many thousands of users will not == many thousands of simultaneous threads for SMTP or POP)


              hmm, yes, I am testing incoming message rate, but shouldnt this spawn a configurable amount of threads to handle the incoming connections? I mean, I dont mind if it spawns...

              or am I lost Andrew?




              • 19. Re: JBoss Mail Server Performance and Throughput
                gohip

                i changed the containerpoolconf MaximumSize ->200 from 100

                had no effect after restart

                i saw theres about 5 or so more, similar settings, throughout standardjboss.xml as well as in jboss-service.xml

                should i start doubling, some of these values, till my machine either blows up, or JBoss Mail Server begins spawning more threads

                • 20. Re: JBoss Mail Server Performance and Throughput
                  acoliver

                  Okay so CPU is nearly irrelevant. JBMS is totally bound by DISK. You need min 4 CPU boxes (or 4 cores for parallel GC) and RAID 0+1. With this you can achieve a really high rate of messaging. You're not going to get even an "idea" off of a standard box. You do have the JBCS pool size turned up right? Also you cannot achieve insanely high rates with MySQL.

                  Something is obviously wrong with either your config or your database or you're still trying too many threads at once. Moreover it should be nearly impossible to achieve a high rate with MySQL (its locking and blob handling). I'm betting if you watch your DB stats...they are probably thrashing :-)

                  • 21. Re: JBoss Mail Server Performance and Throughput
                    acoliver

                    BTW that rate means 518,400,000 message per day capacity. I suspect yahoo does less traffic.

                    • 22. Re: JBoss Mail Server Performance and Throughput
                      gohip

                      I am responding in depth, but for the moment, what/where is the JBCS pool size? Is that collaboration server?(BTW: whay has named changed, or name changed in forums)

                      I've found pool-sizes in
                      default/conf/jboss-service.xml
                      default/conf/standardjboss.xml

                      and in

                      mail.ear/mail.sar/meta-inf/jboss-service.xml

                      I touched nothing in def/conf/jboss-service.xml
                      (though I noticed there are it seems thread settings)

                      In default/conf/standardjboss.xml I touched, as you said, standard message driven mbean (i beleive it was) and nothing else

                      And in mail.ear/mail.sar/meta-inf/jboss-service.xml
                      i increased the SMTPProtocol threads massively

                      • 23. Re: JBoss Mail Server Performance and Throughput
                        gohip

                        okay, understood on the 4 cpu's/boxes and Raid...

                        would it help much with postgresql? is it more difficult than mySql, does it run in windows?

                        ooh, good point, my boss had been wondering, if everything would run better on linux, any thoughts towards this?

                        but as I said, it seems the app is doing fine, except for the lack of extra SMTP threads

                        what i see in output, goes in waves, and they seem to be approx waves of 20

                        i'll see 20 or so connects, up to about a 100 or so, then I start seeing the mail data being processed and displayed, again in spurts of about 20

                        then there is a nice pause(as you noted, prob relating to mySql)and all database work begins, again, in waves of about twenty

                        note, during these waves, i do see, intermittent earlier threads finishing up

                        thas wy I was wondering if there are some more thread settings somewhere, i.e. hence the "waves/spurts"

                        with regards to being diskbased, hmm, my windows partition, i.e. the one with the swap file, has less that a 750mb of space, as you said, that prob is contributing, but Mail Server, is installed on another drive, but imagine, still swapping memory out of page file(which could definitley hold a grain of truth to it in that I saw that half way through the op, is seemed it was reclaiming memory)

                        based on last rate
                        i.e. 1000 messages sent in 8609ms
                        with 900 dropped

                        if i figure to retry the dropped, as a normal outside mail server would, I could...

                        8609ms * 9retries = 77,481ms/1000=77

                        So 1000 emails could be fully proccessed in approx 77 secs
                        (on my crap box)

                        so based on my boss's rate of 6,000/s

                        11 of my crap boxes, could completely process a 1000 emails in 7 seconds

                        that means if I could get the above down to 1 second (i.e. fat boxes), it would take 55 mail servers (fat boxes) too process 5,000 emails in a second

                        thats alot of boxes, but again, this is based on the results gathered from a crap box

                        • 24. Re: JBoss Mail Server Performance and Throughput
                          acoliver

                          Ground up view:

                          1. connections from database (max pool/thread sizes there -- DB dependant -- btw Mysql defaults to like 20 threads!)
                          2. DB connection pool (server/default/deploy/*-ds.xml)
                          3. JMS Invoker pool (server/default/conf/standardjboss.xml)
                          4. MDB pool (server/default/conf/standardjboss.xml)
                          5. JBMS theads on a service (server/default/deploy/mail.ear/mail.sar/META-INF/jboss-service.xml)

                          Do me a favor and post your property file for the load tester thingy here. in code tags.

                          • 25. Re: JBoss Mail Server Performance and Throughput
                            gohip

                            settings.props

                            hostname=192.168.69.251
                            port=25
                            threads=100
                            prefix=test
                            start=1
                            end=1400
                            domain=192.168.69.251


                            at this rate, i get this output, note note connections refused, all goes in dbase...
                            UM initialSize=2800
                            done starting threads
                            with 1399 users it tooks us 70578 milliseconds to launch the threads
                            **********Total Refused Connections: 0**********
                            with 1399 users it tooks us 74609 milliseconds
                            at about 1 message per user that is 53 milliseconds per message


                            as i throttle threads down, with each run, the refused connections goes down, but as stated, anything more than 130 or so threads, cause connections to begin to be refused

                            300 threads, 200 refused
                            500/400
                            600/500refused
                            700/600
                            etc. and approx

                            i'll looks for the settings in the files above...



                            • 26. Re: JBoss Mail Server Performance and Throughput
                              acoliver

                               

                              would it help much with postgresql? is it more difficult than mySql, does it run in windows?
                              


                              I've posted on MySQL in here extensively. Google "acoliver jboss MySQL". It has to do with MySQL's pessimistic write locking (that you pointed out or someone in here did I think), inadequate blob handling and also the way it handles threads to the innodb backend.

                              6000 msg/second on NTFS, you're joking right?

                              ooh, good point, my boss had been wondering, if everything would run better on linux, any thoughts towards this?
                              


                              For such load I'd go solaris personally, but Linux would work better than windows for sure.

                              then there is a nice pause(as you noted, prob relating to mySql)and all database work begins, again, in waves of about twenty
                              


                              if your disk io isn't tapped out and stuff already you might be able to increase mysql's internal threads (but you'll need to research that on your own, I'm far from a mysql expert)

                              Postgresql is far more architecturally suited for JBMS.

                              with regards to being diskbased, hmm, my windows partition, i.e. the one with the swap file, has less that a 750mb of space, as you said, that prob is contributing, but Mail Server, is installed on another drive, but imagine, still swapping memory out of page file(which could definitley hold a grain of truth to it in that I saw that half way through the op, is seemed it was reclaiming memory)
                              


                              Uhh, if you're heap is swapping to disk....this is not a good thing.

                              
                              that means if I could get the above down to 1 second (i.e. fat boxes), it would take 55 mail servers (fat boxes) too process 5,000 emails in a second
                              


                              No. This means that you would need 55 boxes with IO bound disks running a non-optimal file system with a non-optimized database which requires us to do goofy things to get it to not load every message into memory with inadequate IO to achieve this.

                              A 4 CPU solaris box can achieve about 80msg/sec (of small size) on RAID/MySQL.

                              Again, 518,000,000 mails at an average of 100 mails day/user is 51m people. If you really have these requirements you're going to need to engage us on the business side as that is going to require some pretty high end strategic work.


                              • 27. Re: JBoss Mail Server Performance and Throughput
                                acoliver

                                (actually come to think of it mysql's lock pessimism here probably isn't too important since we shouldn't have too much lock contention)

                                • 28. Re: JBoss Mail Server Performance and Throughput
                                  gohip

                                  Poor Windows...

                                  My boss, said to worry about it more later, I hassle you later, and as well, as I cant let things drop, as stated will try those other settings, if you think of anything else, please post your ideas...

                                  I think at moment he's happy with 1 per second, which seems feasible. I am just concerned, that if too many servers, try to connect at same time, they'll be lots of retries...

                                  and my, owe so optimistic boss's and investors, do envision 25 million plus users(hint, hint, cell phone industry, carriers, and consumers)

                                  Thanks Andrew!

                                  • 29. Re: JBoss Mail Server Performance and Throughput
                                    acoliver

                                    Ahh okay cell industry. We should talk. There is some prior work in this area. I'd like to talk more privately and see if we can work together.