from first hand experience with a couple different webservers, handling 500 active 
users at the same time isn't easy regardless of what you use. It doesn't matter if you 
use ASP, PHP, JSP or CGI.
 
You're going to have distribute the load across a couple of systems, so that each 
system handles 50 active users. How long does the average request take?  If it is 
taking more than 1 second to process the request, you maybe doing unnecessary joins in 
your db queries.
 
there are a couple of things to try, if you haven't already.
 
1. profile your queries to the database and time how long it takes. you can use JMeter 
to do the stress/performance test
 
2. profile how long the queries take from server
 
3. measure how much processing time the request. what I mean by processing time is the 
elapsed time to return a response minus the query time.
 
if you read my performance article on the tomcat resources page, you'll see how big of 
an impact database performance has on your webapp. If you're not using stored 
procedures, use them. the response time, performance and scalability with stored 
procedures vs. plain old Sql statements is significant. Any application with moderate 
load should use stored procedures as much as possible. You take a hit with portability 
of your code, since stored procedures vary between databases.
 
I hope that helps.
 
peter


Jonathan Holloway <[EMAIL PROTECTED]> wrote:
I've had minimal improvements changing jvm properties, I've looked at increasing the 
heap size to around 512Mb, there's around 1Gb of memory on the server so that should 
be more than adequate for tomcat. The code has been looked at and it doesn't seem to 
be problematic. Database access doesn't occur no Tomcat, JBoss handles all that and 
the connection pooling we have in place has been thoroughly looked at.

I've read the performance paper on the tomcat website and followed some other 
performance documents found on the web. Those suggested the increase in the number of 
processors and one definately mentioned setting it to 2 x the number of simultaneous 
requests. The problem we have is that 100 users are obtaining the test from the 
database at roughly the same time.

The "-server" option in Java seemed to make things worse, we had the JVM bomb out with 
a bug that I think relates to this. All the VM stuff has been looked at, I've also 
tried changing the garbage collection options with minimal effect. The browser window 
from which the test is run sometimes appears to freeze but I assume that's just 
because Tomcat is processing the requests. 

I think part of the problem is that Tomcat cannot process the requests fast enough at 
present for 100 users, if I set a connectionTimeout limit then half of the 100 
students get 404 page not found errors when trying to access a test hence the -1 
setting.

The following settings are normally used for the JVM:

-Xms512m -Xmx512m

I've removed the -server tag because of the problems we've had with it. Anybody got 
any other ideas how I can improve matters with the JVM or tomcat?

More importantly are there any performance benchmarks for Tomcat, ideally I want to 
support 500 users accessing the test at once, does this sound feasible?

Thanks,
Jon.




--------- Original Message ---------

DATE: Fri, 14 Nov 2003 11:09:06
From: Remy Maucherat 
To: Tomcat Users List 
Cc: 

>Jonathan Holloway wrote:
>> Dear All,
>> 
>> I wonder if anyone could help with the following. I'm currently
>> using Tomcat to host a multiple choice test system. I have between
>> 100 - 200 people logging into tomcat and sitting a test almost
>> simultaneously when instructed to by the test supervisor. Does
>> anybody know what the maximum number of users supported by a single
>> Tomcat server is? I'm running a fairly good server with a dual
>> processor setup and 1Gb of memory.
>> 
>> When i get around 100 students logging onto a test some of the
>> connections are refused and the server becomes very slow at handling
>> the requests. I'm running Tomcat 5.0 in an attempt to improve this
>> situation? Is this a better server than 4.1.24? The tomcat settings
>> for server.xml follow, can anybody suggest how to improve the
>> performance of this?
>> 
>> >> maxSpareThreads="75" enableLookups="false" redirectPort="8443" 
>> acceptCount="400" debug="0" connectionTimeout="-1" 
>> disableUploadTimeout="true" />
>> 
>> I've set the processors to 2x the number of simultaneous requests I
>> expect (200 at the mo.) starting at 200 threads initially. The
>> accept count is set at 400 so that this number of threads are queued
>> to be serviced by tomcat, I don't want any user to be kicked off so
>> the connection timeout is set to -1.
>> 
>> Can anybody suggest anything to improve the performance of this
>> system?
>
>There's a pretty good article on the Tomcat website on performance. Did
>you read it ?
>
>Some comments:
>- yes, TC 5 is faster than 4.1, but this is a maximum throughtput 
>mostly; applications may smooth out differences
>- don't disable connectionTimeout
>- minSpareThreads should be lower, and your value is conflicting with 
>maxSpareThreads ... So set minSpareThreads to 50, and maxSpareThreads to 100
>- as usual, the connector is not likely the bottleneck; VM settings and 
>database access likely have more impact
>
>-- 
>xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>R�my Maucherat
>Senior Developer & Consultant
>JBoss Group (Europe) S�RL
>xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>



Need a new email address that people can remember
Check out the new EudoraMail at
http://www.eudoramail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

Reply via email to