Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 16
Please consider the following details: Scenario: We put load on tomcat (basically a simple http request) and in response an http response sends 1 to show success. Executor and Connector ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User bilal_jan's Avatar
    Join Date
    Mar 2008
    Location
    Pakistan
    Posts
    281

    TOMCAT web server optimization


    Please consider the following details:
    Scenario: We put load on tomcat (basically a simple http request) and in response an http response sends 1 to show success.

    Executor and Connector configuration (TOMCAT 6) with java version 1.4.2:

    <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
    maxThreads="300" minSpareThreads="100" maxIdleTime="120000" />

    <Connector executor="tomcatThreadPool" port="8080" protocol="HTTP/1.1"
    acceptCount="100"
    acceptorThreadCount="2"
    processCache="-1"
    enableLookups=”false”
    connectionTimeout="120000"
    socket.tcpNoDelay="true"
    redirectPort="8443" />
    Now I have tried many other configurations but I think this basic configuration should work.What we eventually want is TPS around 1000.I have tried the version where we don’t use the executor and have useExecutor=”false” in connector settings and define maxthread and minspare thread count in connector.In all cases TPS seems pretty much the same. More so I have also tried using different protocol protocol=”org.apache.coyote.http11.HTTP11NioProtoc ol” as well. We have heap size increased to 1GB.

    Load Testing and results:
    100 users hit once we get 23 tps at max
    100 users hit thrice with no gap we get 250 tps.
    But as we go to increase the number of users and not iterations we get a bottleneck of 25 tps at max and not more.As minSpareThread count is 25 by default. I thought that it may very well explain the bottleneck but increasing the minsparethread count doesn’t help at all we get same results.
    Linux is basically a simple operating system, but you have to be a genious to understand the simplicaity - Dennis Ritchie

  2. #2
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    You want to reach 1000 TPS serving what? Static webpages? JSP pages? How are you generating the load? What kind of system is this running on?

  3. #3
    Linux User bilal_jan's Avatar
    Join Date
    Mar 2008
    Location
    Pakistan
    Posts
    281
    thanks coopstah13 for your reply
    we are generating load by sending simple http requests to our server.
    we want to reach 1000 tps serving static webpages.
    I am stuck here would really appreciate your help.Would be waiting for your response
    Linux is basically a simple operating system, but you have to be a genious to understand the simplicaity - Dennis Ritchie

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    What are you using to drive the load? It is possible that what you are using to drive the load is inadequate to reach 1000 TPS. What about the machine tomcat is running on, it is possible it is not powerful enough to serve 1000 TPS. Are you monitoring CPU utilization, disk IO rate, and other performance related things on the tomcat server?

  6. #5
    Linux User bilal_jan's Avatar
    Join Date
    Mar 2008
    Location
    Pakistan
    Posts
    281
    Welll we have 8GB of ram and core 2 duo system serving static pages.
    We cannot achieve more than 25 requests at one time.Even with a html
    page simple returining 1 and doing nothing else.
    I have increased accept count ,minsparethread count, but no success
    About thread dump i dont know please explain i would be very thankful.


    I have not used nio connector , the default one.
    i have played with accept count , minSparethread count,
    maxThread count ..i have read the whole documentation time and again .
    Increased heap size to 1 GB .

    Would appreciate a prompt reply , consider we are serving a page with nothing just
    displaying helloworld
    Linux is basically a simple operating system, but you have to be a genious to understand the simplicaity - Dennis Ritchie

  7. #6
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    I still need you to answer the questions in my previous post

  8. #7
    Linux User bilal_jan's Avatar
    Join Date
    Mar 2008
    Location
    Pakistan
    Posts
    281
    we send a request for simple html page and server returns 1 in case of success.
    Well we have 8GB of ram and core 2 duo system serving static pages.so they must achieve 1000 tps.
    Well CPU utilization is not the issue at hand,as we have conducted load testing using HP load runner.No network or cpu utilization issue.
    Linux is basically a simple operating system, but you have to be a genious to understand the simplicaity - Dennis Ritchie

  9. #8
    Linux User bilal_jan's Avatar
    Join Date
    Mar 2008
    Location
    Pakistan
    Posts
    281
    Is it not possible that you share settings for a high load server.And in general with good CPU and RAM how many static pages request tomcat can handle at maximum.
    Linux is basically a simple operating system, but you have to be a genious to understand the simplicaity - Dennis Ritchie

  10. #9
    Linux User bilal_jan's Avatar
    Join Date
    Mar 2008
    Location
    Pakistan
    Posts
    281
    tested tomcat with jmeter for 1000 threads with ramp up period of 20s.
    gets 100%cpu,memory usage was ok
    Linux is basically a simple operating system, but you have to be a genious to understand the simplicaity - Dennis Ritchie

  11. #10
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    So you are saying that you are running a load test with jmeter and the server is CPU bound? You cannot achieve anything more once you are bound by any hardware. Once a resource is capped, particularly CPU or disk, there is nothing you can do to increase throughput except add more hardware, unless you can make modifications to your software, but this isn't the case for you since you aren't serving up a java application, you are only serving static web pages.

    A 2 CPU system isn't that powerful these days. If I have time I will try to see what I can get for throughput on a 2 CPU system.

    Also, I recommend watching the output of vmstat on the server. I am guessing you will see a high amount of threads in the 'r' column, which means they are waiting on the CPU.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •