I realize that this is the default, but you probably want to decrease the value of connectionTimeout (to somewhere between 5000 and 15000). As it is, Tomcat will spend a lot of time in Socket.read for the simple reason that it will wait for up to a minute to see if the client is going to send another request.
"David Morris" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I hope this is a simple configuration issue. Here is my setup for the > Coyote and HTTP connectors: > > <Connector className="org.apache.coyote.tomcat4.CoyoteConnector" > port="8080" > minProcessors="5" > maxProcessors="95" > enableLookups="true" > redirectPort="8443" > acceptCount="10" > debug"0" > connectionTimeout="60000" > useURIValidationHack="false" /> > > -vs- > > <Connector > className="org.apache.catalina.connector.http.HttpConnector" > port="8080" > minProcessors="5" > maxProcessors="95" > enableLookups="true" > redirectPort="8443" > acceptCount="10" > debug"0" > connectionTimeout="60000" /> > > I profiled the an offending page interaction using a tool from IBM > called performance explorer. To analyze the results I used a tool from > IBM called Performance Trace Data Visualizer. Compared to other tools I > have used, it is more similar to JProbe than jProfiler in that it shows > hierarchical clock time. This tool also tracks processor usage, inline > time, locks, threads, object creation, garbage collection, etc. From > what I can see there are no locking issues and the read method of > java.net.SocketInputStream is taking the majority of the processing > time. > > When I saw that the Coyote Connector was invoking the > SocketInputStream.read(byte[],int,int) routine, I tried the old HTTP > connector without expecting any performance change. The > 8 X's > performance increase was totally unexpected and I am just trying to find > out how to do the right thing (use the coyote connector). In both cases > there are 17 calls to with one being a thread startup. Of the 16 calls, > the 15th is the one taking up the bulk of the time (6,437,348 NS vs. > 5,950 - 150 NS). > > Thanks, > > David Morris > > >>> [EMAIL PROTECTED] 9/18/2003 12:18:49 PM >>> > > I'm not totally clear on how you profiled the page. Did you use > OptimizeIt/JProbe, or simply added a start time at the beginning and at > the end. > > from first hand experience, I doubt the connector is the cause, but I > could be wrong. What in your struts page is causing it to take 35 > seconds? You might want to time the actual application process and see > how much time it takes. > > In theory and practice reading the input into buffers scales better. > What exactly does the page do with the input in the first place? > > peter > > > David Morris <[EMAIL PROTECTED]> wrote: > I did some profiling of a slow page (Struts based) on a site using the > Coyote connector. This site does not use Apache. It appeared that a > java.net.SocketInputStream.read being invoked from > org.apache.coyote.http11.InternalInputBuffer.parseRequestLine() was > causing a bottleneck. In this case average response over a 5 page > interaction with three being relatively simple and two being complex > averaged 35 seconds per response when repeated 20 times. > > I changed the site to use the old and deprecated http connector and > performance improved to 4 seconds per response. It appears that the > org.apache.catalina.connector.http.SocketInputStream was much faster. > Since Coyote is recommended, does anyone have any ideas on how I can > get > it to perform better? Over dozens of tests, it appears that large > pages > take a long time with the Coyote connector. > > Thanks, > > David Morris --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]