5 Replies Latest reply on May 16, 2003 5:11 AM by jonlee

    Jetty configuration

    thl-mot

      Hi,
      I have some questiens about the configuration file jboss-service.xml of the JBossWeb (JBoss 3.0.7, Jetty).

      I have a web-application with about 150-250 concurrent users which are polling the server every 120s.
      When I have a look at the jmx-console on the SocketListeners is see that there are 180 Threads available, and about 20-40 are Ideling.
      I don't think that 160 requests are beeing used at the time I am looking at these numbers. How are these numbers created?
      From time to time i get problems accessing the server: IE is telling me that page is not Available or can't be displayed. I would guess that there arent any socketListeners available.
      What does lingerTime exactly mean?


      thl-mot






        • 1. Re: Jetty configuration
          jonlee

          You would be best looking at the Jetty materials for information on the listeners. The main site is:
          http://jetty.mortbay.org

          For some details on the parameters, start here at the JavaDocs:
          http://jetty.mortbay.org/javadoc/org/mortbay/http/SocketListener.html

          For your app workload, you may consider the following as well - use the channel socket listener if you have JRE Java 2 1.4 as it implements non-blocking IO. Also, if you are running Linux or Windows or AIX, consider using the IBM JRE. It has much better server performance characteristics than the Sun distribution.

          • 2. Re: Jetty configuration
            joachim.weiss

            > For some details on the parameters, start here at the
            > JavaDocs:
            > http://jetty.mortbay.org/javadoc/org/mortbay/http/Sock
            > tListener.html

            But what would be sensible values for the parameters? Should we increase maxthreads? (set to 500 for the moment) Is there a rule of thumb?
            What about the other params?

            • 3. Re: Jetty configuration
              jonlee

              There are no absolute rule of thumb because it depends on your load characteristics. You can increase your threads, but in thl-mot's case that may not achieve the desired goal and you would probably want to increase the heap size as well.

              In this instance, if you can, you would use the Jetty channel listener with non-blocking IO. Jetty should implement HTTP 1.1 so you should have persistent connections, reducing the number of connections required per user. 300 should be more than enough and the current anecdotal evidence shows this. Linger only effects the connection termination negotiation in the event that bursty network traffic interferes. You can tune it down if you are confident that your network isn't going to have any major congestion. In the scheme of things, it is probably the thing that will least affect your performance.

              You may want to give it extra heap size in the VM - if you have the memory then probably throw an -Xmn32M -Xmx64M and go up from there. Your choice of VM is also going to factor into this.

              If you want indicative server performance measures, look at this:
              http://www.volano.com/report/index.html
              and this:
              http://webperformanceinc.com/library/ServletReport/

              And as I said, you probably want to use the channel listener.

              The catch with using the IBM JRE is that if you want https in Jetty, you need to compile in the contributed IbmJsseListener - and Tomcat doesn't have a patch for this that I've seen.

              So in order of importance - VM, listener, heap size, threads. You want to deal with connections as efficiently as possible, and then tune up your handler (threads) and VM heap to accommodate the number of concurrent users.

              • 4. Re: Jetty configuration
                thl-mot

                Could I please get some more information about the channel listener?

                thl-mot

                • 5. Re: Jetty configuration
                  jonlee

                  The references are:
                  http://www.mortbay.org/jetty/doc/jdk14.html
                  http://users.rcn.com/cks.enteract/distributopia/rotd3_archive.html

                  These give you the details on the Jetty socket channel listener and a short outline on the technical reasons for non-blocking io.

                  Standard server architecture articles can give a run down on the persisten connections stuff.