Hello all: I have been put in charge of testing various configurations to determine which has the most efficient use of CPU time and which can support the most users. Note we have a shoestring budget for this. I am new to the servlet game so this is what I have to work with right now. WHAT IS GOING TO HAPPEN: Clients connect to our servers and run a java application via servlets.
DIFFERENT CONFIGURATIONS which is more efficient?) Servers: Tomcat(alone) Tomcat(with Apache) Apache(with Resin) Any other free/cheap ones you may suggest. We only need to be able to run servlets. Operating Systems: Win 2k server Some Linux distro JRE: IBM Sun Others? We have done some preliminary testing and found that a server with a 1.4GHz and 1GB ram can only handle about 10-15 users. Is this about right? Or should it be higher? We are hoping for up to 40 or 50 and maybe even 100. Also, we are looking for some server stress testing software for simulating many users trying the server. Again, we are trying to operate on a smallish budget. Any help you guys/gals could provide would be appreciated. Thanks,
Jason R. Kretzer<br />Software Engineer<br />System Administrator<br /><a href="http://alia.iwarp.com" target="_blank" rel="nofollow">http://alia.iwarp.com</a>
Hi Jason, 10-15 users That doesn't sound right. What server are you using for that? One I'd take a look at is Jetty It's a fast HTTP/Servlet Container. JBoss (the open source application server) uses Jetty as its HTTP/Servlet container. I haven't used Resin but have heard that it really performs well. If just need it to run servlets, Tomcat should work well. It doesn't run plain HTML pages too quickly, but lately they've have improved this feature. There is a java testing tool called JUnitPerf that you can use to create tests that will measure performance and scaleability. Microsoft has an excellent Web Stress tool for free. You can find it here. Hopefully this gives you some leads in the right direction. /rick
Anecdotal evidence is that usually the big bottleneck is the DBMS, though I'd also make sure that the network "pipe" was fat enough. One problem with a shoestring budget is that beyond essential performance issues (like having it break down at 10-15 users), it's likely to be cheaper to just throw hardware at the problem than to invest the money in metric tools and personnel.
Sometimes the only way things ever got fixed is because people became uncomfortable.
Most important thing is to isolate your bottlenecks. -Is the app going to run over the Internet. If it is Apache is good to have for security. It's well tested and pretty secure. If it's over the intranet you can probably live without Apache. -Where is you app. spending most of it's time? OptimizeIt(now from Borland) is a commercial tool which is very useful for profiling apps. -If db connections are the bottleneck look at having a connection pool. If it's the queries themselves look at ways to optimize the queries. -The CPU may not be the bottleneck it may be the disk itself. -Take a look at http://www.onjava.com/pub/ct/26. Good series of articles on Java tuning and optimizations. HTH Ravi