Hi Fuad, thanks for the reply. My queries are heavy enough that the difference in performance is obvious. I am using a home-grown load testing script that sends 1000 realistic queries to the server and takes the average response time. My index is on a ramfs which I've shown makes the QR and doc caches unnecessary; I am warming up the filter and fieldvalue caches before beginning the test. There's no appreciable difference between query times at the beginning, middle, or end of the test, so I can't blame the hotspot or the Tomcat thread pool for not being warmed up.
The queries I'm using are complex enough that they take a long time to run. 8 queries against 1 Tomcat average 600ms per query, while 8 queries against 8 Tomcats average 190ms per query (on a dedicated 8 CPU server w 32G RAM). I don't see how to interpret these numbers except that Tomcat is not multithreading as well as it should :) Your thoughts? Michael On Wed, Sep 23, 2009 at 10:48 AM, Fuad Efendi <f...@efendi.ca> wrote: > For 8-CPU load-stress testing of Tomcat you are probably making mistake: > - you should execute load-stress software and wait 5-30 minutes (depends on > index size) BEFORE taking measurements. > > 1. JVM HotSpot need to compile everything into native code > 2. Tomcat Thread Pool needs warm up > 3. SOLR caches need warm up(!) > And etc. > > 8 parallel requests are too small for default Tomcat; it uses 150 threads > (default for old versions), and new Concurrent package from Java 5 > > You should not test manually; use software such as The Grinder etc., also > note please: there is difference between mean time and response time, > between average (successful) requests per second and average response > time... > > > Tomcat is serializing the requests > - doesn't mean anything for performance... yes, it has dedicated Listener > on > dedicated port dispatching requests to worker threads... and LAN NIC card > serializes everything too... > > > > Fuad Efendi > http://www.linkedin.com/in/liferay > > > > > -----Original Message----- > > From: Michael [mailto:solrco...@gmail.com] > > Sent: September-22-09 4:04 PM > > To: solr-user@lucene.apache.org > > Subject: Parallel requests to Tomcat > > > > Hi, > > I have a Solr+Tomcat installation on an 8 CPU Linux box, and I just tried > > sending parallel requests to it and measuring response time. I would > expect > > that it could handle up to 8 parallel requests without significant > slowdown > > of any individual request. > > > > Instead, I found that Tomcat is serializing the requests. > > > > For example, the response time for each of 2 parallel requests is nearly > 2 > > times that for a single request, and the time for each of 8 parallel > > requests is about 4 times that of a single request. > > > > I am pretty sure this is a Tomcat issue, for when I started 8 identical > > instances of Solr+Tomcat on the machine (on 8 different ports), I could > send > > one request to each in parallel with only a 20% slowdown (compared to > 300% > > in a single Tomcat.) > > > > I'm using the stock Tomcat download with minimal configuration changes, > > except that I disabled all logging (in case the logger was blocking for > each > > request, serializing them.) I'm giving 2G RAM to each JVM. > > > > Does anyone more familiar with Tomcat know what's wrong? I can't imagine > > that Tomcat really can't handle parallel requests. > > >