Re: Monitor Tomcat with SNMP (MRTG etc)?
if you use tomcat 5.0.19 or new, you can use JMeter to monitor tomcat. peter On 8/10/05, Seth Ladd [EMAIL PROTECTED] wrote: Dave Morrow wrote: Does anyone know how to use SNMP tools to monitor a Tomcat server? Are there any open source tools to assist or add this ability? With JDK 5 you can enable the builtin SNMP agent. This can export all the standard JMX attributes of the VM. I don't think there's a way to export anything else, though. At least this gives memory, cpu, etc monitoring. Seth - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Monitor Tomcat with SNMP (MRTG etc)?
JMeter has a tomcat monitor, which can access tomcat's status servlet to get memory and thread info. jmeter can monitor up to 200 servers on a 1.4ghz laptop with 1gb of ram without any problems. you can find out more on jmeter's site or go directly to the user manual here http://jakarta.apache.org/jmeter/usermanual/build-monitor-test-plan.html peter lin On 8/10/05, Lintang JP [EMAIL PROTECTED] wrote: how can I do monitoring with JMeter ? plis advice... On 8/11/05, Peter Lin [EMAIL PROTECTED] wrote: if you use tomcat 5.0.19 or new, you can use JMeter to monitor tomcat. peter On 8/10/05, Seth Ladd [EMAIL PROTECTED] wrote: Dave Morrow wrote: Does anyone know how to use SNMP tools to monitor a Tomcat server? Are there any open source tools to assist or add this ability? With JDK 5 you can enable the builtin SNMP agent. This can export all the standard JMX attributes of the VM. I don't think there's a way to export anything else, though. At least this gives memory, cpu, etc monitoring. Seth - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- --- http://www.psychotazkia.or.id - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] photo album software for web site
or you could just use one of the free sites out there like flickr.com spogger.com peter On 7/14/05, Ben Kim [EMAIL PROTECTED] wrote: Sorry about this off topic post, but I am looking for a couple free software for the pictures on my web sites. One is to display pictures as slide show, and the other one is to display pictures as thumbnails (clickable for full size). They must be able to run on UNIX server and do not require any database. Currently, I am using some Java applets but they are taking up too much desktop's resources to open up. These are some gallery software I run. All opensourced, I believe. - gallery: Featurewise the best, (resizing, thumbnailing, extracting camera info, etc.) php based. http://gallery.menalto.com/ I've seen awesome sites running this but they seemed to be using a skin of their own. - coppermine gallery: Featurewise similar to gallery but I find some functions lacking. php based. http://coppermine.sourceforge.net/ - ginp: Featurewise behind the first two, but jsp/servlet based, so if you are in a java shop... http://culnane.navidat.com/dc/ginp/index.jsp My 2 cents. Regards, Ben Kim / Developer College of Education Texas AM University - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: monitoring performance
you can easily setup JMeter to monitor tomcat and save the results to a log. peter lin On 6/17/05, Hossein S. Attar [EMAIL PROTECTED] wrote: Hi: Is it possible to instruemnt Tomcat to collect statistics such as averasge response time (for each servlet), etc and then somehow get these statistics programatically (e.g., using an API). I'm trying to write a program that needs to get such statistics, therefore monitoring tools that report the statistics graphically are not suitable for me. Thanks, Hossein - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Scalability issue question
you could always look at the new performance benchmark i ran for static files on the resources page. it shows the performance of tomcat 5 as the number of clients increase and file size increases. hope that helps peter On 6/2/05, Wallace, Scott [EMAIL PROTECTED] wrote: Network is 100megabit Server are 2- HP DL380g4 Dual 3.4gig Xeon chips with 4gig of Ram running Win2003 Scott Wallace Livelink Global Infrastructure Coordinator [EMAIL PROTECTED] 405-270-2027 wk 405-323-2237 cell 405-228-6027 fax I have an existential map; it has 'you are here' written all over it. - Steven Wright -Original Message- From: Hari Mailvaganam [mailto:[EMAIL PROTECTED] Sent: Thursday, June 02, 2005 1:59 PM To: Tomcat Users List Subject: Re: Scalability issue question It can be a good idea to have it load balanced from a performance and uptime point of view. It is hard to absolutely decipher what each Tomcat can specifically handle in terms of load. A load test, which emualates user actions, may give you a ball park. The dependencies are on network, server OS, memory, JVM etc. regards, Hari Mailvaganam On 6/2/05, Wallace, Scott [EMAIL PROTECTED] wrote: Currently using IIS and the ISAPI Tomcat redirect. Would like to just use Tomcat instead but don't know if it can handle my static content. The book Apache Tomcat 5 published by WROX warns of performance issues with static content, but ComputerWorld just did an article about Weather.com running their site on multiple load balanced Tomcat servers servicing 18 million hits a day. http://www.computerworld.com/softwaretopics/os/linux/story/0,10801,925 83 ,00.html I currently only get around 250 k hits per day but we're about to integrate email with Livelink and that puts me into a whole new performance arena. Any thoughts or guidance would be appreciated. Scott Wallace Livelink Global Infrastructure Coordinator [EMAIL PROTECTED] 405-270-2027 wk 405-323-2237 cell 405-228-6027 fax I have an existential map; it has 'you are here' written all over it. - Steven Wright Important Notice!! If you are not the intended recipient of this e-mail message, any use, distribution or copying of the message is prohibited. Please let me know immediately by return e-mail if you have received this message by mistake, then delete the e-mail message. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: The amazingly slow performance of JSP (profiler results)
I would advise using the tag plugins to change tags to pure java. JSP tags are considerably slower than pure JSP + java, but many people find that combination bad on maintenance. When remy and I worked on the book back in 2002, I did quite a bit of comparison between pure java and JSTL. as you see already, using JSTL means a single line of code gets converted to several lines of JSTL api calls. once you look at how many classes are involved in executing JSTL, it's pretty clear it's using much more memory and causing more GC. The performance you see is the result of JSTL using more memory. Back in 2002, I wrote several pages using JSP + java and JSP + JSTL to measure the actual cost of from a performance perspective. The performance difference isn't noticeable if a page has less than 50 tags. With 200+ tags, the performance difference does range from 2-5x slower for JSTL. It's worse when you use XML with JSTL. It's also one of the reasons I like to use JSTL + XML to benchmark. It really gives the VM a workout. have you tried running JRockit 5? I did some tests recently and JRockit's memory management might give you a 2x improvement in performance. That's assuming you can use jdk5 peter On 5/28/05, Kevin Burton [EMAIL PROTECTED] wrote: I've been tuning our application trying to get the maximum performance out if the system as possible. I've been throwing the system at jprofiler and allowing it to tell me where to optimized. In short Tomcat is slower than our DB, filesystem,. network and all other systems by about 4x. I've been able to shave some page load time off by some but not enough. The problem I'm starting to see is that we just have a large number of c:set and c:if constructs (and so forth) within loops. These loops then get executed 5 times and next thing you know it you have 50k taglib calls. The problem comes when you look at the source: Let's say you start with: c:set var=foo value=bar/ This nice little elegant piece of code gets expanded to: private boolean _jspx_meth_c_set_0(PageContext _jspx_page_context) throws Throwable { PageContext pageContext = _jspx_page_context; JspWriter out = _jspx_page_context.getOut(); // c:set org.apache.taglibs.standard.tag.rt.core.SetTag _jspx_th_c_set_0 = (org.apache.taglibs.standard.tag.rt.core.SetTag) _jspx_tagPool_c_set_var_value_nobody.get(org.apache.taglibs.standard.tag.rt.core.SetTag.class); _jspx_th_c_set_0.setPageContext(_jspx_page_context); _jspx_th_c_set_0.setParent(null); _jspx_th_c_set_0.setVar(foo); _jspx_th_c_set_0.setValue(new String(bar)); int _jspx_eval_c_set_0 = _jspx_th_c_set_0.doStartTag(); if (_jspx_th_c_set_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return true; _jspx_tagPool_c_set_var_value_nobody.reuse(_jspx_th_c_set_0); return false; } Which explains why JSP alone is so amazingly slow! I did a comparison of the page performance here and it was 15x slower than just using Java. So the same set operation in Java was 15x faster. ... so in short ... does anyone have any way to speed this up? The other thing I noticed is that EL is evaluated at runtime (which has to be parsed) and sometimes uses reflections. Can anyone shed any more light on this and hopefully provide some performance optimization suggestions? Kevin -- Use Rojo (RSS/Atom aggregator)! - visit http://rojo.com. See irc.freenode.net #rojo if you want to chat. Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html Kevin A. Burton, Location - San Francisco, CA AIM/YIM - sfburtonator, Web - http://peerfear.org/ GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: The amazingly slow performance of JSP (profiler results)
correction to my previous email. On 5/28/05, Remy Maucherat [EMAIL PROTECTED] wrote: On 5/28/05, Peter Lin [EMAIL PROTECTED] wrote: as you see already, using JSTL means a single line of code gets converted to several lines of JSTL api calls. once you look at how many classes are involved in executing JSTL, it's pretty clear it's using much more memory and causing more GC. The performance you see is the result of JSTL using more memory. It will obviously use more CPU and make more API calls. However, it does not allocate any objects, but instead will reuse per page objects (which is very fast). So overall, it sounds weird to me that the bottleneck would be on tag invocation. In the end, it's hard to beat a Java if with a generic high level construct ;) I don't understand how anyone could be surprised by that. I should note that the difference was greater in Jasper 1. The latest jasper has improved over the original jasper, which is what I used to compare JSTL vs Java. Remy's response reminded me of the differences, so my statement may not be true for the latest jasper and would only apply to the original jasper2. That version didn't have the tag plugin or all the recent stuff in tomcat 5.5.x. Back in 2002, I wrote several pages using JSP + java and JSP + JSTL to measure the actual cost of from a performance perspective. The performance difference isn't noticeable if a page has less than 50 tags. With 200+ tags, the performance difference does range from 2-5x slower for JSTL. It's worse when you use XML with JSTL. It's also one of the reasons I like to use JSTL + XML to benchmark. It really gives the VM a workout. have you tried running JRockit 5? I did some tests recently and JRockit's memory management might give you a 2x improvement in performance. That's assuming you can use jdk5 Right, the code for invoking tags seems to be a good candidate to be optimized by a competent JIT. Don't know if anyone cares, but Resin's fastJSTL basically compiles to java. Or atleast it used to when JSTL 1.0 was originally released. Maybe it's just me, but I've come to expect tags to run slower and make a butt load of more API calls. One tip that might help is to increase the heap in tomcat. Before our application went into production, I ran 12 different heap configurations and ran a suite of JMeter stress tests to see which is optimal. good luck. peter lin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: The amazingly slow performance of JSP (profiler results)
On 5/28/05, Kevin Burton [EMAIL PROTECTED] wrote: Remy Maucherat wrote: It will obviously use more CPU and make more API calls. However, it does not allocate any objects, but instead will reuse per page objects (which is very fast). So overall, it sounds weird to me that the bottleneck would be on tag invocation. In the end, it's hard to beat a Java if with a generic high level construct ;) I don't understand how anyone could be surprised by that. I think people are suprised because we don't realize that JSP is using such a high level overhead internally. People see the semantics of c:if and c:set and so forth and assume they're analogs for Java if semantics and assume they would perform at the same level. Its more obvious to you guys because you're usually delving into Tomcat at that level where I haven't done so in a long time (especially into Jasper generated source)l. Kevin Ironically, that is the appeal and downside of JSTL. c:if looks pretty innocent, until one realizes how many lines Jasper2 generates to setup the tag. Jasper2 does a much better job than jasper1 in tomcat 4.0.x. If I remember correctly, jasper2 was first released with jasper 4.1.x. The initial version of jasper2 fixed some major performance issues like deeply nested try/catch and methods exceeding java's line limit. to be fair, the great thing about JSP tags and the tag API is it makes it easy for tags to operate with each other. it makes is pretty easy to mix and match JSTL with other tag libraries. the tag plugin API in jasper2 is a great way to take if, when, foreach and convert those to pure java. good luck peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache vs Tomcat WRT Security
I don't know about others, but I prefer to run tomcat on port 8080 and then setup the router to redirect port 80 to 8080. it's rather easy to setup these days. peter On 5/19/05, Remy Maucherat [EMAIL PROTECTED] wrote: On 5/19/05, Mark [EMAIL PROTECTED] wrote: I was very interested in the discussion concerning Apache vs Tomcat WRT Performance. While I cannot argue with the performance numbers, I do like putting Apache in front of Tomcat for 2 reasons that I have found so far. 1. SSL. If I am going to be serving pages whether they be dynamic or static, I think Apache handles the SSL communications and key storage better. In tests that I have run, the crypto that needs to be done to support SSL is faster in C than Java. Also, Tomcat stores any key information in a flat file, where Apache will prompt for a password on startup. Now some administrators might like this better, because Tomcat will then start automatically at boot time, I would not want any password of mine sitting in the clear in a test file. The next Tomcat 5.5 release will include APR based connectors, where SSL will (predictably) use OpenSSL. 2. If you are hosting your site using port 80 on Unix boxes this means running Tomcat as root. I can think of very few reasons why Tomcat needs to be run as root. Apache has the ability to 'downgrade' user privileges once Apache is started. I think you should have googled for that. You can use either kernel level redirection (iptables, for example), or use jsvc. -- x Rémy Maucherat Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Basic load balancing
If you can afford it, go with hardware load balancing. it's easier to setup and configure. it's also more reliable and robust. of course, you have to open up your wallet and let the money fall out. if you really want sophisticated load balancing that allows you to schedule a server to go down, i would recomend Resonate. I've used them in the past and their product is solid. peter On 5/12/05, Will Hartung [EMAIL PROTECTED] wrote: From: Harry Mantheakis [EMAIL PROTECTED] Sent: Thursday, May 12, 2005 1:51 AM What load balancing system would you recommend? (Is there some consensus, cost issues aside, as to what the best type of load balancing system is?) I wish I could say. We use a pair of redundant BigIP's from F5 (which are eleventy zillion dollars), so, they're quite sophisticated. I know Cisco has some as well (which are probably eleventy and a half zillion dollars). 3 common paths are to use Apache's mod_proxy, mod_jk, or the Tomcat balancer app. I don't think any of them provide sticky sessions (though, obviously, the Tomcat webapp could probably be reasonably modified to support that -- but I don't know if anyone uses the Tomcat balancer in production). I don't think any of them let you easily bring down an individual server on your own, though you might be able to reconfigure mod_proxy on the fly with Apache and do a graceful restart after you've taken your downed server out of the mix in the httpd.conf file. The children should finish their requests normally and safely. The biggest problem with load balancing and such is that it opens up a HUGE kettle of fish with regards to testing and such. For example, you'll get it all set up, type http://myhost/webapp/page.jsp and it'll magically appear and then you'll go Yea, but WHERE did it come from? We modified all of our JSPs, for example, to put the host of the server they came from in an HTML comment. It really starts getting confusing. You should have a good set of web based tests for your application so that you can be sure that it's still working the same when you add the new servers. Then you can start testing things like yanking network cables from your tomcat servers to see if failover happens (or not), and other effects, and then decide if you're happy with it. You also can see if you perhaps gained any capacity by splitting the tomcats (if you're app is DB bound, then the bottleneck may be your DB server and the extra tomcat may not help you at all, for example). But, either way, testing is the key here to make sure everything is working as planned (and unplanned) since the new configuration is that much more complicated than it was before. Regards, Will Hartung ([EMAIL PROTECTED]) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Off Topic: Tomcat monitoring tools
there's also this, which I haven't tried. http://mc4j.sourceforge.net/ peter On 5/10/05, Didier McGillis [EMAIL PROTECTED] wrote: Maybe something like this will work. http://www.hyperic.net Its not just for Tomcat. From: Guillaume Lahitette [EMAIL PROTECTED] Reply-To: Tomcat Users List tomcat-user@jakarta.apache.org To: tomcat-user@jakarta.apache.org Subject: RE: Off Topic: Tomcat monitoring tools Date: Tue, 10 May 2005 00:18:25 +0100 Thank you very much Peter. Yes indeed, we've used JMeter to do our testing but I wasn't aware of this monitoring capability. I'm trying to install Tomcat 5 to give it a try since JMeter can't play with our Tomcat 4.1.26 for monitoring purposes. Any other candidates out there? TIA. Guillaume -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: 09 May 2005 18:47 To: Tomcat Users List Subject: Re: Off Topic: Tomcat monitoring tools there's a tool call jmeter from a group call Jakarta, you might have heard of them. Jmeter has the ability to monitor multiple tomcat's and show the performance in a graph. http://jakarta.apache.org/jmeter/ http://jakarta.apache.org/jmeter/usermanual/build-monitor-test-plan.html have fun peter lin On 5/9/05, Guillaume Lahitette [EMAIL PROTECTED] wrote: Hi, I am looking for feedback on (preferably free) tools to monitor the performance of Tomcat during stress testing. We're running Tomcat 4.1.26 in production on Linux and Windows (as a service). Ideally, the tool would support connecting to multiple, remote servers. TIA. Guillaume - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Off Topic: Tomcat monitoring tools
there's a tool call jmeter from a group call Jakarta, you might have heard of them. Jmeter has the ability to monitor multiple tomcat's and show the performance in a graph. http://jakarta.apache.org/jmeter/ http://jakarta.apache.org/jmeter/usermanual/build-monitor-test-plan.html have fun peter lin On 5/9/05, Guillaume Lahitette [EMAIL PROTECTED] wrote: Hi, I am looking for feedback on (preferably free) tools to monitor the performance of Tomcat during stress testing. We're running Tomcat 4.1.26 in production on Linux and Windows (as a service). Ideally, the tool would support connecting to multiple, remote servers. TIA. Guillaume - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Off Topic: Tomcat monitoring tools
there is a java console for servlet containers, but I haven't tried it. peter On 5/9/05, Guillaume Lahitette [EMAIL PROTECTED] wrote: Thank you very much Peter. Yes indeed, we've used JMeter to do our testing but I wasn't aware of this monitoring capability. I'm trying to install Tomcat 5 to give it a try since JMeter can't play with our Tomcat 4.1.26 for monitoring purposes. Any other candidates out there? TIA. Guillaume -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: 09 May 2005 18:47 To: Tomcat Users List Subject: Re: Off Topic: Tomcat monitoring tools there's a tool call jmeter from a group call Jakarta, you might have heard of them. Jmeter has the ability to monitor multiple tomcat's and show the performance in a graph. http://jakarta.apache.org/jmeter/ http://jakarta.apache.org/jmeter/usermanual/build-monitor-test-plan.html have fun peter lin On 5/9/05, Guillaume Lahitette [EMAIL PROTECTED] wrote: Hi, I am looking for feedback on (preferably free) tools to monitor the performance of Tomcat during stress testing. We're running Tomcat 4.1.26 in production on Linux and Windows (as a service). Ideally, the tool would support connecting to multiple, remote servers. TIA. Guillaume - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5 slow, it's in production, please help!
it sounds like the problem is caused by a large number of connections dying holding things up. peter On 5/6/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: 153 ESTABLISHED connections to port 443 553 connections to port 443 in the process of dying. 1420 connections total (Assuming I'm reading the output of wc correctly;) [EMAIL PROTECTED] tony]$ cat netstat.txt |grep ESTABLISHED|wc 6934851 55442 [EMAIL PROTECTED] tony]$ cat netstat.txt |grep CLOSE_WAIT|wc 101 7077980 [EMAIL PROTECTED] tony]$ cat netstat.txt |grep TIME_WAIT|wc 6104270 47590 [EMAIL PROTECTED] tony]$ cat netstat.txt |grep FIN_WAIT|wc 3 21 237 [EMAIL PROTECTED] tony]$ cat netstat.txt |wc 14209929 112098 [EMAIL PROTECTED] tony]$ cat netstat.txt |grep 127.0.0.1.8009|grep ESTABLISHED|wc 5123584 40960 [EMAIL PROTECTED] tony]$ cat netstat.txt |grep 127.0.0.1.8009|grep WAIT|wc 25 1751950 [EMAIL PROTECTED] tony]$ cat netstat.txt |grep 129.93.1.146.443|grep WAIT|wc 5533871 43222 [EMAIL PROTECTED] tony]$ cat netstat.txt |grep 129.93.1.146.443|grep ESTABLISHED|wc 1531071 12242 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, May 06, 2005 7:00 PM To: Tomcat Users List; [EMAIL PROTECTED] Subject: RE: Tomcat 5 slow, it's in production, please help! I think some of the problem is at the OS level You can set a session time at the tomcat level, but the default solaris TCP timeouts are hours long. I hope you used the ndd commands to set the TCP parameters for short web sessions. Also, Solaris 2.6 has a bad thread model and there are numerous patches required to run it with any recent Java 2 distributions. To use the 1.4.xxx JVM would require about a dozen patches. It would be way better to try to get Solaris 10 installed on this box -- It handles the ndd setting for you and is way faster on the same hardware. [even solaris 8...] -- Original message -- From: [EMAIL PROTECTED] What does netstat -nt show? You may have enough connections going that old ones have to time out before you can establish a new one. -Original Message- From: Jeffrey [mailto:[EMAIL PROTECTED] Sent: Friday, May 06, 2005 2:16 PM To: tomcat-user@jakarta.apache.org Subject: Tomcat 5 slow, it's in production, please help! I have a apache/tomcat environment that has some problems recently. The environment has the following: 1. Apache 1.3 2. Tomcat 5.0.28 (Max memory 384mb) 3. JDK 1.4.2_06 My apache has MaxClient set to 256 (apache default). The maxThread for tomcat is 500. The site is a database driven site. It seems working fine when load is low. But when there are more than 150 threads (from the sever status view of the tomcat manager), it's response time is very slow (5 - 10 minutes). I have tested the database connections, they seem responding fairly well. Interesting thing is that most of time the slow response time only happens when a user login. Once the user login and get the main menu page, the user will get a good response time. Is it related to KeepAlive connections. Another strange thing is that many threads always show up in the server status view on the tomcat html manager page even though I am sure the request has gone (I tested this by making a request, then close the browser). My CPU usage is low when the slowdown is experienced (Using the top command on this solaris box which has old solaris operating system 2.6? with 1GB memory. I set the session timeout time to 5 minutes, but in the session view of tomcat manager, I see message 30 - 40 minutes:136 sessions. How a session that is more than 30 minutes is still there. Maybe I don't understand this message correctly. Please advice. This is a production machine. Helps are greatly appreciated. Thanks. Jeffrey. Discover Yahoo! Get on-the-go sports scores, stock quotes, news and more. Check it out! http://discover.yahoo.com/mobile.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OutOfMemoryError - 100 thread limit?
the advice given in previous message to dump the Perm gen info out should tell you. running tomcat in a profiler may not show it. I use optimizeIt frequently and it doesn't show perm generation. peter On 4/27/05, Andre Van Klaveren [EMAIL PROTECTED] wrote: We're battling this same problem at our client's site. I think I've identified the same cause (running out of Perm Gen space) but I have to prove it to them first. Hooking a profiler into the Tomcat instance should clearly show this but they don't have one handy. Moving some of the applications to a second instance of Tomcat should also solve this problem. -- Virtually, Andre Van Klaveren Architect III, SCP Enterprise Transformation Services Unisys Corporation On 4/21/05, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Peter Lin [mailto:[EMAIL PROTECTED] Subject: Re: OutOfMemoryError - 100 thread limit? the default Perm is 64M. If LeeAnn's webapp have a large number of classes, maybe there's too many; therefore forcing the VM to resize the perm. IIRC (haven't looked at core HotSpot code in detail since 1.4.1 days), the virtual address boundary between perm and the other generations is fixed at JVM initialization and never moves. The perm gen does go through GC just like the other gens, but no memory ever moves between the perm and any other space, and the perm gen maximum virtual address range never changes. The HotSpot JVM allocates, but does not commit, all of the -Xmx space at startup in one contiguous block (although there were rumors of that changing in later JVMs). Only the -Xms portion is committed, split up into three regions - young, old, and perm. When a region fills and GC doesn't reduce the usage significantly, additional pages are committed in whichever region needs expanding. I think what was happening is that LeeAnn simply had more classes than would fit in 64 MB. Nothing to do with threads, just the total number of classes in all the applications added together. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OutOfMemoryError - 100 thread limit?
my 2 bits. when I tried to replicate the issue LeeAnn saw, it was pretty clearn the JVM can't resize the heap fast enough to account for the large number of webapps being loaded. simply increasing the initial heap should solve the problem. peter On 4/21/05, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: J. Ryan Earl [mailto:[EMAIL PROTECTED] Subject: RE: OutOfMemoryError - 100 thread limit? So let me get this straight, LeeAnn is specifying a maximum heap size of 512MB and a minimum size of 128MB. It looks like the heap doesn't get adjusted up when the servlets are initializing? Thus she needs to increase her minimum heapsize, so something like -Xms512m should fix it? Probably not, since I suspect she's running out of perm gen space. IIRC, the perm gen size is calculated from -Xmx, which is already at 512m. Using the PrintGCDetails will tell us for sure. If that shows perm gen space to be exhausted, then adjusting -XX:MaxPermSize should fix it. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OutOfMemoryError - 100 thread limit?
for what it's worth, adjusting the perm gen space rarely helps. I did a ton of benchmarks back in 2002 using all sorts of -X combinations and it rarely helped. You have to really know the memory allocation pattern to effectively tune perm gen space. adjusting the new eden may help, but again that requires quite a bit of profiling to really understand how an application is allocating memory. peter On 4/21/05, J. Ryan Earl [EMAIL PROTECTED] wrote: Peter Lin reproduced and fixed the problem LeeAnn is seeing, and said If I set my heap to -Xms256m -Xmx512m I'm able to load the 18 webapps just fine. the total memory used after all the webapps are loaded is 152Megs. He didn't mention anything about adjusting the perm gen space. -ryan -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Thursday, April 21, 2005 9:19 AM To: Tomcat Users List Subject: RE: OutOfMemoryError - 100 thread limit? From: J. Ryan Earl [mailto:[EMAIL PROTECTED] Subject: RE: OutOfMemoryError - 100 thread limit? So let me get this straight, LeeAnn is specifying a maximum heap size of 512MB and a minimum size of 128MB. It looks like the heap doesn't get adjusted up when the servlets are initializing? Thus she needs to increase her minimum heapsize, so something like -Xms512m should fix it? Probably not, since I suspect she's running out of perm gen space. IIRC, the perm gen size is calculated from -Xmx, which is already at 512m. Using the PrintGCDetails will tell us for sure. If that shows perm gen space to be exhausted, then adjusting -XX:MaxPermSize should fix it. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OutOfMemoryError - 100 thread limit?
I may not be running the same app LeeAnn is running, but my webapp is fairly heavy and creates several threads per webapp. Even if it's not an apples-to-apples comparison, it's still a worth while trick to try. if it doesn't work, then back to square one :) if it does, then LeeAnn can go back to work. peter On 4/21/05, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: J. Ryan Earl [mailto:[EMAIL PROTECTED] Subject: RE: OutOfMemoryError - 100 thread limit? Peter Lin reproduced and fixed the problem LeeAnn is seeing, and said If I set my heap to -Xms256m -Xmx512m I'm able to load the 18 webapps just fine. the total memory used after all the webapps are loaded is 152Megs. He didn't mention anything about adjusting the perm gen space. Nor is he running the same webapps that LeeAnn is using (as far as I know), so that's a bit of an apples and oranges comparison. Also, his conjecture that the JVM couldn't keep up doesn't fit with my understanding of object allocation and GC in a HotSpot JVM. If needed, the JVM simply suspends all the application threads and does a full GC. Again, the -XX:+PrintGCDetails will tell us what's really going on. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OutOfMemoryError - 100 thread limit?
wow, your webapp must be pretty heavy and have lots of jar and/or classes. The behavior that I saw was that 16 of the webapps would load with the default JVM heap settings. When I went to Tomcat's manager page, and click start, I got a similar OOME and the webapp would not start. At that point, there was nothing I could do to get it to start. once I shut down tomcat, change the heap and restart, tomcat was able to load all the webapps. Here's a trick that might help. Start tomcat, but with only 10 copies of your webapp. look at the total memory used and substract 64meg. Divide that number by 10 and see what the memory requirements are for each webapp. (Total mem - 64mb ) / number of webapps = mem per webapp. once you have that, you can figure what you really need. if the total for 18 webapps is less than 512Mb, it means something else is happening, which means you can rule out Tomcat as the cause. Since all tomcat does is start the webapp and call the servletContextListeners, it really isn't doing much. hope that helps peter On 4/21/05, LeeAnn Pultz [EMAIL PROTECTED] wrote: Ok, this time I used -Xms512m -Xmx512m with the same results - Successfully created a SesameConfig object from FILE: /usr/local/extraview/stage2/jakarta-tomcat-5.0.28/webapps/site19/WEB-INF/configuration/Configuration.properties SesameProjectDir: /usr/local/extraview/stage2/jakarta-tomcat-5.0.28/webapps/site19/WEB-INF [Full GC [Tenured: 45429K-48110K(466048K), 0.6853640 secs] 80819K-48110K(518464K), 0.6854250 secs] [Full GC [Tenured: 48110K-47709K(466048K), 0.7746580 secs] 48119K-47709K(518464K), 0.7747100 secs] Right on the 18th site spin-up - I'm not getting OutOfMemory errors in the catalina.out trace, but the servlet didn't load and gave me an error in the browser: pe Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Servlet.init() for servlet ExtraView threw exception org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300) org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374) org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743) org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675) org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) java.lang.Thread.run(Thread.java:536) root cause java.lang.OutOfMemoryError note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs. At 08:25 AM 4/21/2005, you wrote: I, for one, am awaiting LeeAnn's response with abated breath. =) -ryan -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Thursday, April 21, 2005 9:53 AM To: Tomcat Users List Subject: RE: OutOfMemoryError - 100 thread limit? From: Peter Lin [mailto:[EMAIL PROTECTED] Subject: Re: OutOfMemoryError - 100 thread limit? if it doesn't work, then back to square one :) It would be even better to get some real data with the -XX:+PrintGCDetails, so we can stop speculating... - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] LeeAnn Pultz ExtraView Corporation [EMAIL PROTECTED] 831-461-7100 x115 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OutOfMemoryError - 100 thread limit?
silly question, does this webapp have like thousands of JSP and servlets and preload the JSP's? peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OutOfMemoryError - 100 thread limit?
glad I was wrong and you found a solution. http://java.sun.com/docs/hotspot/VMOptions.html I'm just guessing here, but by forcing the maxPermSize to 128, it leaves more space for the eden and prevents classes from getting promoted to perm. Atleast that's logical explanation I can think of. Another way to get the heap to resize in larger increments and prevent it from getting smaller is to set the -XX:MinHeapFreeRatio. peter lin On 4/21/05, LeeAnn Pultz [EMAIL PROTECTED] wrote: Possible success! I went back to my weblogic installation which I was successfully able to open up 25 sites to see what it was doing when starting up. It had -XX:MaxPermSize=128m in the process description. I added that to my catalina_opts and I got past the 18 site limitation of just firing them up. Can anyone give me any information on what this does? Is this the perm gen that Chuck mentioned before? Are there any caveats to setting this memory option? thanks! LeeAnn At 09:13 AM 4/21/2005, you wrote: silly question, does this webapp have like thousands of JSP and servlets and preload the JSP's? peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] LeeAnn Pultz ExtraView Corporation [EMAIL PROTECTED] 831-461-7100 x115 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OutOfMemoryError - 100 thread limit?
glad I can help. it's the little odd edge case problems that I find most interesting. it was fun to figure why that behavior was occuring. peter On 4/21/05, J. Ryan Earl [EMAIL PROTECTED] wrote: Awesome, I'm glad that was solved as I'm about to do the same thing with our application: running multiple instances of the application on a single tomcat instance housing many virtual hosts. Thanks for the http://java.sun.com/docs/hotspot/VMOptions.html link Peter. -ryan -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Thursday, April 21, 2005 11:52 AM To: Tomcat Users List Subject: RE: OutOfMemoryError - 100 thread limit? From: LeeAnn Pultz [mailto:[EMAIL PROTECTED] Subject: Re: OutOfMemoryError - 100 thread limit? It had -XX:MaxPermSize=128m in the process description. Ahah, as they say. Can anyone give me any information on what this does? Is this the perm gen that Chuck mentioned before? Yes, this controls the size of the permanent generation. The permanent generation portion of the heap is where class objects (instances of java.lang.Class) are allocated. If you have a lot of classes - which app servers frequently do - the size of this space needs to be increased. A quick scan of the 1.4.2 HotSpot source shows the default value to be 64m. Are there any caveats to setting this memory option? Other than it subtracts from the total heap space for normal object, no. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OutOfMemoryError - 100 thread limit?
yup you're right, silly me. ignore my brain dead remark. as long as the problem gets solved, I don't mind looking stupid. so it would appear by setting the PermSize, the jvm is pushing all java.lang.Class instances to Perm rather than loading them in eden and then promoting them to tenured. If you run verbosegc again, the gc interval should be longer than previous settings. I can't think of any real trade-offs of setting Perm to 128 other than using more RAM. If I remember correctly Perm is also where static stuff goes. peter On 4/21/05, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Peter Lin [mailto:[EMAIL PROTECTED] Subject: Re: OutOfMemoryError - 100 thread limit? I'm just guessing here, but by forcing the maxPermSize to 128, it leaves more space for the eden and prevents classes from getting promoted to perm. I think you're confusing tenured with perm. Nothing is ever promoted to perm - only known long-lived objects (primarily instances of java.lang.Class) are allocated in there, and no objects ever migrate to or from perm space. Regular objects are normally allocated in eden space (young gen), and if they live long enough, are migrated to the tenured area (old gen) during a GC. Increasing the perm size actually reduces, not increases, the amount of eden space available since the total of all three generations (young, old, perm) must come from the -Xmx setting. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OutOfMemoryError - 100 thread limit?
On 4/21/05, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Peter Lin [mailto:[EMAIL PROTECTED] Subject: Re: OutOfMemoryError - 100 thread limit? so it would appear by setting the PermSize, the jvm is pushing all java.lang.Class instances to Perm rather than loading them in eden and then promoting them to tenured. Instances of java.lang.Class are always allocated in the perm gen, never in an eden space, regardless of any heap or gen size settings. logically, it makes sense that all java.lang.Class classes are loaded in Perm. But the result on the behavior LeeAnn saw is a bit perplexing. I'm just exploring here, so if it doesn't make sense, it's cuz I'm making wild guesses. ie, talking out of my rear. the default Perm is 64M. If LeeAnn's webapp have a large number of classes, maybe there's too many; therefore forcing the VM to resize the perm. Doing that, the VM probably is allocating a big block and copying all the data over. I believe that is much heavier task than an incremental GC and probably equally costly as a full GC. So once the new Perm is ready, the VM should make the old block available. So the end result of setting -XX:MaxPermSize is it avoid resizing Perm, which allows Tomcat to load the webapps quickly. Even though setting max Perm to 128 reduces the overall space for new/old generation, it results in better performance because the VM doesn't have to move perm? of course this is assuming the VM prefers to have a continuous block for Perm memory. I believe that's true, since static data is associated with java.lang.Class instances. - Chuck peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OutOfMemoryError - 100 thread limit?
I'm able to go up to 647 threads and 500 concurrent connections with 5.5.4 without any problems. chances are, it's a memory leak in the webapp. only way to know for sure is to profile the application. peter lin On 4/20/05, Tim Funk [EMAIL PROTECTED] wrote: There are no limits in tomcat. http://jakarta.apache.org/tomcat/faq/memory.html -Tim LeeAnn Pultz wrote: I have a tomcat server with multiple copies of our web application running. We are running into what seems to be a hard-coded limit on the number of threads available to the Tomcat application. I have added code to our servlet class which prints out the number of active threads whenever I initialize the servlet. On Red Hat Linux boxes, whenever we start up enough copies of the servlet to hit 100 active threads, we reach an OutOfMemoryError - regardless of the Xms/Xmx settings (memory profiling shows that we have plenty of memory available). On Windows XP, 50 seems to be the magic number. I have tried tweaking Xss parameters, my ulimit command in Linux shows unlimited - and I have reached the same results with Tomcat 3.3.1, 4.0.28 and 5.0.28 using Java 1.4.1 and 1.4.2. When I use WebLogic 8.1 on the same Linux box, I reach 241 active threads with no problems whatsoever (stopped my testing at that number) so it does not seem to be an o/s limitation, or a java limitation - which leads me to believe there is something in Tomcat? Is the number of threads available to tomcat hard coded somewhere? Is there a parameter or configuration setting that I can change to increase this? If this question is better off posted to the developers list, please someone, let me know :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OutOfMemoryError - 100 thread limit?
that sounds very odd. so if I understand correctly. this happens when you hit the login page. I assume this don't happen with a static html page? by any chance are you using jsp tags or some web framework? peter On 4/20/05, LeeAnn Pultz [EMAIL PROTECTED] wrote: This is not a memory leak in the application - we have hooked up a profiler to the application and watched the actual memory usage when causing this issue to happen. We have lots of memory available, are nowhere near the Xmx limit, and the machine has lots of memory available over and above the Xmx limit. In fact, I can cause the error to happen every single time, simply by hitting the first web page (login page) of the application - I don't have to log in, or do any work. All I have to do to get the error to happen is hit 18-19 different instances of the web application, watch the Active thread count go up to 100 and tip over the tomcat. We've gone through all of the suggested infomation out on the web - we've tweaked the Xms, Xmx and Xss parameters - none of these changes made any difference, since we're not actually running out of memory. I've reproduced this on 3 different machines, all running Red Hat Linux ES 3.0 - both with LD_ASSUME_KERNEL 2.4.19 and without, so the Linux threading model doesn't seem to affect the problem. At 04:16 AM 4/20/2005, you wrote: I'm able to go up to 647 threads and 500 concurrent connections with 5.5.4 without any problems. chances are, it's a memory leak in the webapp. only way to know for sure is to profile the application. peter lin On 4/20/05, Tim Funk [EMAIL PROTECTED] wrote: There are no limits in tomcat. http://jakarta.apache.org/tomcat/faq/memory.html -Tim LeeAnn Pultz wrote: I have a tomcat server with multiple copies of our web application running. We are running into what seems to be a hard-coded limit on the number of threads available to the Tomcat application. I have added code to our servlet class which prints out the number of active threads whenever I initialize the servlet. On Red Hat Linux boxes, whenever we start up enough copies of the servlet to hit 100 active threads, we reach an OutOfMemoryError - regardless of the Xms/Xmx settings (memory profiling shows that we have plenty of memory available). On Windows XP, 50 seems to be the magic number. I have tried tweaking Xss parameters, my ulimit command in Linux shows unlimited - and I have reached the same results with Tomcat 3.3.1, 4.0.28 and 5.0.28 using Java 1.4.1 and 1.4.2. When I use WebLogic 8.1 on the same Linux box, I reach 241 active threads with no problems whatsoever (stopped my testing at that number) so it does not seem to be an o/s limitation, or a java limitation - which leads me to believe there is something in Tomcat? Is the number of threads available to tomcat hard coded somewhere? Is there a parameter or configuration setting that I can change to increase this? If this question is better off posted to the developers list, please someone, let me know :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] LeeAnn Pultz ExtraView Corporation [EMAIL PROTECTED] 831-461-7100 x115 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OutOfMemoryError - 100 thread limit?
that is some really odd behavior coming from Tomcat. I've probably run over 1K benchmarks on Tomcat over the last 3 years and I've yet to see that kind of behavior. Here are some random ideas to try, which I've used in the past. They may not help, but I figure it wouldn't hurt to suggest them. use jmeter to send 250 requests with 25 threads against the index page. then view the status in tomcat 5.5.4. Over time, you should see the number of threads drop to the minimum. Under normal conditions, tomcat will create enough threads to service those threads. after a few minutes, the thread count should drop. If it doesn't, it means something is keeping the connection open. if you see that, it is most likley an application bug. Another idea is to do netstat and see what the status of the connections are. It might be some of the connections are not closing. peter On 4/20/05, LeeAnn Pultz [EMAIL PROTECTED] wrote: We have no jsps in the application. The index.html page loads our servlet class, and I've put logging of active number of threads at the beginning of the servlet ini() and the very end of the service() methods in that servlet class. The application initializes, but we aren't doing any of the real work of rendering dynamic pages or talking to the database at this point. I get the same results whether my Xmx is 84 megs or 512 megs - we're just not using that much memory. At 08:48 AM 4/20/2005, Peter Lin wrote: that sounds very odd. so if I understand correctly. this happens when you hit the login page. I assume this don't happen with a static html page? by any chance are you using jsp tags or some web framework? peter On 4/20/05, LeeAnn Pultz [EMAIL PROTECTED] wrote: This is not a memory leak in the application - we have hooked up a profiler to the application and watched the actual memory usage when causing this issue to happen. We have lots of memory available, are nowhere near the Xmx limit, and the machine has lots of memory available over and above the Xmx limit. In fact, I can cause the error to happen every single time, simply by hitting the first web page (login page) of the application - I don't have to log in, or do any work. All I have to do to get the error to happen is hit 18-19 different instances of the web application, watch the Active thread count go up to 100 and tip over the tomcat. We've gone through all of the suggested infomation out on the web - we've tweaked the Xms, Xmx and Xss parameters - none of these changes made any difference, since we're not actually running out of memory. I've reproduced this on 3 different machines, all running Red Hat Linux ES 3.0 - both with LD_ASSUME_KERNEL 2.4.19 and without, so the Linux threading model doesn't seem to affect the problem. At 04:16 AM 4/20/2005, you wrote: I'm able to go up to 647 threads and 500 concurrent connections with 5.5.4 without any problems. chances are, it's a memory leak in the webapp. only way to know for sure is to profile the application. peter lin On 4/20/05, Tim Funk [EMAIL PROTECTED] wrote: There are no limits in tomcat. http://jakarta.apache.org/tomcat/faq/memory.html -Tim LeeAnn Pultz wrote: I have a tomcat server with multiple copies of our web application running. We are running into what seems to be a hard-coded limit on the number of threads available to the Tomcat application. I have added code to our servlet class which prints out the number of active threads whenever I initialize the servlet. On Red Hat Linux boxes, whenever we start up enough copies of the servlet to hit 100 active threads, we reach an OutOfMemoryError - regardless of the Xms/Xmx settings (memory profiling shows that we have plenty of memory available). On Windows XP, 50 seems to be the magic number. I have tried tweaking Xss parameters, my ulimit command in Linux shows unlimited - and I have reached the same results with Tomcat 3.3.1, 4.0.28 and 5.0.28 using Java 1.4.1 and 1.4.2. When I use WebLogic 8.1 on the same Linux box, I reach 241 active threads with no problems whatsoever (stopped my testing at that number) so it does not seem to be an o/s limitation, or a java limitation - which leads me to believe there is something in Tomcat? Is the number of threads available to tomcat hard coded somewhere? Is there a parameter or configuration setting that I can change to increase this? If this question is better off posted to the developers list, please someone, let me know :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED
Re: OutOfMemoryError - 100 thread limit?
that looks really bizzare to me. From the exception, it looks like tomcat can't create a new thread to process the request. It makes me think the previous threads that are done are being held by something for some odd reason. Normally the threads should be available again. What is the ramp up time for your tests? in other words, are you throwing 100 concurrent requests at it simultaneously, or ramping it up over a few seconds? peter On 4/20/05, LeeAnn Pultz [EMAIL PROTECTED] wrote: Perhaps this will trigger some ideas? The stack trace we get when we get the OutOfMemoryError is : 2005-04-20 09:55:33 StandardWrapperValve[ExtraView]: Allocate exception for servlet ExtraView javax.servlet.ServletException: Error allocating a servlet instance at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:691) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:144) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:536) - Root Cause - java.lang.OutOfMemoryError LeeAnn Pultz ExtraView Corporation [EMAIL PROTECTED] 831-461-7100 x115 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OutOfMemoryError - 100 thread limit?
the number of threads seems odd. unless your webapp creates a bunch of threads using ServletContextListener, the total thread count should be between 10-15. I have a webapp which creates 10 threads on startup. When tomcat is done and my webapp is loaded, I have a total of 38. if your webapp is creating threads at start, what are they doing? peter lin Threads Active : 94 Threads Active : 94 [Full GC 48357K-47096K(129792K), 0.6358540 secs] LeeAnn Pultz ExtraView Corporation [EMAIL PROTECTED] 831-461-7100 x115 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OutOfMemoryError - 100 thread limit?
if your application is thread heavy, I would recommend changing it so that one thread can manage several processes. creating 800+ threads is going to hit a scalability and reliability wall very quickly. In general, you want to make sure the number of threads remain constant under constant load. If it doesn't the server will eventually crash as you currently see. I'm guessing the application is using threads to handle async processes, which is good, but spawning new threads with every request isn't going to work. hope that helps peter On 4/20/05, LeeAnn Pultz [EMAIL PROTECTED] wrote: We tried a new test :) We added code that spins up 8 threads inside just a plain servlet that doesn't do anything else. When I fire up 10 different instances of that servlet, I get hundreds of threads printing out as being active - and no out of memory errors. So we added the same code to our (slightly more complex) application servlet, and did the same thing. Now the reported number of threads is much higher, but I still get an OutOfMemory error at the same number of new instances fired up (between 17-18 sites started up). Active Threads : WHEN STARTING INIT() 617 [GC 57193K-46096K(129792K), 0.0353880 secs] [GC 57936K-47554K(129792K), 0.0238210 secs] [Full GC 49312K-47441K(129792K), 0.6546550 secs] [Full GC 47732K-47129K(129792K), 0.7706500 secs] [Full GC 48310K-47256K(129792K), 0.6425030 secs] [Full GC 47276K-47263K(129792K), 0.6445770 secs] [Full GC 47263K-47263K(129792K), 0.6368020 secs] [Full GC 47263K-47241K(129792K), 0.7775600 secs] java.lang.OutOfMemoryError [Full GC 47295K-47242K(129792K), 0.6301470 secs] [Full GC 47248K-47245K(129792K), 0.6451800 secs] [Full GC 47257K-47250K(129792K), 0.6454320 secs] [Full GC 47271K-47262K(129792K), 0.7056980 secs] java.lang.OutOfMemoryError java.lang.OutOfMemoryError So it looks like it isn't just a thread issue. If I fire up the simple servlet 18 times, I don't get the error. In fact, I can then go on to fire up our main servlet another 17-18 times before we get the OutOfMemory error - this time at 844 threads before it dies. There must be something else going on within our application that is consuming something that the simple servlet doesn't. If anyone has any suggestions on other things that I could check for ? Someone said OOM errors can mean out of file descriptors as well? thanks for all your help so far - I'm really hoping we can figure this out! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OutOfMemoryError - 100 thread limit?
ahh ok. .. my confusion. back to the problem you see. I've tested tomcat with 30-40 threads without any problems in the past. Even with heavy weight JSTL tags in JSP's, I'm able to go up to 50 threads with tomcat4.1. I'll try hitting tomcat's status servlet with 50 threads tonight and see what happens. peter On 4/20/05, LeeAnn Pultz [EMAIL PROTECTED] wrote: I think we've gotten things a bit confused :) The application itself is not thread intensive - our original tests show that each separate copy of the web application started up 3 active threads. Further testing, when we added in debugging code that would spin up dozens of threads just to see if we could cause the tomcat to get the error if we started one application up and had tons of threads, showed that we could get 800+ threads with no problems (no outofmemory errors) and that the problem does not in fact seem to be specifically related to the number of threads the application creates. In fact, regardless of whether each instance of the application spins up 3 threads (real situation) or 10+ (debug code only) threads, we still get the out of memory error not when we hit a certain number of threads, but actually when we hit a certain number of servlets having been initialized. Testing a very simple servlet, I can start up 25 instances of the servlet with no OOM error. Testing our application's servlet, I can only start up 17-18 instances of the servlet before getting an OOM error. At this point I am going through our standard application servlet, trying to isolate what work it does that may cause a problem when we do it 17 or 18 times on one installation of tomcat. At 05:16 PM 4/20/2005, you wrote: if your application is thread heavy, I would recommend changing it so that one thread can manage several processes. creating 800+ threads is going to hit a scalability and reliability wall very quickly. In general, you want to make sure the number of threads remain constant under constant load. If it doesn't the server will eventually crash as you currently see. I'm guessing the application is using threads to handle async processes, which is good, but spawning new threads with every request isn't going to work. hope that helps peter On 4/20/05, LeeAnn Pultz [EMAIL PROTECTED] wrote: We tried a new test :) We added code that spins up 8 threads inside just a plain servlet that doesn't do anything else. When I fire up 10 different instances of that servlet, I get hundreds of threads printing out as being active - and no out of memory errors. So we added the same code to our (slightly more complex) application servlet, and did the same thing. Now the reported number of threads is much higher, but I still get an OutOfMemory error at the same number of new instances fired up (between 17-18 sites started up). Active Threads : WHEN STARTING INIT() 617 [GC 57193K-46096K(129792K), 0.0353880 secs] [GC 57936K-47554K(129792K), 0.0238210 secs] [Full GC 49312K-47441K(129792K), 0.6546550 secs] [Full GC 47732K-47129K(129792K), 0.7706500 secs] [Full GC 48310K-47256K(129792K), 0.6425030 secs] [Full GC 47276K-47263K(129792K), 0.6445770 secs] [Full GC 47263K-47263K(129792K), 0.6368020 secs] [Full GC 47263K-47241K(129792K), 0.7775600 secs] java.lang.OutOfMemoryError [Full GC 47295K-47242K(129792K), 0.6301470 secs] [Full GC 47248K-47245K(129792K), 0.6451800 secs] [Full GC 47257K-47250K(129792K), 0.6454320 secs] [Full GC 47271K-47262K(129792K), 0.7056980 secs] java.lang.OutOfMemoryError java.lang.OutOfMemoryError So it looks like it isn't just a thread issue. If I fire up the simple servlet 18 times, I don't get the error. In fact, I can then go on to fire up our main servlet another 17-18 times before we get the OutOfMemory error - this time at 844 threads before it dies. There must be something else going on within our application that is consuming something that the simple servlet doesn't. If anyone has any suggestions on other things that I could check for ? Someone said OOM errors can mean out of file descriptors as well? thanks for all your help so far - I'm really hoping we can figure this out! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] LeeAnn Pultz ExtraView Corporation [EMAIL PROTECTED] 831-461-7100 x115 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OutOfMemoryError - 100 thread limit?
I'll try loading up 18 version of my webapp and see if tomcat blows up. should know in a hour or so peter On 4/20/05, LeeAnn Pultz [EMAIL PROTECTED] wrote: when you say 50 threads, do you mean 50 separate web applications? My concern right now is that we seem to be limited to 17-18 copies of our web app on a particular installation of tomcat. And that is just hitting the login page - not doing any work. Practically, for applications with many users, we may be limited to 7-10 copies of our application on a tomcat. Maybe I'm expecting too much? Perhaps that's a reasonable number of concurrent webapps that can be run on a tomcat? But if that is the case, it would be good to know what the limiting factor is, if it's not number of threads or amount of memory. thanks for much for your help! At 05:48 PM 4/20/2005, you wrote: ahh ok. .. my confusion. back to the problem you see. I've tested tomcat with 30-40 threads without any problems in the past. Even with heavy weight JSTL tags in JSP's, I'm able to go up to 50 threads with tomcat4.1. I'll try hitting tomcat's status servlet with 50 threads tonight and see what happens. peter On 4/20/05, LeeAnn Pultz [EMAIL PROTECTED] wrote: I think we've gotten things a bit confused :) The application itself is not thread intensive - our original tests show that each separate copy of the web application started up 3 active threads. Further testing, when we added in debugging code that would spin up dozens of threads just to see if we could cause the tomcat to get the error if we started one application up and had tons of threads, showed that we could get 800+ threads with no problems (no outofmemory errors) and that the problem does not in fact seem to be specifically related to the number of threads the application creates. In fact, regardless of whether each instance of the application spins up 3 threads (real situation) or 10+ (debug code only) threads, we still get the out of memory error not when we hit a certain number of threads, but actually when we hit a certain number of servlets having been initialized. Testing a very simple servlet, I can start up 25 instances of the servlet with no OOM error. Testing our application's servlet, I can only start up 17-18 instances of the servlet before getting an OOM error. At this point I am going through our standard application servlet, trying to isolate what work it does that may cause a problem when we do it 17 or 18 times on one installation of tomcat. At 05:16 PM 4/20/2005, you wrote: if your application is thread heavy, I would recommend changing it so that one thread can manage several processes. creating 800+ threads is going to hit a scalability and reliability wall very quickly. In general, you want to make sure the number of threads remain constant under constant load. If it doesn't the server will eventually crash as you currently see. I'm guessing the application is using threads to handle async processes, which is good, but spawning new threads with every request isn't going to work. hope that helps peter On 4/20/05, LeeAnn Pultz [EMAIL PROTECTED] wrote: We tried a new test :) We added code that spins up 8 threads inside just a plain servlet that doesn't do anything else. When I fire up 10 different instances of that servlet, I get hundreds of threads printing out as being active - and no out of memory errors. So we added the same code to our (slightly more complex) application servlet, and did the same thing. Now the reported number of threads is much higher, but I still get an OutOfMemory error at the same number of new instances fired up (between 17-18 sites started up). Active Threads : WHEN STARTING INIT() 617 [GC 57193K-46096K(129792K), 0.0353880 secs] [GC 57936K-47554K(129792K), 0.0238210 secs] [Full GC 49312K-47441K(129792K), 0.6546550 secs] [Full GC 47732K-47129K(129792K), 0.7706500 secs] [Full GC 48310K-47256K(129792K), 0.6425030 secs] [Full GC 47276K-47263K(129792K), 0.6445770 secs] [Full GC 47263K-47263K(129792K), 0.6368020 secs] [Full GC 47263K-47241K(129792K), 0.7775600 secs] java.lang.OutOfMemoryError [Full GC 47295K-47242K(129792K), 0.6301470 secs] [Full GC 47248K-47245K(129792K), 0.6451800 secs] [Full GC 47257K-47250K(129792K), 0.6454320 secs] [Full GC 47271K-47262K(129792K), 0.7056980 secs] java.lang.OutOfMemoryError java.lang.OutOfMemoryError So it looks like it isn't just a thread issue. If I fire up the simple servlet 18 times, I don't get the error. In fact, I can then go on to fire up our main servlet another 17-18 times before we get the OutOfMemory error - this time at 844 threads before it dies. There must
Re: OutOfMemoryError - 100 thread limit?
ok, I just tried starting tomcat with the default heap size and 18 instances of my webapp and it got OOME just as you see. If I set my heap to -Xms256m -Xmx512m I'm able to load the 18 webapps just fine. the total memory used after all the webapps are loaded is 152Megs. the total number of webapps is 25 webapps including the default tomcat webapps and a few more. so basically you'll need to set the heap larger enough and it should work. If i do some math, we can calculate a rough estimate for the min heap (154 - 64)/25 = 3.6megs so basically, you'll need to multiply the number of webapps by 4 megs to figure out the heap setting. peter lin On 4/20/05, LeeAnn Pultz [EMAIL PROTECTED] wrote: when you say 50 threads, do you mean 50 separate web applications? My concern right now is that we seem to be limited to 17-18 copies of our web app on a particular installation of tomcat. And that is just hitting the login page - not doing any work. Practically, for applications with many users, we may be limited to 7-10 copies of our application on a tomcat. Maybe I'm expecting too much? Perhaps that's a reasonable number of concurrent webapps that can be run on a tomcat? But if that is the case, it would be good to know what the limiting factor is, if it's not number of threads or amount of memory. thanks for much for your help! At 05:48 PM 4/20/2005, you wrote: ahh ok. .. my confusion. back to the problem you see. I've tested tomcat with 30-40 threads without any problems in the past. Even with heavy weight JSTL tags in JSP's, I'm able to go up to 50 threads with tomcat4.1. I'll try hitting tomcat's status servlet with 50 threads tonight and see what happens. peter On 4/20/05, LeeAnn Pultz [EMAIL PROTECTED] wrote: I think we've gotten things a bit confused :) The application itself is not thread intensive - our original tests show that each separate copy of the web application started up 3 active threads. Further testing, when we added in debugging code that would spin up dozens of threads just to see if we could cause the tomcat to get the error if we started one application up and had tons of threads, showed that we could get 800+ threads with no problems (no outofmemory errors) and that the problem does not in fact seem to be specifically related to the number of threads the application creates. In fact, regardless of whether each instance of the application spins up 3 threads (real situation) or 10+ (debug code only) threads, we still get the out of memory error not when we hit a certain number of threads, but actually when we hit a certain number of servlets having been initialized. Testing a very simple servlet, I can start up 25 instances of the servlet with no OOM error. Testing our application's servlet, I can only start up 17-18 instances of the servlet before getting an OOM error. At this point I am going through our standard application servlet, trying to isolate what work it does that may cause a problem when we do it 17 or 18 times on one installation of tomcat. At 05:16 PM 4/20/2005, you wrote: if your application is thread heavy, I would recommend changing it so that one thread can manage several processes. creating 800+ threads is going to hit a scalability and reliability wall very quickly. In general, you want to make sure the number of threads remain constant under constant load. If it doesn't the server will eventually crash as you currently see. I'm guessing the application is using threads to handle async processes, which is good, but spawning new threads with every request isn't going to work. hope that helps peter On 4/20/05, LeeAnn Pultz [EMAIL PROTECTED] wrote: We tried a new test :) We added code that spins up 8 threads inside just a plain servlet that doesn't do anything else. When I fire up 10 different instances of that servlet, I get hundreds of threads printing out as being active - and no out of memory errors. So we added the same code to our (slightly more complex) application servlet, and did the same thing. Now the reported number of threads is much higher, but I still get an OutOfMemory error at the same number of new instances fired up (between 17-18 sites started up). Active Threads : WHEN STARTING INIT() 617 [GC 57193K-46096K(129792K), 0.0353880 secs] [GC 57936K-47554K(129792K), 0.0238210 secs] [Full GC 49312K-47441K(129792K), 0.6546550 secs] [Full GC 47732K-47129K(129792K), 0.7706500 secs] [Full GC 48310K-47256K(129792K), 0.6425030 secs] [Full GC 47276K-47263K(129792K), 0.6445770 secs] [Full GC 47263K-47263K(129792K), 0.6368020 secs] [Full GC 47263K-47241K(129792K), 0.7775600 secs] java.lang.OutOfMemoryError [Full GC 47295K-47242K(129792K), 0.6301470 secs
Re: Tomcat scalability
before you can answer that question, you need to know what the average and peak concurrent requests is. without that 300-400 concurrent users doesn't mean much. If those 400 users hit the site once per minute average over 30 minutes, it would mean 12,000 requests in 30 minutes. Even if the user hits the site once every 30 seconds, that would only be double 24,000 requests in 30 minutes. if I naively divide that to get requests/second, I get roughly 14 concurrent requests per second. Put it another way, that is basically 4% of the users sending a request at the same time. I would suggest stress testing your application. It's probably a good idea to look at your production access logs and run some stats. that way you're using real data as the basis of your test. peter On Apr 7, 2005 12:59 AM, Shrikant Navelkar [EMAIL PROTECTED] wrote: Hi, We are planning to deploy an application (JSP/Tomcat/Oracle) for 300-400 concurrent users. The hardware is HP/True UNIX platform and it is very powerful. Unfortunately we can not deploy the application in a phased wise manner. Can somebody help us to understand : 1. How scalable Tomcat is ? Are there sufficient examples of Tomcat for 300 + users ? 1. What are the tools available for scalability testing ? 2. Any document describing performance tuning of Tomcat server 3. Can we implement multiple tomcat instances on same server for better performance ? Thanks in advance Shrikant - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Performance monitoring
there's this little thing called the status servlet. It displays information in HTML format for each webapp. it can also show a subset of the full stats in XML. there's this other project in jakarta called JMeter. It has a monitor for tomcat5.0.19 and newer that can monitor one or more Tomcat instances. so if you don't count the status servlet and tomcat, nothing exists :) peter On Apr 5, 2005 2:20 PM, Tony Tomcat [EMAIL PROTECTED] wrote: I started writing a Filter for my tomcat to monitor performance but then I started wondering.. Is there a solution already out there that I can use? Can I pull data from Tomcat's MBeanServer? What I would like to know is how long my servlets are taking to run. I need the Min, Max and Average times. I then would build a servlet to output the data in XML or HTML format. I also would want the data over the past hour and past 24 hours. Thanks in advance for any pointers or suggestions! Tony - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Monitoring Tomcat Clusters
There's already a GUI monitor for Tomcat 5.0.19 and newer in JMeter. if you want to graph the cluster, it would be a matter of extending the monitor sampler to do so. http://jakarta.apache.org/jmeter/usermanual/build-monitor-test-plan.html peter On Sat, 5 Mar 2005 11:07:47 -0500, e [EMAIL PROTECTED] wrote: Hi, I'm looking for some examples on implementing a summary page on the current and historical usage of tomcat instances. I'm mostly interested in number of user sessions and JVM stats graphed over time. Basiclly, something exactly like this: http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/gallery/dgo-01.html I'm have a decent understanding on how to do it(poll manager, store results, generate graphs), but I would rather adapt something already out there rather that do it all from scatch. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Monitoring Tomcat Clusters
the monitor can shot the current status and the performance of tomcat over the last 1K samples. Depending on what your request interval is, the historic performance may cover a couple of minutes to an hour. peter On Sat, 05 Mar 2005 21:33:19 -0500, Ethan [EMAIL PROTECTED] wrote: Peter, Thanks, but I'm from looking over the docs its not clear how I would implement a web based status page capable of send alerts, etc. I know JMeter is great for loadtesting/profiling tomcat, but is it designed for what I'm looking for? -e Peter Lin wrote: There's already a GUI monitor for Tomcat 5.0.19 and newer in JMeter. if you want to graph the cluster, it would be a matter of extending the monitor sampler to do so. http://jakarta.apache.org/jmeter/usermanual/build-monitor-test-plan.html peter On Sat, 5 Mar 2005 11:07:47 -0500, e [EMAIL PROTECTED] wrote: Hi, I'm looking for some examples on implementing a summary page on the current and historical usage of tomcat instances. I'm mostly interested in number of user sessions and JVM stats graphed over time. Basiclly, something exactly like this: http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/gallery/dgo-01.html I'm have a decent understanding on how to do it(poll manager, store results, generate graphs), but I would rather adapt something already out there rather that do it all from scatch. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat and JRockit
I've benchmarks tomcat 5.5.4 with jrockit5 and it worked fine on Redhat FedoraCore1 peter On Thu, 3 Mar 2005 10:26:37 -, Michael Cornell [EMAIL PROTECTED] wrote: Hi, Just wondering if there is some documentation w regards to what/which virtual machines tomcat (5.0.x) has been tested on (ie does it work with BEA Jrockit and if so what version) ? Failing this, does anyone know if tomcat 5.0.25 does work (or there are issues) with Jrockit SDK 1.4.2 (which appears to be the same as 7.0) as featured here http://dev2dev.bea.com/products/wljrockit70/index.jsp Thanks Michael -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.6.0 - Release Date: 02/03/2005 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat is leaking memory
I would recommend using a profiler to track down memory leaks in your webapp. Chances are there's a bug in your code that is causing the memory leak. real memory leaks in tomcat usually get discovered and fixed quickly. OptimizeIt and JProbe both have eval versions you can download to profile your webapp. peter On Mon, 3 May 2004 15:53:10 +0200, Bedrijven.nl [EMAIL PROTECTED] wrote: Hi all gurus, My problem is as follows. I have several webapplication setup with the use of virtual hosting. Everything works fine. But there is one problem and that's the (free) memory allocated by tomcat. When I restart the server we have about 950 MB free memory. But after a while when the applications are running and a lot of work must be done by tomcat the free memory size goes lower and lower. No problem since the garbage collector is running. But I notice that the free memory of 950 MB will never reached. In fact the free memory goes down and down after a while. At the end the applicationscome with a java.lang.OutOfMemory exception. After a restart everything is fine. I am using Tomcat 552 on development and Tomcat 4.1.27 on the live server, but both have the same problem. My jdk version is 1.4.1_02. Have someone any idea?? Please help me out.. Maarten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Throughput and scalability
if you're talking about XML transformation, the biggest factor is the parser you use and the cpu speed. If you read my old performance article on the resource page, you can see some old numbers for AMD 2ghz system. depending on how much XML you need to handle concurrently, you may want to consider XML accelerators to get near wire speed. The primary limitations for XML processing is CPU and RAM. hope that helps peter On Wed, 23 Feb 2005 14:25:32 -0800, Ross Poppel [EMAIL PROTECTED] wrote: Hi Tomcat Users - We are implementing Tomcat (with Axis) for HTML translation to a proprietary format (as a pass-thru). This is for submission to an external system (its pretty simple data) and back again. We were wondering if anyone has any ideas how you would size a box (Solaris/HP-UX based) if you want to get a specific throughput (x number of messages per second). Is there any guidelines anyone can recommend? --- Ross Poppel - [EMAIL PROTECTED] Solutions Architect, PORTAL Software Cell: (609) 744-2050 EFax: (617) 344-2585 SMS: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Allow Apache to Serve Static Content
rather than setup tomcat + jk2 + apache, I would recommend setting up a dedicated image server. If you look at the static file benchmark results I posted recently, tomcat is actually faster for 1k files and equal to apache for larger than 1k files. http://cvs.apache.org/~woolfel/tc_results.html I hope that helps peter On Tue, 15 Feb 2005 15:25:28 -0500, Dave Morrow [EMAIL PROTECTED] wrote: Hi all, I have Apache integrated with Tomcat using mod_jk2 and all is working well with the exception of performance. I would like to direct Apache to serve the static content components of my Java application. How is this done? I presume there must be some type of httpd.conf setting to do this? David A. Morrow Technical Systems Lead Autodata Solutions Company [EMAIL PROTECTED] http://www.autodata.net Tel: (519) 951-6079 Fax: (519) 451-6615 Poor planning on your part does not necessarily constitute an emergency on my part. This message has originated from Autodata Solutions. The attached material is the Confidential and Proprietary Information of Autodata Solutions. This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please delete this message and notify the Autodata system administrator at [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat vs Jetty
I had a hard time understanding what those graphs mean. It really could use better captions to really explain clearly what the X and Y axis mean. I don't see any point comparing simple honestly, since it's not a servlet container. but I'm totally bias :) peter On Sun, 13 Feb 2005 15:53:27 +0100, Remy Maucherat [EMAIL PROTECTED] wrote: On Sat, 12 Feb 2005 10:51:53 +0100, PA [EMAIL PROTECTED] wrote: On Feb 12, 2005, at 06:20, Peter Lin wrote: For those who are curious. I decided to run apache AB against jetty to see if there are any differences. If you are into this kind of micro-benchmarks, take a look at Simple: http://simpleweb.sourceforge.net/ Niall Gallagher ran some comparisons between Apache, Resin and Tomcat: http://simpleweb.sourceforge.net/performance/comparison.php Quite instructive :P Unless Peter does a round of benchmarking on that, I see nothing but misinformation. Right now, the test is not very fair (conviniently old Tomcat version; not the same application code appeared to be running on both servers as the other one doesn't support the servlet API) and not very well specified either (there's text about the test, but I don't understand it in a way that woud allow me to reproduce the test). -- x Rémy Maucherat Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat vs Jetty
For those who are curious. I decided to run apache AB against jetty to see if there are any differences. Max Request/sec -- tomcat 5.5.4 - 5584 jetty 5.1.2 - 2486 the results suggest tomcat's throughput for 1k static content is 2x higher than the jetty 5.1.2. peter The setup -- Server: amd 2ghz 1gb of ram Redhat Fedora Core 1 tomcat 5.5.4 + jdk5 jetty 5.1.2 + jdk5 Client: gateway 450 laptop 1.4ghz centrino Pentium M 1gb ram apache2 ab C:\Apache\Apache2\binab -n 5 -c 50 -k http://192.168.0.41:8080/benchmark/1k.png This is ApacheBench, Version 2.0.41-dev $Revision: 1.121.2.12 $ apache-2.0 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/ Benchmarking 192.168.0.41 (be patient) Completed 5000 requests Completed 1 requests Completed 15000 requests Completed 2 requests Completed 25000 requests Completed 3 requests Completed 35000 requests Completed 4 requests Completed 45000 requests Finished 5 requests Server Software:Jetty/5.1.2 Server Hostname:192.168.0.41 Server Port:8080 Document Path: /benchmark/1k.png Document Length:1056 bytes Concurrency Level: 50 Time taken for tests: 20.469434 seconds Complete requests: 5 Failed requests:0 Write errors: 0 Keep-Alive requests:5 Total transferred: 6585 bytes HTML transferred: 5280 bytes Requests per second:2442.67 [#/sec] (mean) Time per request: 20.469 [ms] (mean) Time per request: 0.409 [ms] (mean, across all concurrent requests) Transfer rate: 3141.56 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect:00 0.1 0 10 Processing: 0 20 50.3 102373 Waiting:0 20 50.3 102373 Total: 0 20 50.3 102373 Percentage of the requests served within a certain time (ms) 50% 10 66% 10 75% 10 80% 10 90% 70 95%110 98%190 99%240 100% 2373 (longest request) C:\Apache\Apache2\binab -n 5 -c 50 -k http://192.168.0.41:8080/benchmark/1k.png This is ApacheBench, Version 2.0.41-dev $Revision: 1.121.2.12 $ apache-2.0 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/ Benchmarking 192.168.0.41 (be patient) Completed 5000 requests Completed 1 requests Completed 15000 requests Completed 2 requests Completed 25000 requests Completed 3 requests Completed 35000 requests Completed 4 requests Completed 45000 requests Finished 5 requests Server Software:Jetty/5.1.2 Server Hostname:192.168.0.41 Server Port:8080 Document Path: /benchmark/1k.png Document Length:1056 bytes Concurrency Level: 50 Time taken for tests: 20.829952 seconds Complete requests: 5 Failed requests:0 Write errors: 0 Keep-Alive requests:5 Total transferred: 6585 bytes HTML transferred: 5280 bytes Requests per second:2400.39 [#/sec] (mean) Time per request: 20.830 [ms] (mean) Time per request: 0.417 [ms] (mean, across all concurrent requests) Transfer rate: 3087.19 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect:00 0.1 0 10 Processing: 0 20 67.4 103855 Waiting:0 20 67.4 103855 Total: 0 20 67.4 103855 Percentage of the requests served within a certain time (ms) 50% 10 66% 10 75% 10 80% 10 90% 60 95%110 98%190 99%250 100% 3855 (longest request) C:\Apache\Apache2\binab -n 5 -c 50 -k http://192.168.0.41:8080/benchmark/1k.png This is ApacheBench, Version 2.0.41-dev $Revision: 1.121.2.12 $ apache-2.0 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/ Benchmarking 192.168.0.41 (be patient) Completed 5000 requests Completed 1 requests Completed 15000 requests Completed 2 requests Completed 25000 requests Completed 3 requests Completed 35000 requests Completed 4 requests Completed 45000 requests Finished 5 requests Server Software:Jetty/5.1.2 Server Hostname:192.168.0.41 Server Port:8080 Document Path: /benchmark/1k.png Document Length:1056 bytes Concurrency Level: 50 Time taken for tests: 20.108915 seconds Complete requests: 5 Failed requests:0 Write errors: 0 Keep-Alive requests:5 Total transferred: 6585 bytes HTML transferred: 5280 bytes Requests per second:
Re: Attn developers of Tomcat and JK
If you want immediately support Covalent offers it. I don't work for covalent, but they are reliable. the tone of your post is very rude and frankly completely inappropriate. I've come across bugs in every webserver I've used. Here is a short list, IIS, weblogic, websphere, resin, netscape and tomcat. of all the servers I've used over the last 6 years, tomcat is the most responsive in terms of fixing bugs and useful responses. Now that doesn't mean it's perfect or any where near perfect. Obviously you're using IIS, so why not just use .NET, C# and ADO. if you haven't got the experience or skill to use tomcat, than you're wasting everyone's time. Including your own valuable time. Quite honestly, for commercial products, you're looking at 8-12 months turn around time for a patch. Even then, it probably won't fix the problem. There are plenty of qualified and experienced developers who know tomcat insdie and out. I would advise hiring some one because it's near impossible to diagnose your problem without being at the system. peter lin On Tue, 08 Feb 2005 10:11:03 -0600, Eric Sandusky [EMAIL PROTECTED] wrote: To the developers of Tomcat and JK: If Tomcat + JK cannot process every request/response on a Windows server that is dual-xeon 3.0 Ghz processors with 4 GB of memory, then what machine would? And doesn't it seem strange how the JK2 project has been mysteriously abandoned? Thanks for going off in a seemingly better direction only to jump ship and leave everyone SOL. It makes me think that this whole Tomcat development effort is more of just a hobby and not something to be taken seriously. If anyone is willing to contact me on this issue, I would be more than happy to talk one-on-one. If you want to tell me that this is not the forum for ranting about Tomcat or JK, it should be. If you want to blackball me from this community, go ahead, I'm not getting any help from it as it is. I can only hope that this message reaches the people who supposedly support this software and lights a fire underneath them to improve it or tell us that it just doesn't work. Eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] - distribution graph of tomcat results
I generated a combined graph of the response time for tomcat 5.5.4 in client mode. http://cvs.apache.org/~woolfel/combined_graph.png thought some people might find it interesting. the graphs were generated by Jmeter. peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Preferred Platform for Tomcat5
Wow, I thought my home dev environment was old and slow. makes me wonder how many people bother to upgrade to the latest/newest hardware :) peter On Thu, 3 Feb 2005 12:00:49 -0500, Parsons Technical Services [EMAIL PROTECTED] wrote: TAO www.taolinux.org RHEL clone. PIII 750 512M Tomcat 5.0.19 JVM 1.4.2.x MySQL Small site with one week of punishment. Handled 50k hits in about 12 hours and never broke a sweat. Doug - Original Message - From: Didier McGillis [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Sent: Thursday, February 03, 2005 10:26 AM Subject: RE: Preferred Platform for Tomcat5 I have many. Tomcat 4,5 On Intel - Windows 2000 - MySQL - SQL2000 - Windows XP - MySQL - Debain - MySQL - Solaris 10 - Oracle - DB2 - Redhat 9 (2machines) - MySQL - Mac OSX - MySQL - Fedora 2 - MySQL - Redhat Enterprise 2 - MySQL All the machines have between 384 MB and 2 GB of Ram. Some noticable slowdown on the 384MB machine, but its a piece of ... ummm .. e ... fine craftsmanship to begin with. From: Todd Reed [EMAIL PROTECTED] Reply-To: Tomcat Users List tomcat-user@jakarta.apache.org To: tomcat-user@jakarta.apache.org Subject: Preferred Platform for Tomcat5 Date: Thu, 3 Feb 2005 09:11:26 -0600 Excluding Windows, is there a particular platform that works better with Tomcat5? What are members of this list using for a production installation of Tomcat? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Athlon 64 question
A friend asked me to post this for him. He is experiencing some memory issues related to Athlon 64 running Redhat Fedora Core3. Anyone know if this is related to LD_ASSUME_KERNEL=2.2.5 issue? thanks in advance peter his email below We have a fairly complex tomcat app with the env as follow: - tomcat 5.5.7 release - mysql Connector/J 3.0.16-ga - hibernate 2.17 Scenario 1: - NForce3 motherboard, Athlon-64 3gz, 1gb RAM - Fedora Core 3 for x86-64 (stock: kernel 2.6.9-1.667, glibc-2.3.3-74) - Sun's jdk-1_5_0_01-linux-amd64 - Result with JMeter 100 threads: - box memory usage zoomed to max - response time went up and up - about 5 minutes, box respond time went way long - kill all client, memory usage is still maximum no memory is released until java process is terminated Scenario 2: - NForce3 motherboard, Athlon-64 3gz, 2gb RAM - Windows XP (sp2) - Sun's jdk-1_5_0_01 for windows - Result with JMeter 100 threads: - memory usuage went up, but then stayed constant - response time were acceptable - kill all client, memory usage went down - very predictable behavior! Questions please: - What is going on? Is there there a huge problem w/ JVM for Linux? - Is there a recommended linux kernel/distro and JVM for AMD-64? All the test out there shows tremendous speed for AMD-64 and java Any help would be greatly appreciated. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Memory Requirement
the best way to figure out how much heap to set is to stress test your application. 1. figure out the average load 2. figure out the peak load 3. stress test the webapp with default settings 4. tweak the settings and retest 5. compare the results there's no magic formula that works for all cases. only way to know for sure and be able to state with confidence to those you report to is to run stress tests. peter On Wed, 2 Feb 2005 12:53:48 -0500, Jiang, Peiyun [EMAIL PROTECTED] wrote: I have two questions: (1) How much memory to give to JVM to run tomcat? As mush as possible? (2) How to reasonably estimate the memory requirement for a web application running in tomcat? Thanks. Peiyun Jiang - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Summary in pdf format
http://cvs.apache.org/~woolfel/benchmark_summary.pdf I've posted a pdf version of the benchmark write up. peter lin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Performance of different Tomcat Releases
look here http://cvs.apache.org/~woolfel/tc_results.html http://cvs.apache.org/~woolfel/benchmark_summary.doc peter On Tue, 1 Feb 2005 11:52:37 -0600, sudip shrestha [EMAIL PROTECTED] wrote: I would like to know if there is significant performance improvement from 5.0.x to 5.5.x. Is there some sort of relative performance study done by anybody? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: article draft - Summary of benchmark
I've updated the document with more charts from the excel spreadsheet and tried to make the explanations more clear. peter On Mon, 31 Jan 2005 14:20:11 -0500, Peter Lin [EMAIL PROTECTED] wrote: http://cvs.apache.org/~woolfel/benchmark_summary.doc http://cvs.apache.org/~woolfel/benchmark_summary.sxw http://cvs.apache.org/~woolfel/tc_results.html I've finished a complete draft of the benchmark results. If you have any feedback, please email me directly. thanks in advance. peter lin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
article draft - Summary of benchmark
http://cvs.apache.org/~woolfel/benchmark_summary.doc http://cvs.apache.org/~woolfel/benchmark_summary.sxw http://cvs.apache.org/~woolfel/tc_results.html I've finished a complete draft of the benchmark results. If you have any feedback, please email me directly. thanks in advance. peter lin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
more graphs
I managed to spend some time this weekend graphing up the results. I still have to add the results from Tim and write up a summary. http://cvs.apache.org/~woolfel/tc_results.html peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] does anyone have gigabit ethernet willing to run benchmarks
I'll post the war file in a few hours. heading out to buy some groceries before the storm arrives. peter On Sat, 22 Jan 2005 08:42:31 -0500, Tim Funk [EMAIL PROTECTED] wrote: Can you post a link to your 1k.png file? -Tim Peter Lin wrote: I've updated the testplans.zip file. in the zip file is a shell script named starttest.sh http://cvs.apache.org/~woolfel/testplans.zip to run the script, change the output path and the ab path. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
more results
for the high thread count test, I decided to test with apache ab to verify the jmeter results. it turns out for 1k png, jmeter isn't able properly exercize apache or tc5. for files larger than 5k, the jmeter results are accurate. here's the results server: amd 2ghz 1Gb ram Redhat fedora core1 jdk1.5 client: Sun X1 solaris 8 apache 1.3.3 ab network linksys 100mb switch enjoy :) peter results below This is ApacheBench, Version 1.3d $Revision: 1.58 $ apache-1.3 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright (c) 1998-2001 The Apache Group, http://www.apache.org/ Benchmarking 192.168.0.41 (be patient) Server Software:Apache-Coyote/1.1 Server Hostname:192.168.0.41 Server Port:8080 Document Path: /benchmark/1k.png Document Length:1056 bytes Concurrency Level: 100 Time taken for tests: 24.972 seconds Complete requests: 10 Failed requests:0 Broken pipe errors: 0 Keep-Alive requests:99070 Total transferred: 128646590 bytes HTML transferred: 105642240 bytes Requests per second:4004.49 [#/sec] (mean) Time per request: 24.97 [ms] (mean) Time per request: 0.25 [ms] (mean, across all concurrent requests) Transfer rate: 5151.63 [Kbytes/sec] received Connnection Times (ms) min mean[+/-sd] median max Connect:0 02.3 036 Processing: 024 14.1 22 672 Waiting:024 14.1 22 672 Total: 024 14.4 22 687 Percentage of the requests served within a certain time (ms) 50% 22 66% 23 75% 24 80% 24 90% 25 95% 44 98% 48 99% 50 100%687 (last request) This is ApacheBench, Version 1.3d $Revision: 1.58 $ apache-1.3 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright (c) 1998-2001 The Apache Group, http://www.apache.org/ Benchmarking 192.168.0.41 (be patient) Server Software:Apache-Coyote/1.1 Server Hostname:192.168.0.41 Server Port:8080 Document Path: /benchmark/1k.png Document Length:1056 bytes Concurrency Level: 150 Time taken for tests: 37.787 seconds Complete requests: 15 Failed requests:0 Broken pipe errors: 0 Keep-Alive requests:148691 Total transferred: 193026679 bytes HTML transferred: 158509824 bytes Requests per second:3969.62 [#/sec] (mean) Time per request: 37.79 [ms] (mean) Time per request: 0.25 [ms] (mean, across all concurrent requests) Transfer rate: 5108.28 [Kbytes/sec] received Connnection Times (ms) min mean[+/-sd] median max Connect:0 03.6 0 198 Processing: 037 24.5 36 1678 Waiting:037 24.5 36 1678 Total: 037 25.2 36 1699 Percentage of the requests served within a certain time (ms) 50% 36 66% 36 75% 37 80% 37 90% 38 95% 42 98% 72 99% 74 100% 1699 (last request) This is ApacheBench, Version 1.3d $Revision: 1.58 $ apache-1.3 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright (c) 1998-2001 The Apache Group, http://www.apache.org/ Benchmarking 192.168.0.41 (be patient) Server Software:Apache-Coyote/1.1 Server Hostname:192.168.0.41 Server Port:8080 Document Path: /benchmark/1k.png Document Length:1056 bytes Concurrency Level: 200 Time taken for tests: 61.237 seconds Complete requests: 20 Failed requests:0 Broken pipe errors: 0 Keep-Alive requests:184349 Total transferred: 257185795 bytes HTML transferred: 211252800 bytes Requests per second:3266.00 [#/sec] (mean) Time per request: 61.24 [ms] (mean) Time per request: 0.31 [ms] (mean, across all concurrent requests) Transfer rate: 4199.84 [Kbytes/sec] received Connnection Times (ms) min mean[+/-sd] median max Connect:0 4 14.5 0 225 Processing: 056 34.5 51 1494 Waiting:056 34.5 51 1494 Total: 061 42.0 52 1517 Percentage of the requests served within a certain time (ms) 50% 52 66% 55 75% 58 80% 60 90% 99 95%151 98%155 99%157 100% 1517 (last request) This is ApacheBench, Version 1.3d $Revision: 1.58 $ apache-1.3 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright (c) 1998-2001 The Apache Group,
[OT] does anyone have gigabit ethernet willing to run benchmarks
This is slightly off topic, but I was wondering if there's any tomcat user out there that has gigabit ethernet setup and able to run some benchmarks with apache ab. The latest set of ab results I posted is hitting the network IO bottleneck. clearly 11Mb per second is the max throughput for 100mbit ethernet. If anyone can run some tests on gigabit ethernet, please email me directly. thanks. hopefully this will provide some basic performance information for all tomcat users. peter lin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] does anyone have gigabit ethernet willing to run benchmarks
I've updated the testplans.zip file. in the zip file is a shell script named starttest.sh http://cvs.apache.org/~woolfel/testplans.zip to run the script, change the output path and the ab path. peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
more graphs
http://cvs.apache.org/~woolfel/tc_results.html I've updated the graphs. it now includes the graphs for apache2 and 1.3.3. there's a couple graphs comparing TC to apache. the apache ab results haven't been added yet, but I will do that this weekend. enjoy. peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
updated test plans and raw data
for those who would like assist and run the benchmarks, I've updated the testplans. http://cvs.apache.org/~woolfel/testplans.zip you will need to use a nightly build of jmeter to use these test plans. for those who want the raw data, I've uploaded it. the file is 28mb zipped up, so it's not small. http://cvs.apache.org/~woolfel/raw_data.zip peter lin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
more graphs
I've cleaned the graphs up a bit and added the results for tc5.5.4. I still have lots to finish, but hopefully people will find this useful. http://cvs.apache.org/~woolfel/tc_results.html peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: more graphs
hehe, this is all temporary until I write up a quick summary and post it in openoffice and pdf format. call me lazy :) the pages are the default junk that excel generates, sorry about that. viewing these pages on a small screen or low res might be terrible, so I apologize for that in advance. My laptop is set to 1400 x 1050, so anything lower than that may be chopped on the side. peter On Thu, 20 Jan 2005 12:25:01 -0600, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Peter Lin [mailto:[EMAIL PROTECTED] Subject: more graphs I've cleaned the graphs up a bit and added the results for tc5.5.4. I still have lots to finish, but hopefully people will find this useful. Definitely, and thanks again for all the work. One small suggestion for the web page layout: since the data has PNG on the left and HTML on the right, it might be easier to follow if the graphs were also oriented that way. You'd have all the PNG information on one side and all the HTML on the other. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Some charts of benchmark results
Here are some charts for the benchmark results I posted a few days back. It's taking longer than I expected to create the charts. http://cvs.apache.org/~woolfel/tc_results.html enjoy. peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: latest set of Benchmark results
quick explanation of errors for 40K png test. The errors were the result of OS and not Tomcat. For some odd reason, after a couple of hours of benchmarks, the OS stopped accepting connections. I will re-run that one test later for my final write up. I've posted updated testplans including 4 with gzip header. http://cvs.apache.org/~woolfel/testplans.zip peter lin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
latest set of Benchmark results
Here is the latest set of benchmark results. I discovered an error in my test plan for 40K PNG, so the results for that one was off. All of the other results should be accurate. I re-ran the tests. Server: AMD 2ghz 1Gb RAM Redhat FedoraCore1 Client: Gateway laptop 450 1.4ghz centrino Windows XP pro jdk1.4.2 jmeter nightly build 16 port Switch Linksys 10/100 CAT5 cables All threads ran for 1000 iterations. thread scenario: 5, 10, 15, 20, 25, 30 image/html size: 1, 10, 20, 40, 80, 160 The test includes 5.0.19 (aka 5.0), 5.5.4, apache 2.0.50, apache 1.3.3. I hope people find it interesting and useful. It will take me a week or two to write up the results and generate the graphs. peter lin Tomcat 5.0.19 - jdk1.4.2 PNG 1K --- protocol | samples | average | median | 90% line | min | max | error% | throughput | Kb/sec --- HTTP Request50005.1556 0 10 0 681 0.00% 433.0/sec 446.54 HTTP Request1 6.5027 0 10 0 17020.00% 813.1/sec 838.55 HTTP Request15000 4.83573 0 10 0 150 0.00% 1333.8/sec 1375.49 HTTP Request2 5.0478 0 10 0 20030.00% 1236.6/sec 1275.19 HTTP Request25000 11.1284 10 30 0 260 0.00% 1258.9/sec 1298.28 HTTP Request3 21.2057 20 30 0 100 0.00% 1221.2/sec 1259.41 5k HTTP Request50003.3992 0 10 0 270 0.00% 894.8/sec 4552.51 HTTP Request1 5.5172 0 10 0 421 0.00% 973.2/sec 4951.72 HTTP Request15000 5.47953 0 20 0 201 0.00% 891.0/sec 4533.32 HTTP Request2 8.15755 0 20 0 291 0.00% 929.8/sec 4730.50 HTTP Request25000 12.5837 10 30 0 190 0.00% 921.9/sec 4690.34 HTTP Request3 11.5905 0 40 0 15220.00% 822.5/sec 4184.92 10k HTTP Request50004.4988 0 10 0 15730.00% 749.6/sec 7538.71 HTTP Request1 8.2505 10 20 0 230 0.00% 766.3/sec 7706.83 HTTP Request15000 6.98413 0 20 0 862 0.00% 727.4/sec 7315.69 HTTP Request2 12.345 10 30 0 300 0.00% 710.7/sec 7147.32 HTTP Request25000 18.6458 11 40 0 430 0.00% 696.7/sec 7006.74 HTTP Request3 33.4359 40 60 0 300 0.00% 680.7/sec 6845.44 20k HTTP Request500010.8294 0 10 0 30840.00% 259.0/sec 5231.30 HTTP Request1 14.9086 10 30 0 13720.00% 418.1/sec 8447.07 HTTP Request15000 22.2814 20 40 0 471 0.00% 490.5/sec 9907.72 HTTP Request2 37.3174 40 50 0 440 0.00% 491.2/sec 9922.48 HTTP Request25000 37.4917 40 70 0 15520.00% 448.0/sec 9050.54 HTTP Request3 43.7394 50 80 0 23930.00% 452.8/sec 9146.87 40k HTTP Request500016.1594 11 20 0 270 0.00% 270.2/sec 10825.45 HTTP Request1 32.0691 30 40 0 281 0.00% 283.8/sec 11370.09 HTTP Request15000 49.0089 50 60 0 231 0.00% 285.1/sec 11425.53 HTTP Request2 62.9201 60 80 0 461 0.00% 284.7/sec 11405.85 HTTP Request25000 76.398 80 100 0 721 0.00% 279.6/sec 11204.07 HTTP Request3 100.121 100 140 0 831 0.00% 272.7/sec 10927.21 80k HTTP Request500033.5142 30 40 0 310 0.00% 141.2/sec 11349.39 HTTP Request1 67.5162 70 80 0 280 0.00% 143.0/sec 11495.76 HTTP Request15000 103.413 100 111 0 811 0.00% 140.1/sec 11261.33 HTTP Request2 141.583 130 150 0 942 0.00% 137.9/sec 11090.00 HTTP Request25000 178.314 170 191 0 11820.00% 136.2/sec 10951.84 HTTP Request3 215.295 191 270 0 13120.00% 135.5/sec 10897.99 160k HTTP Request500067.4416 70 71 10 200 0.00% 71.9/sec11509.28 HTTP Request1 137.940 131 141 10 901 0.00% 71.0/sec11367.65 HTTP Request15000 211.484 200 221 10 10820.00% 69.6/sec11131.86 HTTP Request2 287.701 261 330
more benchmark results
Per Remy's request, I ran some more tests last night with larger number of threads. the configuration of the test plan is as follows 1K png: 10, 50, 100, 150 threads 10K png: 10, 50, 100, 150 threads each thread as was to 1000 iterations. ramp up times: 1, 5, 10, 20 seconds Server: Redhat fedora Core1 AMD 2ghz 1Gb RAM tomcat 5.0.19 Sun jdk1.4.2_03 Client: gateway 450 laptop 1.4ghz centrino 1Gb RAM jmeter nightly build sun jdk1.4.2 I plan to re-run these tests with the latest 5.0.x release this weekend and per Remy's request I will also test 5.5.4 with jdk5 for comparison. peter 1K --- protocol | samples | average | median | 90% line | min | max | error% | throughput | Kb/sec --- HTTP Request1 2.8969 0 10 0 571 0.00% 1678.1/sec 1730.58 HTTP Request5 6.615 0 20 0 320 0.00% 1399.3/sec 1443.07 HTTP Request10 70.106 0 100 0 26743.98% 829.9/sec 868.94 HTTP Request15 117.443 0 321 0 54283.88% 704.5/sec 737.30 10k HTTP Request1 8.2566 0 10 0 321 0.00% 848.4/sec 8531.98 HTTP Request5 37.6230 40 81 0 28940.00% 721.8/sec 7259.02 HTTP Request10 117.799 10 210 0 70504.12% 524.9/sec 5092.10 HTTP Request15 297.357 300 490 0 93431.03% 397.1/sec 3958.41 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: more benchmark results
Yup, I plan to try jdk5 with TC5.5.4 per Remy's request. once I get that out of the way, I plan to work on the enhancements to the status servlet. I took a quick look at apr-java, looks cool. No comments yet, but I will post them to tomcat-dev when I do :) peter On Fri, 14 Jan 2005 14:30:38 +0100, Mladen Turk [EMAIL PROTECTED] wrote: Peter Lin wrote: Per Remy's request, I ran some more tests last night with larger number of threads. the configuration of the test plan is as follows What would be nice (since you have infrastructure set up) is to compare the results with Apache2. Last time i did it there was only 10% difference when serving static content. Also can you try the Java5? Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: more benchmark results
any tomcat user out there have Redhat FC3 installed and want to help run some tests? I will post the jmeter test plans this weekend. it would make remy really happy :) peter And no FC 3 ? ;) I think it would run fine on your computer, and it's a higher quality distribution overall (it doesn't have the stupid NPTL backport that FC 1 has). Or you could try Ubuntu (I plan to switch to that distro when they release hoary). Anyway, I'd be interested if you tried stressing a little the thread pool I added in 5.5 (strategy=ms threadPriority=7 on the Connector element) to see if it gives a difference in the error rate (and also if it's not completely broken). You may want to increase maxThreads as well for your tests (it's 150 by default, which is dangerously close of the concurrency used by your client) -- x Rémy Maucherat Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: more benchmark results
yeah, I've d/l 2.0.52 and plan on running a test. Graham O'Regan is also going to run the tests again Squid for comparison too. If I have time, I also plan to compare httpd 1.3. All I need now is some speed so I can go without sleep :) peter On Fri, 14 Jan 2005 14:40:16 +0100, Mladen Turk [EMAIL PROTECTED] wrote: Peter Lin wrote: Yup, I plan to try jdk5 with TC5.5.4 per Remy's request. Cool, but can you compare the results with Apache2.0.52 when serving the same static content files on the same hardware? That would be very interesting thought. Even more then bare statistical data you've presented. Regards, Mladen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: more benchmark results
what a concept Schnapps over speed. Wonder what would happen if someone made a redbull + Schnapps + speed cocktail 8-) that wouldn't kill you, really. I'll stop the jokes there. peter On Fri, 14 Jan 2005 14:59:57 +0100, Mladen Turk [EMAIL PROTECTED] wrote: Peter Lin wrote: If I have time, I also plan to compare httpd 1.3. All I need now is some speed so I can go without sleep :) In my country we are using the thing called 'Rakija' for that. It has 45% of alcohol, but has some strange side-effects. Someone are even stating that it can make you drunk !? So, I suggest Rakija (or as my German friends are wrongly calling it Schnapps) over speed :). Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: more benchmark results
Sure, it can't hurt to try it out. Even if the specs are different, the data point is a good baseline comparison. I'll post the test plans shortly to my apache directory. peter On Fri, 14 Jan 2005 09:28:52 -0500, Sessoms, Mack [EMAIL PROTECTED] wrote: i've got 5.5.4 w/jvm 1.5.0-b64 on fc3 (2.6.9-1.667,i386). unfortunately, the hardware is a desktop unit 760 MB ram, ide drive, 2.6 P4 (512 cache). let me know if i should give it a try. Peter Lin wrote: any tomcat user out there have Redhat FC3 installed and want to help run some tests? I will post the jmeter test plans this weekend. it would make remy really happy :) peter And no FC 3 ? ;) I think it would run fine on your computer, and it's a higher quality distribution overall (it doesn't have the stupid NPTL backport that FC 1 has). Or you could try Ubuntu (I plan to switch to that distro when they release hoary). Anyway, I'd be interested if you tried stressing a little the thread pool I added in 5.5 (strategy=ms threadPriority=7 on the Connector element) to see if it gives a difference in the error rate (and also if it's not completely broken). You may want to increase maxThreads as well for your tests (it's 150 by default, which is dangerously close of the concurrency used by your client) -- x Rémy Maucherat Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: more benchmark results
for those who want to look at the test plans or assist, I've posted the jmeter test plans http://cvs.apache.org/~woolfel/testplans.zip peter On Fri, 14 Jan 2005 09:28:52 -0500, Sessoms, Mack [EMAIL PROTECTED] wrote: i've got 5.5.4 w/jvm 1.5.0-b64 on fc3 (2.6.9-1.667,i386). unfortunately, the hardware is a desktop unit 760 MB ram, ide drive, 2.6 P4 (512 cache). let me know if i should give it a try. Peter Lin wrote: any tomcat user out there have Redhat FC3 installed and want to help run some tests? I will post the jmeter test plans this weekend. it would make remy really happy :) peter And no FC 3 ? ;) I think it would run fine on your computer, and it's a higher quality distribution overall (it doesn't have the stupid NPTL backport that FC 1 has). Or you could try Ubuntu (I plan to switch to that distro when they release hoary). Anyway, I'd be interested if you tried stressing a little the thread pool I added in 5.5 (strategy=ms threadPriority=7 on the Connector element) to see if it gives a difference in the error rate (and also if it's not completely broken). You may want to increase maxThreads as well for your tests (it's 150 by default, which is dangerously close of the concurrency used by your client) -- x Rémy Maucherat Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
some TC5 benchmark results for static file
I've started a series of benchmarks to measure tomcat5 performance for static files and compare it to apache2. Here are the results I have so far. I thought others might find it interesting. Server: Redhat Fedora Core 1 AMD 2hgz 1Gb ram jdk1.4.2 TC5.0.x ( have to double check the release number) client: gateway 450 laptop 1.4ghz centrino 1Gb ram Jmeter jdk1.4.2 keepalive is true peter PNG 1K --- protocol | samples | average | median | 90% line | min | max | error% | throughput | Kb/sec --- HTTP Request50002.4158 0 10 0 231 0.00% 1296.7/sec 1337.20 HTTP Request1 3.2866 0 10 0 490 0.00% 1384.8/sec 1428.13 HTTP Request15000 3.56353 0 10 0 36260.00% 1335.0/sec 1376.71 HTTP Request2 6.3406 0 20 0 120 0.00% 1352.1/sec 1394.33 HTTP Request25000 8.27288 0 20 0 281 0.00% 1309.1/sec 1350.02 HTTP Request3 4.6102 0 20 0 972 0.00% 1259.2/sec 1298.53 5k HTTP Request50002.9246 0 10 0 330 0.00% 1044.5/sec 5314.28 HTTP Request1 4.4717 0 10 0 11620.00% 1002.6/sec 5101.15 HTTP Request15000 6.7102 0 20 0 23730.00% 968.9/sec 4929.49 HTTP Request2 4.83515 0 10 0 15030.00% 950.1/sec 4834.10 HTTP Request25000 10.3578 0 30 0 19220.00% 933.6/sec 4749.89 HTTP Request3 5.86573 0 20 0 441 0.00% 939.4/sec 4779.46 10k HTTP Request50004.1644 0 10 0 742 0.00% 726.7/sec 7308.61 HTTP Request1 8.8132 10 20 0 181 0.00% 763.5/sec 7678.00 HTTP Request15000 7.7906 0 20 0 381 0.00% 718.0/sec 7221.14 HTTP Request2 10.8593 10 30 0 420 0.00% 705.2/sec 7091.88 HTTP Request25000 32.2276 30 50 0 110 0.00% 704.0/sec 7079.95 HTTP Request3 19.3326 10 50 0 16530.00% 686.8/sec 6906.56 20k HTTP Request50007.4202 0 10 0 400 0.00% 491.9/sec 9936.63 HTTP Request1 14.1984 10 20 0 982 0.00% 490.9/sec 9917.12 HTTP Request15000 17.698 10 40 0 531 0.00% 472.4/sec 9542.36 HTTP Request2 22.9608 20 50 0 471 0.00% 465.1/sec 9395.46 HTTP Request25000 32.8229 40 61 0 14320.00% 461.3/sec 9318.23 HTTP Request3 50.4059 50 90 0 701 0.00% 429.6/sec 8678.60 40k HTTP Request50007.9292 0 10 0 11310.00% 409.3/sec 8267.65 HTTP Request1 13.1405 10 21 0 10710.00% 493.6/sec 9971.46 HTTP Request15000 18.5959 10 30 0 19230.00% 517.0/sec 10444.56 HTTP Request2 32.9344 30 50 0 250 0.00% 510.8/sec 10318.30 HTTP Request25000 38.1564 40 60 0 13620.00% 493.4/sec 9966.44 HTTP Request3 52.4783 50 90 0 10010.00% 463.5/sec 9363.52 HTML 1K --- protocol | samples | average | median | 90% line | min | max | error% | throughput | Kb/sec --- HTTP Request50001.8508 0 10 0 170 0.00% 1545.6/sec 1714.64 HTTP Request1 3.0936 0 10 0 321 0.00% 1686.6/sec 1871.10 HTTP Request15000 3.3003 0 10 0 14220.00% 1638.8/sec 1818.05 HTTP Request2 2.5934 0 10 0 110 0.00% 1610.6/sec 1786.72 HTTP Request25000 3.99248 0 10 0 140 0.00% 1537.1/sec 1705.26 HTTP Request3 4.12513 0 10 0 831 0.00% 1473.5/sec 1634.72 5k HTTP Request50003.1068 0 10 0 390 0.00% 1078.3/sec 5713.64 HTTP Request1 5.1087 0 10 0 271 0.00% 1154.5/sec 6117.33 HTTP Request15000 5.3688 0 10 0 15720.00% 1096.6/sec 5810.54 HTTP Request2 4.46625 0 10 0 15020.00% 1065.1/sec 5643.96 HTTP Request25000
Re: some TC5 benchmark results for static file
Good question. I haven't run the apache tests yet. I forgot that I don't have apache2 installed on my linux box, so this weekend I plan to install and run the tests. once all the tests are done, I plan to write up a quick article, generate some charts and zip up all the files, including the jmeter log files. peter On Thu, 13 Jan 2005 10:45:36 -0500, Derrick Koes [EMAIL PROTECTED] wrote: So, are the results for tomcat? Looks like you did some requests for png image files and HTML. Where are the numbers for apache so we can compare? Thanks, Derrick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat monitoring scripts
JMeter has a monitor for tomcat 5.0.19 and newer. It doesn't work with tomcat4 or older. in terms of restarting, you're probably going to have to write a shell script to do that. Typically, on unix a cron job is used. peter On Wed, 12 Jan 2005 15:12:15 +, Edd Dawson [EMAIL PROTECTED] wrote: Hi Does anyone know of the location of any scripts (for Linux) that will monitor tomcat every x minutes and if it finds it not running will restart it automatically? Any suggestions would be appreciated. thanks Edd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat monitoring scripts
most people use Perl or shell scripts to do that. There's plenty of scripts on the net for doing that by the process id. sorry, I don't have any links handy. google is your friend. peter On Wed, 12 Jan 2005 15:20:53 +, Edd Dawson [EMAIL PROTECTED] wrote: I'm looking more for something that sits on the actual servers and probes at set intervals and takes remedial action if necessary.. i just wondered if anyone had documented doing such a thing before. Peter Lin wrote: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat monitoring scripts
how about these http://www.kernel.org/software/mon/ http://www.eveandersson.com/arsdigita/free-tools/keepalive.html hope one of them helps. peter On Wed, 12 Jan 2005 15:47:37 +, Edd Dawson [EMAIL PROTECTED] wrote: My googling skills are letting me down today.. i haven't managed to find any examples online (and i've been trying most of the day!) Peter Lin wrote: most people use Perl or shell scripts to do that. There's plenty of scripts on the net for doing that by the process id. sorry, I don't have any links handy. google is your friend. peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Max of two connections per client?
by the way, the 2 connection limit is actually hardcoded in the http socket and not in IE. AFAIK, you can't turn it off or change it. You'd have to write your own browser to get around that. peter On Tue, 11 Jan 2005 18:48:20 -0500, Hunt, Joseph (OVBU- Ft.Collins) [EMAIL PROTECTED] wrote: Good call, that looks like my problem. The HTTP 1.1 RFC reads : Clients that use persistent connections SHOULD limit the number of simultaneous connections that they maintain to a given server. A single-user client SHOULD maintain AT MOST 2 connections with any server or proxy. I also found anecdotal references about HTTP 1.0 implementations adding connection limits as well to avoid killing HTTP servers. That is not at all what I wanted to hear, but thanks for the quick and very helpful response. Thanks, Joe Hunt -Original Message- From: Peter Johnson [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 11, 2005 4:19 PM To: Tomcat Users List Subject: Re: Max of two connections per client? Joe, What I am saying is that from memory I believe that it is a specification of the HTTP protocol that no more than two concurrent connections are opened to any one host. The purpose is to limit the potential load on the server and it's network socket pool. I.e. Given a server has about 65000 free sockets at it's disposal and someone poorly designed a page which had 100 images and the server came under the Slashdot effect of 650 concurrent users then the server would exhaust all it's available sockets if each browser was allowed to make a connection per image. (Yes: these figures are rough as no CSS or HTML content requests have been taken into account and a page with 100 images is quite unlikely) However, I could be going down completely the wrong path here. You might want to do a little research on it yourself. PJ Hunt, Joseph (OVBU- Ft.Collins) wrote: PJ, I'm not sure what you are suggesting, but I did try turning off HTTP 1.1 in IE and still get the same behavior. Thanks, Joe Hunt -Original Message- From: Peter Johnson [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 11, 2005 2:48 PM To: Tomcat Users List Subject: Re: Max of two connections per client? I think that is HTTP/1.1 for you ... but the details are a little foggy PJ Hunt, Joseph (OVBU- Ft.Collins) wrote: Ladies and Gentlemen, I have created an html document that contains several Iframes that all refer to the same JSP page. The JSP simply waits(Thread.sleep()) 5 seconds and then returns some text. When I open the html document in either IE or Mozilla after 5 seconds I see the first two iframes load, then 5 seconds later, I see the next two, etc. I am using the default config params on tomcat 5.0.28 on Win XP Pro. If I understand them correctly, I should have between 25 (minSpareThreads) and 150(maxSpareTreads) threads available. Why do the requests wait for the previous to complete as if there are only two threads handling the requests? In my research, I have noticed that connecting from other machines, I get two concurrent requests per machine. For example, if I open the html page on three machines simultaneously, it appears that I have 6 threads in tomcat working. But I am always restricted to two concurrent requests per client. I have also noticed that if I use both IE and Mozilla on the same machine, I am able to get at most 4 consecutive requests. Again 2 requests from each browser. If I open 3 IE browsers on the same machine I see the updates happen two at a time across all the browsers. Is there some piece of configuration that I am missing? Where is this two concurrent requests coming from? BTW it does not appear to be the browser that is dispatching only two requests. I can add any number of additional Iframes pointing to non-tomcat sites and they seem to begin loading immediately. Thanks, Joe Hunt HP OpenView (970)898-6402 --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Memory leak
how are you monitoring tomcat? peter On Wed, 12 Jan 2005 14:59:39 +1100, Rolf Zelder [EMAIL PROTECTED] wrote: Hi I have got a simple web application containing a html page with a link to a jsp page, which prints the memory status to the console(Runtime.getRuntime().totalMemory()) . Now I let about 50 concurrent user browsing to those pages and I noticed that the memory usage is constantly going up. The Total Memory Amount as well as the memory usage stated in the TaskManager. I don't want to believe that this little web app is leaking memory. Therefore I must do something wrong how I monitor the memory usage. Any help is very much appreciated. I'm using Windows2k Server + Tomcat 5.5 and sdk 1.4.2.06 Strangers are friends, which haven't met yet ! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Monitoring Performance Tomcat 5.0.28
you could use jmeter's tomcat5 monitor. there's a coupl of commercial tools out there that can monitor your production servers. peter On Thu, 30 Dec 2004 23:27:05 -0800, Hari Mailvaganam [EMAIL PROTECTED] wrote: Hi: What would be the best way to monitor the performance of Tomcat - while in production? Apache HTTP server has an option that can view threads etc of a production web server. Does Tomcat have anything equivalent? On a separate note are there any kind of benchmarks on performance of Tomcat available online - i.e throughput, response times? It can be a challenge finding benchmarks that fits ones criterias - as there are a huge number of variables to consider. I was hoping to find one which had a study the base parameters. Have a Happy and Peaceful 2005. regards, Hari Mailvaganam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Monitoring Performance Tomcat 5.0.28
The jakarta JMeter monitor sends requests to Tomcat's status servlet and uses the stats there to generate a performance graph. You can monitor multiple servers with jmeter. If you use a third party tool, it will have lots of other features, but it most likely will not be able to utilize the stats the status servlet displays. the tomcat monitor I wrote specifically takes advantage of the status servlet to show performance. just go to jmeter's page and you'll see. peter On Fri, 31 Dec 2004 15:32:36 +0200, Jukka Uusisalo [EMAIL PROTECTED] wrote: Hari Mailvaganam wrote: Hi: What would be the best way to monitor the performance of Tomcat - while in production? I have used /manager application and JMeter. Not in production but during performace tests and development servers. I am not sure is this best way but for my purpose it is pretty ok. I do not have checked but it would nice to get this kind of information via JMX and MBeans. Is this possible? - Jukka - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Performance with/without loadbalancing
perhaps black magic? what I would do is to try a few things. 1. increase the ramp up time and see if that affects it. It could be the load balancer is helping tomcat handle the load 2. build the latest JMeter and use the distribution graph I wrote to look at the requests. the new graph will show the 50% and 90% line. If there's any pattern in the response times, you'll see it. What you should see is clumping of the data. 3. increase the number of threads to match exactly the number of threads you have in JMeter. I hope that helps peter Tomcat workers request duration --- 1 (no load balancing)35 seconds 24 seconds 32,2 seconds - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Requirements?
which another good reason to put the database on separate box. by isolating tomcat and mysql, you can run tests on each. then you can test the setup together and see what you get. that's how I generally test my applications. peter On Tue, 30 Nov 2004 07:05:59 -0500, Tim Funk [EMAIL PROTECTED] wrote: When Mysql is at 100%, you go to the Mysql list and ask for help.;) A database at 100% could be any number of reasons: 1) A bad join 2) An inefficient query 3) Not enough memory on the server 4) Not enough memory for Mysql 5) Lack of indexes or poor index choices 6) ... Get a second machine. Performance tuning will be much much easier todo. -Tim Chris Cherrett wrote: Thank you for the suggestions. I had the client do just that this afternoon. Tomcat averaged 15% CPU Mysql spiked the CPU usage to 100% when hit with long queries. Would this be an indication of the need for RAM, or the need for a faster CPU? They are running 360MB of RAM. P3 450 Thanks On November 30, 2004 03:20 am, Peter Crowther wrote: From: Chris Cherrett [mailto:[EMAIL PROTECTED] I have a client who is claiming that my software is slowing down. I cannot determine why this would be. Profile it - what's slow? Start Admin ToolsPerformance, add: Processor%CPU time MemoryPages/sec Physical DiskAvg Disk Queue Length Are you seeing high CPU use? If so, a faster CPU is appropriate. Are you seeing high pages/sec and high disk I/O (queue length regularly above 3 for that config would be unpleasant)? If so, add RAM. Are you seeing high disk I/O without high pages/sec? If so, something's hammering your disk but your memory's OK... are you using a database? Are you seeing none of these? If so, check things like Windows authentication - you don't want to be waiting for auth responses. I know, I know, this is all just general Windows troubleshooting. But we can't give advice on improving performance until we have more information on where the bottleneck is. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Requirements?
that would depend on what kind of application it is. without more info, like does it hit a database, is the database hosted on the same system or does the application get remote data it's going to be hard for others to provide good recommendations. peter On Mon, 29 Nov 2004 12:43:07 -0700, Chris Cherrett [EMAIL PROTECTED] wrote: I have a client who is claiming that my software is slowing down. I cannot determine why this would be. He is running the following: P3 - 450 with 360MB of RAM with 2 IDE - 7200 RPM drives mirrored Raid 1 with Win2k I have found that any client running a faster system works great. Do you have any suggestions as to how to speed things up on this hardware configuration? example increase memory allocated to Tomcat. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Requirements?
as Yoav recommended, tomcat should be on it's own server. I would put mysql on another system. that should fix things. most likely the slowness is the result of database performance. peter On Mon, 29 Nov 2004 12:54:18 -0700, Chris Cherrett [EMAIL PROTECTED] wrote: The application is highly database driven. In this case it is running a mysql database on the same machine. What would be the recommened hardware configuration? On a P4 2.4 with 1GB of RAM Tomcat is very happy! Thanks On Monday 29 November 2004 12:53 pm, Peter Lin wrote: that would depend on what kind of application it is. without more info, like does it hit a database, is the database hosted on the same system or does the application get remote data it's going to be hard for others to provide good recommendations. peter On Mon, 29 Nov 2004 12:43:07 -0700, Chris Cherrett [EMAIL PROTECTED] wrote: I have a client who is claiming that my software is slowing down. I cannot determine why this would be. He is running the following: P3 - 450 with 360MB of RAM with 2 IDE - 7200 RPM drives mirrored Raid 1 with Win2k I have found that any client running a faster system works great. Do you have any suggestions as to how to speed things up on this hardware configuration? example increase memory allocated to Tomcat. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Requirements?
unless there's a really good reason, it's generally better to have the database on one system and tomcat on another. once the concurrent query load increases, tomcat will be fighting mysql for cpu and memory resources. peter On Mon, 29 Nov 2004 13:03:36 -0700, Chris Cherrett [EMAIL PROTECTED] wrote: Would this problem be solved by a hardware upgrade? On Monday 29 November 2004 01:03 pm, Peter Lin wrote: as Yoav recommended, tomcat should be on it's own server. I would put mysql on another system. that should fix things. most likely the slowness is the result of database performance. peter On Mon, 29 Nov 2004 12:54:18 -0700, Chris Cherrett [EMAIL PROTECTED] wrote: The application is highly database driven. In this case it is running a mysql database on the same machine. What would be the recommened hardware configuration? On a P4 2.4 with 1GB of RAM Tomcat is very happy! Thanks On Monday 29 November 2004 12:53 pm, Peter Lin wrote: that would depend on what kind of application it is. without more info, like does it hit a database, is the database hosted on the same system or does the application get remote data it's going to be hard for others to provide good recommendations. peter On Mon, 29 Nov 2004 12:43:07 -0700, Chris Cherrett [EMAIL PROTECTED] wrote: I have a client who is claiming that my software is slowing down. I cannot determine why this would be. He is running the following: P3 - 450 with 360MB of RAM with 2 IDE - 7200 RPM drives mirrored Raid 1 with Win2k I have found that any client running a faster system works great. Do you have any suggestions as to how to speed things up on this hardware configuration? example increase memory allocated to Tomcat. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Chris Cherrett Tracking Solutions International 1-877-TSIWARE www.tsiware.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: high traffic Tomcat sites out there?
250ms response time is rock solid. Getting the total response time lower than 250ms is pretty darn tough. based on your info, that means each tomcat is getting on average 15-16 concurrent requests. one way to improve the response time would be to use smart caching and avoid the cost of making a real insert/update to the database. that will mainly depend on the requirements of your application. 35 pageviews/second is good amount of traffic, but it's not the crazy traffic that yahoo or google support :) then again yahoo and google both have tens of thousands of servers. peter On Mon, 22 Nov 2004 14:36:47 +0100 (CET), Ronald Klop [EMAIL PROTECTED] wrote: On Mon Nov 22 11:55:08 CET 2004 LAM Kwun Wa Joseph [EMAIL PROTECTED] wrote: For my Tomcat cluster I'm looking for an upper limit on the estimation of how much traffic it may face. Say, would thousands of HTTP req/s be too 'astronomical' for a 4-node Dual P4 Xeon cluster to achieve? (I'm talking about dynamic pages such as stock quotes and news) Does anyone know of any high traffic JSP/servlet sites(running Tomcat or similar servlet container)? I'm mostly interested to know what's the typical magnitude of their HTTP throughput (e.g. hundreds or thousands of HTTP/s) and what kinds of apps are they running. Joseph Lam Hello, I am also interested in some realworld figures. Our configuration is this. 2-node cluster of 2-cpu P4-2.8Ghz machines. The web-application is a database application (with a lot of updates and non-index queries) for logged-in users. We have about 1500 logged in persons doing 70 req/s. Half of the requests go to Tomcat, the other half to Apache for static content. The average (Tomcat) req takes about 250 ms in our system. But I have no idea if this is an high/average/low load compared to other systems. Btw, we are using Tomcat 5.0.28, JDK 1.4.2, Debian Sarge (linux 2.6.x), Apache 1.3.x/mod_jk 1.2.6. Ronald. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: high traffic Tomcat sites out there?
look at the poweredby list http://wiki.apache.org/jakarta-tomcat/PoweredBy the biggest factor in how much bandwidth your 4 node cluster is primarily going to be network bandwidth and database performance. Normally, since buckle due to database crashing. I know of a directory site that gets millions of pageviews per day. Just look at the top 3 and you'll find it. peter On Mon, 22 Nov 2004 18:55:08 +0800 (HKT), LAM Kwun Wa Joseph [EMAIL PROTECTED] wrote: For my Tomcat cluster I'm looking for an upper limit on the estimation of how much traffic it may face. Say, would thousands of HTTP req/s be too 'astronomical' for a 4-node Dual P4 Xeon cluster to achieve? (I'm talking about dynamic pages such as stock quotes and news) Does anyone know of any high traffic JSP/servlet sites(running Tomcat or similar servlet container)? I'm mostly interested to know what's the typical magnitude of their HTTP throughput (e.g. hundreds or thousands of HTTP/s) and what kinds of apps are they running. Joseph Lam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SSL and form-based login
the same rule still applies. that's what's just the reality of using SSL and insuring security. A browser that is ssl compliant actually should default to https. only way around that is to use a non-ssl compliant browser. peter On Sat, 20 Nov 2004 16:59:31 -0800 (PST), footh [EMAIL PROTECTED] wrote: Through lots of research, I thought I had finally figured out how to set up SSL with form-based login. However, I still have a couple of outstanding issues. SSL seems to be working fine, however, I don't believe the login page is using SSL. The reason being is, when I try to hit any other page on the site with SSL, my browser invokes the certificate dialog box. However, when the form-based login forces the redirect to my custom login page, I don't get the certificate dialog box. Here's a snippet the relevant parts of web.xml (sorry if the formatting is bad): security-constraint web-resource-collection web-resource-nameLogin pages/web-resource-name url-pattern/login/*/url-pattern /web-resource-collection user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint /security-constraint login-config auth-methodFORM/auth-method realm-nameForm-Based uthentication/realm-name form-login-config form-login-page/login/login.jsp/form-login-page form-error-page/login/logininvalid.jsp/form-error-page /form-login-config /login-config Another issue I have is if I have a protected page that is using SSL, all links in the page default to the SSL protocol even though those pages should just be standard http. Might anyone know how to workaround this? I've tried scouring the mailing lists on this issue and I've actually found posts saying it is a security risk to switch back to http. Ex: http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg61925.html However, all these types of posts seem to be several years old. Is this still a bad idea...to switch from https to http? Thanks JF __ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5.4 Stability
which tool are you using to stress test? perhaps try a different tool to double check? when I test, I like to use apache ab and jmeter to validate the results. I'm a bit paranoid when it comes to telling management, the server will handle X traffic :) peter On Thu, 18 Nov 2004 11:18:07 -0500, Vy Ho [EMAIL PROTECTED] wrote: I didn't use the default configuration. The app. ran fine with 200 client threads. When increased to 300 client threads, it went out of memory and I stopped it. So, after that, I increased the maxthread to 400, and give the server 512 M for max amount of memory. The app. then ran fine. However, go to work, and restart the computer at work. I run the same thing again, 200 client threads choke the server. It did not go down, but client application get connection refused. If restart the client, it would be able to connect again. So, I am not sure what's the problem. Something to do with network, I am not sure. This is not a slow machine either. 2.53 Ghz, Pentium 4. I also use its real IP versus localhost, but same problem. The set up of the application is identical. I am talking about copy and unzip the things to make sure exactly same stuff get run. Both run version of JDK1.5. I have to find out what's going on now. It's not very clear to me: did you use the default configuration or not ? If you didn't, what are the results with the default configuration ? (I'm trying to get an overview of what you did, and get comparison data to be able to make configuration recommendations in the future) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5.4 Stability
you might want to give jmeter a shot and see if it backs up your results. couldn't hurt :) peter On Thu, 18 Nov 2004 11:36:20 -0500, Vy Ho [EMAIL PROTECTED] wrote: This an a web service using Axis as the soap library. I developed my own stress tool for this. This is the same tool that get used at both computer. This is Windows XP. I'll see if SP2 will do any difference. The computer at home as SP2 on it. Peter Lin wrote: which tool are you using to stress test? perhaps try a different tool to double check? when I test, I like to use apache ab and jmeter to validate the results. I'm a bit paranoid when it comes to telling management, the server will handle X traffic :) peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5.4 Stability
that's interesting. makes me wonder what changes in SP2 cause the improvement. peter On Thu, 18 Nov 2004 14:30:16 -0500, Vy Ho [EMAIL PROTECTED] wrote: With SP2 of Windows XP, the computer previously can't handle 50 threads can handle 200 threads now. More than that, I got connection refused error. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5.4 Stability
I would second Remy's sentiment about XML and concurrent processes. I've performed benchmarks with Java and C# on a P4 2.4ghz machine. with 2-4K of XML 10-15 concurrent processes with consume roughly 60-70% of the CPU. With 30, you're going to hit 90-100% of the CPU. At that point, more concurrent requests to Tomcat or any webserver for that matter will be starving for CPU cycles. peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5.4 Stability
interesting information. You're probably already aware of this, but extrapolating 200 concurrent connection/requests over a 24hr period would mean in excess of 20 million page views or webservice requests per day. that would be a ton of traffic. over the network, you can expect considerably lower throughput unless you're using gigabit ethernet or multiple ethernet ports with multiple routers. peter On Wed, 17 Nov 2004 23:20:20 -0500, V D [EMAIL PROTECTED] wrote: I just test this at home. I change all settings to use Tomcat 5.5.4, Axis 1.2. The result is a big surprise. Right now, I hit the server with 2 clients, each has 150 connections. There is no error so far. This machine is faster than the one at work, and also has double the amount of RAM. If things going this way, it'll be great. I also notice that there is no networking load (it all go within the machine). I wonder how well it does if it go across the network After running with 200 connections, I got out of memory error on the server. I give it max of 512M. I also increase the maxThread to 400. Without these, it could handle up to 200 concurrent connections. This is really good. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Analysing dead threads
just for clarification. Do you mean zombie threads? Threads that are not reachable, but still running. My advice would be to download a profiler and figure out the cause. peter On Mon, 15 Nov 2004 14:42:14 +0100, Steffen Heil [EMAIL PROTECTED] wrote: Hi I have a situation, where a lot of threads seem to stop working right in my servlet. From debug output, I know they entered the servlet but never leave it. My problem is that this never occurs on our development system, but only on the production system. I need to stop tomcat end even do a killall -9 java to get everything to stop. Then I restart tomcat. But I don't know what happened. I know there is a way to kill the JVM, so that I see the stack trace of kill threads. How can I do it? (Is there another way to see what those threads are waiting for?) Regards, Steffen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multi-Site Clustering? (hot failover)
the kind of setup I've seen is to handle it with a load balancing router and a cluster of servers. Using just one server doesn't feel too redundant or fault tolerant to me. In the past, we had the router direct traffic, so that if a single webserver is down, it quickly directs it to a good server. So if the setup is like this ISP dns -- load balanced router (n webservers) / | \ / | \ w1 w2 w3 if w1.mydomain.com goes down, the router should direct traffic to w2 or w3. usually, there's some script or daemon running on each box to make sure the webserver process is running. If not, it sends out an email and tries to restart it. I know this approach works, but for a single webserver in two locations, I don't know first hand. If someone is going to the trouble of having two servers in different locations, it makes sense to me to put atleast 2 servers in each place. The cost is minimal and you get much better fault tolerance. peter On Thu, 11 Nov 2004 12:56:06 -, Steve Kirk [EMAIL PROTECTED] wrote: Yes that's true and I have used that feature in the past by asking our ISP (registrar) to enter multiple A records in the primary DNS. However, the point of this thread is that Steven was asking about the situation where one of the webservers then goes down. In this case, third-party ISP DNS servers will have cached both the main and backup server entries, and will continue to do so for up to 48 hours (or maybe longer in the case of DNSs that ignore TTL). So my understanding it that in this case, browsers will potentially try to access both the sites - including the one which has failed. I am basing this statement on experience from 2-3 years ago. Maybe things have changed so that this is not a concern anymore? e.g. maybe browsers are smarter at using multiple A records from DNS, so that if one is not reachable they switch to the other, or re-query the DNS, maybe secondary DNSs re-query before TTL if all the A records for a domain name are unreachable, maybe nearly all ISPs now respect TTL? If anyone can comment on these I'd be interested, because it makes Steven's original idea feasible. -Original Message- From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED] Sent: Thursday 11 November 2004 02:03 To: Tomcat Users List Subject: Re: Multi-Site Clustering? (hot failover) if you have two TC instances running at two different IP addresses and they are both up, just put in DNS loadbalancing (ie, configure DNS to have both IP addresses in the A records) you don't need to run DNS to do this Filip - Original Message - From: Steve Kirk [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED]; 'Peter Lin' [EMAIL PROTECTED] Sent: Wednesday, November 10, 2004 7:57 PM Subject: RE: Multi-Site Clustering? (hot failover) Thanks, interesting. But I think we're talking at crossed purposes. I'm not proposing running my own DNS, and I don't have an existing installation. Just an idea of maybe deploying two indentical TC webservers at different ISPs. What I'm saying is that if I have two identical TC servers, one at ISP A and one at ISP B, and my DNS is managed by one (or even both) of them, then if my main server fails, it doesn't matter how quick or clever the DNS management of A or B is, if users connect to my site via other ISPs (C, D, etc) whose DNS servers don't respect my ISP's low TTL. I know that this used to be a problem, I'm not sure how much it is these days. -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: Wednesday 10 November 2004 23:50 To: Tomcat Users List Subject: Re: Multi-Site Clustering? (hot failover) I would check the service level agreement for DNS load balancing across multiple sites. The big guys like Level3, global crossing, mci have this stuff worked out so that when a DNS server does fail, it does get routed immediately. typically that means you actually don't handle DNS at all in your servers. the ISP handles that completely. If you were running DNS on one of your boxes, they would have a hard time meeting the SLA. The general rule is to set it up and then unplug the CAT5 cable and see how quickly the traffic gets routed to the other cluster. on a previous job, we did that and it was pretty seamless. it wasn't cheap either since we had a couple of full cabinets at two different locations. peter On Wed, 10 Nov 2004 22:52:08 -, Steve Kirk [EMAIL PROTECTED] wrote: OK that's roughly what I thought. But IME this does not switch things over fast enough to count as a hot failover. Maybe I'm not aware of a premium service that's available, but my experience has been that DNS updates don't propagate fast enough for this. There are often customers that cannot
Re: Multi-Site Clustering? (hot failover)
normally ISP will offer multi-site load balancing using DNS. In terms of failover, it generally handled the same way. If an earthquake swallows the first location, the second site's DNS will pick and route the traffic to the second cluster. I would talk to your service provider. the smaller shops don't offer it, so you'll have to talk to a bigger ISP. peter On Wed, 10 Nov 2004 12:52:17 -0600, Filip Hanik - Dev [EMAIL PROTECTED] wrote: Even a datacenter by itself plugs in to more than one backbone (network provider) So a datacenter itself has more than one connection into it. So what I am saying, if you want to fail over between data centers, that is not something you configure in tomcat, or in your own network, that is something you probably arrange with the data centers or the network providers, cause if your data center gets shattered in an earth quake, all the routers in there will be dead anyway. Filip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multi-Site Clustering? (hot failover)
I would check the service level agreement for DNS load balancing across multiple sites. The big guys like Level3, global crossing, mci have this stuff worked out so that when a DNS server does fail, it does get routed immediately. typically that means you actually don't handle DNS at all in your servers. the ISP handles that completely. If you were running DNS on one of your boxes, they would have a hard time meeting the SLA. The general rule is to set it up and then unplug the CAT5 cable and see how quickly the traffic gets routed to the other cluster. on a previous job, we did that and it was pretty seamless. it wasn't cheap either since we had a couple of full cabinets at two different locations. peter On Wed, 10 Nov 2004 22:52:08 -, Steve Kirk [EMAIL PROTECTED] wrote: OK that's roughly what I thought. But IME this does not switch things over fast enough to count as a hot failover. Maybe I'm not aware of a premium service that's available, but my experience has been that DNS updates don't propagate fast enough for this. There are often customers that cannot reach the site after a DNS change for 24-48 hours, or even more in some cases. IME the problem seems to be that some secondary DNSs (e.g. those provided by some of your end users' ISPs) don't seem to respect TTL in the DNS records, and so they keep stale records without checking for updates, even if you specify a short TTL. This is a problem at the best of times, let alone when your main site has failed. It seems to me that occasionally, some DNSs also seem to miss changes in SOA, which can be disastrous if you move your DNS to a new ISP. As far as I can see, there is no way to get around these glitches because the secondary DNSs are under the control of an ISP that you do not have a relationship with? Or are the problems I'm describing a thing of the past? -Original Message- From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED] Sent: Wednesday 10 November 2004 19:14 To: Tomcat Users List; Peter Lin Subject: Re: Multi-Site Clustering? (hot failover) which might also give you the idea, if you control your own DNS, you could manually switch it over to a new set of IP addresses when your old data center blows up. Filip - Original Message - From: Peter Lin [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, November 10, 2004 1:08 PM Subject: Re: Multi-Site Clustering? (hot failover) normally ISP will offer multi-site load balancing using DNS. In terms of failover, it generally handled the same way. If an earthquake swallows the first location, the second site's DNS will pick and route the traffic to the second cluster. I would talk to your service provider. the smaller shops don't offer it, so you'll have to talk to a bigger ISP. peter On Wed, 10 Nov 2004 12:52:17 -0600, Filip Hanik - Dev [EMAIL PROTECTED] wrote: Even a datacenter by itself plugs in to more than one backbone (network provider) So a datacenter itself has more than one connection into it. So what I am saying, if you want to fail over between data centers, that is not something you configure in tomcat, or in your own network, that is something you probably arrange with the data centers or the network providers, cause if your data center gets shattered in an earth quake, all the routers in there will be dead anyway. Filip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Filter tricks in tomcat
actually, you can use filters to capture the response and then use a filter to dump the whole thing to the outputstream. What you'll have to do is create your own buffer to hold the content and not write to either the jspwriter or the printwriter in the servlet. the tricky part is this. if you have custom error pages, you'll have to be careful because there may already be stuff in the buffer. one of these days I'll have to write an example and post a patch for the tomcat jsp examples. peter On Tue, 9 Nov 2004 09:03:10 -0500, Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, I assume that when you say capture you mean handle ? Or maybe wrap? To only handle outgoing (response) data in a filter, do something like this: public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws Blah { chain.doFilter(request, response); // Now do whatever you want with the response // Remember though that the response is likely committed by now } To only wrap a response is even simpler: public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws Blah { // Do whatever chain.doFilter(request, new MyResponseWrapper(response)); // Do whatever } Yoav Shapira http://www.yoavshapira.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.0.24 - JSP 2.0 SVG example (JSPX) - not opening rendered SVG object in IE 6
extra lines before ?xml .. can cause some XML parser to fail, so they should be removed. peter On Tue, 09 Nov 2004 20:53:04 -, d~l [EMAIL PROTECTED] wrote: On 9 Nov 2004 at 20:04, Peter Crowther Peter.Crowther-at-melandra wrote: Problem summary: Tomcat 5.0.24 JSP 2.0 SVG example does not display JSPX rendered SVG file in IE 6 browser. O.k. in Opera and Mozilla. Just check whether there's a blank line before the ?xml...? in the generated file. I had the same problem in ASPX with Adobe's 3.01 SVG viewer - it won't work at all unless the is the first character in the returned file. Just a guess. - Peter _ Thanks for the guess .. but I have just checked the textRotate.jspx file which IE is prompting to be downloaded .. and there is no white space before the ? xml header .. here are the first few lines of textRotate.jspx . no leading whitespace ?xml version=1.0 encoding=UTF-8? svg xmlns=http://www.w3.org/2000/svg; viewBox=0 0 450 500 height=500 width=450 titleJSP 2.0 JSPX/title g id=testContenttext text-anchor=middle font-size=15 y=10% x=50% class=title JSP 2.0 XML Syntax (.jspx) Demo/texttext text-anchor=middle font- size=15 y=15% x=50% class=title Try changing the name parameter!/text g id=rotatedText transform=translate(225, 250) opacity=1.0 g opacity=0.95 transform=scale(1.05) rotate(15) snip /svg __ anybody got Tomcat 5.0.x in localhost just to try out this JSP 2.0 SVG example ? http://localhost:8080/jsp-examples/jsp2/jspx/textRotate.jspx?name=JSPX d~l - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat is Good Enough for Game Performances
in this day, most of the servlet containers are about the same in terms of performance. What matters most is your design and implementation. there are plenty of sites getting 10million+ page views a day with tomcat. who ever told you tomcat is only for lab use is totally clueless. there's an article about performance on tomcat's resource page. these kinds of question are asked frequently. People really should look at the tomcat faq and resource pages. there's already information there. http://jakarta.apache.org/tomcat/faq/performance.html http://wiki.apache.org/jakarta-tomcat/PoweredBy there's quite a few sites that use Tomcat, but do not publicize it. all you have to do is use netcraft to hit some popular sites and you'll see if they are using Tomcat. Some people will go as far as to hide tomcat behind a load balancer and have it return Apache or some other webserver. peter On Tue, 09 Nov 2004 16:51:45 -0700, Bing Li [EMAIL PROTECTED] wrote: Dear all, I have a lot of Java programming over Tomcat. But I don't have such experiences to use Tomcat commercially. I heard that Tomcat could only be used for a laboratory environment and it was not mature enough for real commercial applications. Is it right or not? Now I attempt to use Tomcat as a game server. Is it a correct choice? What about the performance to use Tomcat for real time applications? When a lot of customers sign in, what about the efficiency issue? By the way, if Tomcat is not good for game applications, is it good enough for e-business applications, such as a large scale online shopping Web site? Thanks so much for your help! Bing - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]