tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roy Wilson <desig...@bellatlantic.net>
Subject TC4-m4 CPU per request increase and thread queue locking?
Date Sun, 05 Nov 2000 18:00:40 GMT
1) Ab with Apache_1.3.9 results

When I ran ab with apache, I ran with concurrency C = 1 or C = 100. I 
initially thought that C had something do with the number of instances of 
httpd, but it seems to only indirectly: as load goes up (due to larger 
C), more children get spawned. What I noted is that ab+httpd CPU usage 
per request goes down slightly as C increases. This appears to be because 
accept(2) processing is "amortized" (as Dan Gaudet put it) over C 
connections. I ran with N = 100,000 because of variability in results 
observed when N was smaller. No errors were observed.

2) ab with tomcat4-4.0-m4

With Tomcat4, there seemed to be some threading problems (thread queue 
lockouts, unknown threads waiting to be notified). I don't know enough 
about TC to be able to fix or even diagnose what's going on, but 
something does seem fishy to me: Once N and C become "large enough": ab 
quits producing output; the log files show an unknown thread waiting 
notification (possibly an artifact of my shell program); thread queue 
locking occurring (which seems like it might be serious); and cpu usage 
per request seems to INCREASE with C (in contrast with apache_1.3.9).

I have a dual Celeron 400Mhz machine that I ran under a Redhat6.1 smp and 
a up kernel with the JDK1.2 ClassicVM (green threads). The smp kernel 
does suck (as noted by Dean Gaudet): thruput tends to DECREASE with 
increasing C, thread queue locking is noted in one of the log files, and 
ab produces nothing or garbage. I haven't bothered to record data from 
the SMP runs. I have 256MB SD100 memory and a WD Caviar disk (there's 
very little IO, as expected).

Here are the summarized data, running the following command

/usr/sbin/ab -n N -c C 
http://localhost:8080/examples/servlet/HelloWorldExample
				    
	N (ab)	C (ab)   thruput/sec	%CPU busy	avg proc. time (ab) ms 			
	1000		1		79.11		99.67		11
			20		61.53		100		255		
			40		65.46		100		541		
			60		63.56		100		784		
			80		68.63		100		671				
			100		67.79		100		632		

	10000		1		83.95		100		11
			20		78.21		100		283		
			40		75.41		100		680

When N = 10,000 and C > 40 catalina.log shows an error mesg re: unknown 
thread waiting to be notified. Since the average number of active 
connections/threads is a function of the memory available and processor 
speed, I expect other people will see similar logfile entries with 
different N and C values. I'll send an updated, more flexible, version of 
the bash scripts today or tomorrow as I'm feelin' poorly. :-)

Roy
-- 
Roy Wilson
E-mail: designrw@bellatlantic.net						

 

Mime
View raw message