Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>First of all you have to define your requirements. Something like:</p> <ul> <li>max-concurrent-connections</li> <li>max-request-processing-time</li> <li>etc</li> </ul> <p>After that I would suggest to do extensive load testing. Create basic (but close to real life) implementation of your server and start testing.</p> <p>Initially you can use <em>ab</em> tool and later switch to JMeter, for example.</p> <p>ab will generated something like the following:</p> <pre><code> ab -c 10 -n 100 http://www.xyz.com/ This is ApacheBench, Version 1.3d &lt;$Revision: 1.73 $&gt; apache-1.3 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright (c) 2006 The Apache Software Foundation, http://www.apache.org/ Benchmarking www.xyz.com (be patient).....done Server Software: Apache-Coyote/1.1 Server Hostname: www.xyz.de Server Port: 80 Document Path: / Document Length: 3112 bytes Concurrency Level: 10 Time taken for tests: 0.659 seconds Complete requests: 100 Failed requests: 0 Broken pipe errors: 0 Total transferred: 367003 bytes HTML transferred: 339208 bytes Requests per second: 151.75 [#/sec] (mean) Time per request: 65.90 [ms] (mean) Time per request: 6.59 [ms] (mean, across all concurrent requests) Transfer rate: 556.91 [Kbytes/sec] received Connnection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.5 0 6 Processing: 8 63 144.6 12 514 Waiting: 8 63 144.7 12 513 Total: 8 64 144.8 12 514 Percentage of the requests served within a certain time (ms) 50% 12 66% 15 75% 19 80% 19 90% 491 95% 491 98% 512 99% 514 100% 514 (last request) </code></pre> <p>It might be helpful to create a plot:</p> <p><img src="https://i.stack.imgur.com/pOjmT.png" alt="enter image description here"></p> <p>Having that you can proceed with all performance optimizations and tweaking, because it will be possible to see results immediately.</p> <p>It is likely you'll need to tune your application first, but after that you have quite a lot of options, including the following:</p> <ul> <li>JVM tuning (GC tuning, etc)</li> <li>Connectors tuning</li> <li>Compression</li> <li>NIO</li> <li>HTTP 1.1 specific stuff</li> <li>and so on</li> </ul> <p>Just use correct approach and start doing something -- it will require some time.</p> <p><strong>EDIT</strong> Tomcat tuning tips</p> <p>Frankly speaking there are so much different articles on this topic:</p> <ul> <li><a href="http://my.safaribooksonline.com/book/programming/java/0596003188/tomcat-performance-tuning/tomcat-chp-4" rel="nofollow noreferrer">Chapter 4. Tomcat Performance Tuning</a></li> <li><a href="http://blog.springsource.org/2008/10/14/optimising-and-tuning-apache-tomcat-part-2/" rel="nofollow noreferrer">OPTIMISING AND TUNING APACHE TOMCAT</a></li> <li><a href="http://www.datadisk.co.uk/html_docs/java_app/tomcat6/tomcat6_tuning.htm" rel="nofollow noreferrer">Tomcat 6 performance tuning</a></li> <li><a href="http://javamaster.wordpress.com/2013/03/13/apache-tomcat-tuning-guide/" rel="nofollow noreferrer">Tomcat configuration $Tomcat/conf/server.xml</a></li> </ul> <p>There is no 100% universal solution, you should do deep investigation yourself</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload