Thanks for the response, Filip. Hopefully this is more helpful... I put a war at http://www.nomad.org/test.war containing my web app, the source, and my jmeter test plan.
My question: why are comet timeouts getting generated substantially behind the timeout setting? Is it because I have incorrectly configured tomcat? Is there something wrong with my test? Can anyone else confirm this behavior? It seems as though the normal (non-comet) http requests are taking priority over the comet requests. The test is very simple. One set of threads sends non-comet http requests every 10 seconds. Another set of threads sends comet requests with a single byte in the body. The comet servlet sets a comet timeout of 10 seconds, reads the request body, and then closes the connection on receiving the comet timeout event. On close of the connection, the comet test threads then send another comet request. I have JMeter set to start 100 threads for the http thread group and 100 threads for the comet thread group, ramping up at 1 thread per second. A fifteen minute test shows: http requests: 9750 samples http response time: avg 109ms, min 66ms, max 3699ms http errors: 0% http throughput: 9.5 requests/second comet requests: 1942 samples comet response time: avg 50149ms, min 10353ms, max 120876ms (tcp timeout is set to 120000) comet errors: 0% comet throughput: 1.9 requests/second cpu use is minimal (1-4%) There are no errors in the catalina log. I also added timing code to the test servlet to confirm that JMeter's measurements are accurate and found they are. After confirming the measurements, I removed the timing code. I noticed on even short tests the http requests predominate, even though there should be roughly the same # of http requests as comet requests (1 request/10 seconds/thread and there are 100 threads for each thread group, http and comet). My NIO configuration is: <Connector port="80" protocol="org.apache.coyote.http11.Http11NioProtocol" maxThreads="1000" acceptorThreadCount="2" acceptorThreadPriority="10" pollerThreadCount="2" pollerThreadPriority="10" redirectPort="8443" enableLookups="false" /> os: ubuntu 8.10 (although also observed same behavior on Windows XP SP 3) tomcat 6.0.18 (Note: the following are also in the war bundle referenced at top) The client TCP request looks like this (without the ####s): #### POST /test/cometTest HTTP/1.1 Host: 173.45.237.215 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2 Connection: keep-alive Content-Type: text/plain Content-Length: 1 5 #### The http test servlet's doGet method looks like this: protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { response.getWriter().println("response"); } The comet test servlet's event method looks like this: public void event(CometEvent event) throws IOException, ServletException { HttpServletRequest request = event.getHttpServletRequest(); if (event.getEventType() == CometEvent.EventType.BEGIN) { event.setTimeout(10000); } else if (event.getEventType() == CometEvent.EventType.ERROR) { event.close(); } else if (event.getEventType() == CometEvent.EventType.END) { event.close(); } else if (event.getEventType() == CometEvent.EventType.READ) { InputStream is = request.getInputStream(); byte[] buf = new byte[512]; do { is.read(buf); } while (is.available() > 0); } } Thanks for any help, Peter -- View this message in context: http://www.nabble.com/nio-connector-configuration-tp21969270p22252460.html Sent from the Tomcat - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org