RE: performance problem
Hi, Clues no, but a question to ask yourself: do you really need Apache HTTPd in front? Yoav Shapira Millennium Research Informatics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, September 17, 2004 3:06 PM To: [EMAIL PROTECTED] Subject: performance problem I have an apache/tomcat environment that is experiencing performance problems. My production environment has apache on one win2k box, and the two tomcat instances on another win 2k box. When I load test the my application directly against either of the tomcat instances, I get about 150 req/s. When I test with apache in front, I get 10 req/s. This was with apache server temporarily placed on same network segment as tomcat box. I recreated the production setup on a couple of developer workstations (slightly slower hardware than the production environment), and got 70 req/s. Apache and tomcat conf files are essentially identical in both environments. Does anyone have any clues? This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: performance problem
and could there be some network congestion in your live environment? Ta Matt -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: 20 September 2004 15:05 To: Tomcat Users List Subject: RE: performance problem Hi, Clues no, but a question to ask yourself: do you really need Apache HTTPd in front? Yoav Shapira Millennium Research Informatics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, September 17, 2004 3:06 PM To: [EMAIL PROTECTED] Subject: performance problem I have an apache/tomcat environment that is experiencing performance problems. My production environment has apache on one win2k box, and the two tomcat instances on another win 2k box. When I load test the my application directly against either of the tomcat instances, I get about 150 req/s. When I test with apache in front, I get 10 req/s. This was with apache server temporarily placed on same network segment as tomcat box. I recreated the production setup on a couple of developer workstations (slightly slower hardware than the production environment), and got 70 req/s. Apache and tomcat conf files are essentially identical in both environments. Does anyone have any clues? This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Any opinions expressed in this E-mail may be those of the individual and not necessarily the company. This E-mail and any files transmitted with it are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this E-mail in error and that any use or copying is strictly prohibited. If you have received this E-mail in error please notify the beCogent postmaster at [EMAIL PROTECTED] Unless expressly stated, opinions in this email are those of the individual sender and not beCogent Ltd. You must take full responsibility for virus checking this email and any attachments. Please note that the content of this email or any of its attachments may contain data that falls within the scope of the Data Protection Acts and that you must ensure that any handling or processing of such data by you is fully compliant with the terms and provisions of the Data Protection Act 1984 and 1998. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: performance problem
Another place to look is DNS -- can you ping your tomcat servers from the apache server? Can you do the reverse? I mean by name not IP. Try specifying IP to host relations in hosts/lmhosts. On Mon, 20 Sep 2004 15:10:36 +0100, Dale, Matt [EMAIL PROTECTED] wrote: and could there be some network congestion in your live environment? Ta Matt -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: 20 September 2004 15:05 To: Tomcat Users List Subject: RE: performance problem Hi, Clues no, but a question to ask yourself: do you really need Apache HTTPd in front? Yoav Shapira Millennium Research Informatics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, September 17, 2004 3:06 PM To: [EMAIL PROTECTED] Subject: performance problem I have an apache/tomcat environment that is experiencing performance problems. My production environment has apache on one win2k box, and the two tomcat instances on another win 2k box. When I load test the my application directly against either of the tomcat instances, I get about 150 req/s. When I test with apache in front, I get 10 req/s. This was with apache server temporarily placed on same network segment as tomcat box. I recreated the production setup on a couple of developer workstations (slightly slower hardware than the production environment), and got 70 req/s. Apache and tomcat conf files are essentially identical in both environments. Does anyone have any clues? This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. 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]
performance problem
I have an apache/tomcat environment that is experiencing performance problems. My production environment has apache on one win2k box, and the two tomcat instances on another win 2k box. When I load test the my application directly against either of the tomcat instances, I get about 150 req/s. When I test with apache in front, I get 10 req/s. This was with apache server temporarily placed on same network segment as tomcat box. I recreated the production setup on a couple of developer workstations (slightly slower hardware than the production environment), and got 70 req/s. Apache and tomcat conf files are essentially identical in both environments. Does anyone have any clues?
RE: performance problem
Hmm... http://www.greenfieldresearch.ca/technical/jk2_config.html Reading that, look for the one line in red font. Seems there's potential config problems when apache and tomcat are on separate boxes, as they need to share a file. You'd think this would prevent operation, rather than slowing it down , so perhaps it's not related. We use similar architecture, but JK (which doesn't seem to require that shared file). -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, September 17, 2004 2:06 PM To: [EMAIL PROTECTED] Subject: performance problem I have an apache/tomcat environment that is experiencing performance problems. My production environment has apache on one win2k box, and the two tomcat instances on another win 2k box. When I load test the my application directly against either of the tomcat instances, I get about 150 req/s. When I test with apache in front, I get 10 req/s. This was with apache server temporarily placed on same network segment as tomcat box. I recreated the production setup on a couple of developer workstations (slightly slower hardware than the production environment), and got 70 req/s. Apache and tomcat conf files are essentially identical in both environments. Does anyone have any clues? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat5.0.27/jk2 performance problem
Hi all, I had created an web application with tomcat and struts. When I did some tests, I had noted that sometimes a simple request (that 99% times spend milliseconds ) could spend some seconds ( I had remove call do database to eliminate database times), even in simple pages. I don't know if it's garbage collection problem, because if I try only with browser refresh, I do a fews refresh and I have the problem. What could be ? What parameters could I change ? Or...it's that normal My system is: Pentium III 600 with 512 Mb RAM Fedora Core 2 - Kernel Linux 2.6.7. Apache 2.0.50 + Tomcat 5.0.27 + jk2 Regards, Paulo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat5.0.27/jk2 performance problem
On Thu, Aug 12, 2004 at 01:03:06AM +0100, Paulo Jorge Zagalo das Neves wrote: : I had created an web application with tomcat and struts. : When I did some tests, I had noted that sometimes a simple : request (that 99% times spend milliseconds ) could spend some : seconds ( I had remove call do database to eliminate database : times), even in simple pages. This could be just about anything. Time for some basic troubleshooting: 1/ try hitting just Tomcat, taking Apache/jk out of the picture 2/ are you using precompiled JSPs? 3/ what's the network latency between you and the Tomcat host? 4/ what else is running on the Tomcat host? ... and so on, and so forth. If all else fails, time to drag out a profiler. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Performance problem?
Neil Aggarwal wrote: Hello: We have noticed that in our app, on occasion, a request takes an inordinately long time to execute even though it is performing a simple task. I added some tracing to the org.apache.jasper.servlet.JspServletWrapper class and get this output immediately before calling service on the servlet created from my jsp file: 10/10/2003 8:52:08.635 AM [Thread-188] Calling service on org.apache.jsp.index_jsp I had a very similar problem, and it was the GC. I'm using JRockit, and changed from -Xgc:parallel to -Xgc:gencon and that fixed it. Oreste - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Performance problem?
Oreste: I have been profiling the garbase collector in our app and it does not seem to be taking a long time to run. Do you think that could still be the problem? Thanks, Neil -- Neil Aggarwal, JAMM Consulting, (972)612-6056, www.JAMMConsulting.com FREE! Valuable info on how your business can reduce operating costs by 17% or more in 6 months or less! = http://newsletter.JAMMConsulting.com -Original Message- From: Oreste Luci [mailto:[EMAIL PROTECTED] Sent: Monday, October 13, 2003 1:02 PM To: Tomcat Users List Subject: Re: Performance problem? Neil Aggarwal wrote: Hello: We have noticed that in our app, on occasion, a request takes an inordinately long time to execute even though it is performing a simple task. I added some tracing to the org.apache.jasper.servlet.JspServletWrapper class and get this output immediately before calling service on the servlet created from my jsp file: 10/10/2003 8:52:08.635 AM [Thread-188] Calling service on org.apache.jsp.index_jsp I had a very similar problem, and it was the GC. I'm using JRockit, and changed from -Xgc:parallel to -Xgc:gencon and that fixed it. Oreste - 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 problem?
Neil Aggarwal wrote: Oreste: I have been profiling the garbase collector in our app and it does not seem to be taking a long time to run. Do you think that could still be the problem? Thanks, Neil I think you should try changing the GC and give it a try, may be it will solve your problem. The thing is that some GC stop the world while they do the cleaning and for some applications this can be very bad. Oreste - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Performance problem?
Hello All: While profiling my app, I also see another baffling output from my code: 10/10/2003 7:00:56.391 PM [Thread-96] Before synchronized block 10/10/2003 7:00:56.391 PM [Thread-96] Getting server context 10/10/2003 7:04:07.762 PM [Thread-96] Setting server context attribute This corresponds to this code in my class: ServerContext serverContext = null; addNote(req,Before synchronized block ); synchronized (serverContextManager) { // Record the time when we entered the synchronized block Calendar synchronizedStart = new GregorianCalendar(); addNote(req,Getting server context ); serverContext = (ServerContext)serverContextManager.get(httpHost); // // If doing a reset. // if (req.getParameter(_RESET_PARAM) != null serverContext != null) { addNote(req,Destrying server context ); serverContext.destroy(); serverContext = null; } // // If serverContext null then create it. // if (serverContext == null) { addNote(req,Creating server context ); System.out.println(Config: + systemRoot + /config/ + httpHost); serverContext = new ServerContext(this, systemRoot + /config/+httpHost,req); serverContextManager.put(httpHost, serverContext); } addNote(req,Setting server context attribute ); req.setAttribute(SERVER_CONTEXT, serverContext); As you can see, the delay occurred while getting the server context from serverContextManager (which is a java.util.Hashtable) and doing some simple if statement checks (which never get executed). Looking at the GC logs to ensure that this is not a GC delay, I see the next GC statement after this output is: 9422.37: [GC 178147K-160010K(298744K), 0.0233400 secs] Grepping the log for GC statements, I get these around this event: 9102.61: [GC 295917K-278423K(298744K), 0.0055240 secs] 9102.67: [GC 296443K-278451K(298744K), 0.0055600 secs] 9102.74: [GC 296984K-278479K(298744K), 0.0051700 secs] 9102.81: [GC 296607K-278507K(298744K), 0.0053320 secs] 9102.88: [GC 296961K-278535K(298744K), 0.0052320 secs] 9102.94: [GC 296304K-278559K(298744K), 0.0052560 secs] 9103.01: [GC 296738K-278585K(298744K), 0.0054490 secs] 9103.07: [GC 295993K-278609K(298744K), 0.0052450 secs] 9103.13: [GC 296458K-278713K(298744K), 0.0055630 secs] 9103.2: [GC 296852K-278737K(298744K), 0.0056190 secs] 9103.27: [GC 297221K-278761K(298744K), 0.0054230 secs] 9103.33: [GC 296333K-278784K(298744K), 0.0054540 secs] 9103.39: [GC 296679K-278805K(298744K), 0.0053570 secs] 9103.46: [GC 297002K-278828K(298744K), 0.0054750 secs] 9110.38: [GC 297375K-280719K(300056K), 0.0164410 secs] 9110.4: [Full GC 280719K-151025K(300056K), 0.2755410 secs] 9115.45: [GC 169584K-151883K(298744K), 0.0064940 secs] 9116.49: [GC 170439K-152421K(298744K), 0.0068510 secs] 9117.41: [GC 170978K-152646K(298744K), 0.0075410 secs] 9123.96: [GC 171202K-152704K(298744K), 0.0071470 secs] 9126: [GC 171264K-152757K(298744K), 0.0063730 secs] 9130.04: [GC 171302K-153194K(298744K), 0.0068320 secs] 9133.61: [GC 171726K-153551K(298744K), 0.0077230 secs] 9136.89: [GC 172096K-153762K(298744K), 0.0074560 secs] 9140.67: [GC 172322K-154029K(298744K), 0.0077430 secs] 9140.77: [GC 172722K-154313K(298744K), 0.0067860 secs] 9147.56: [GC 173003K-154481K(298744K), 0.0125330 secs] 9158.27: [GC 173011K-154929K(298744K), 0.0127420 secs] 9158.75: [GC 173468K-155000K(298744K), 0.0076740 secs] 9167.62: [GC 173551K-155512K(298744K), 0.0081280 secs] 9169.75: [Full GC 170487K-155074K(298744K), 0.2686600 secs] 9170.11: [GC 173634K-155720K(298744K), 0.0056310 secs] 9174.28: [GC 174280K-156023K(298744K), 0.0054010 secs] 9181.61: [GC 174577K-156404K(298744K), 0.0073980 secs] 9186.08: [GC 174964K-156546K(298744K), 0.0078340 secs] 9187.57: [GC 175104K-156833K(298744K), 0.0072990 secs] 9193.42: [GC 175387K-157125K(298744K), 0.0076240 secs] 9212.22: [GC 175685K-157160K(298744K), 0.0077510 secs] 9213.55: [Full GC 158189K-154977K(298744K), 0.2687580 secs] 9218.27: [GC 173593K-155527K(298744K), 0.0048250 secs] 9224.63: [GC 174039K-156180K(298744K), 0.0069800 secs] 9226.92: [GC 174717K-156202K(298744K), 0.0066730 secs] 9284.39: [GC 174762K-156688K(298744K), 0.0113370 secs] 9413.07: [GC 175248K-159587K(298744K), 0.0239160 secs] 9422.37: [GC 178147K-160010K(298744K), 0.0233400 secs] 9422.52: [GC 178570K-160892K(298744K), 0.0201960 secs] 9422.66: [GC 179452K-161365K(298744K), 0.0130190 secs] 9422.79: [GC 179925K-162077K(298744K), 0.0210060 secs] 9422.96: [GC 180637K-163041K(298744K), 0.0185410 secs] 9423.11: [GC 181594K-163586K(298744K), 0.0169170 secs] 9423.22: [GC 182146K-164363K(298744K), 0.0081180 secs] 9423.3: [GC 183055K-165082K(298744K), 0.0153120 secs] 9423.37: [GC 183681K-165560K(298744K), 0.0078910 secs] 9428.96: [GC 184120K-165820K(298744K), 0.0067790 secs] 9429.67: [GC
Performance problem?
Hello: We have noticed that in our app, on occasion, a request takes an inordinately long time to execute even though it is performing a simple task. I added some tracing to the org.apache.jasper.servlet.JspServletWrapper class and get this output immediately before calling service on the servlet created from my jsp file: 10/10/2003 8:52:08.635 AM [Thread-188] Calling service on org.apache.jsp.index_jsp My code is in the call to the service() method of the servlet after checking that Tomcat is not running a SingleThreadModel: if (theServlet instanceof SingleThreadModel) { // sync on the wrapper so that the freshness // of the page is determined right before servicing synchronized (this) { theServlet.service(request, response); } } else { com.slsideas.pagegen.servlets.BaseControllerServlet.addNote(request, Calling service on +theServlet.getClass().getName() ); theServlet.service(request, response); } My next line of output from the same thread is in my jsp file at the very top. It gave me: 10/10/2003 8:53:49.193 AM [Thread-188] At top of index.jsp So, you can see that it took over a minute and a half to get from the invocation of the service method on my jsp servlet to the actual execution of it. This seems strange to me, since this is just a method invocation. I don't believe this is caused by compilation of the jsp file since I have development set to false in tomcat's config file and this code is past that point in the JspServlet class. I don't believe this is garbage collection related since I have the verbose garbage collection flags turned on and I see that the GC for 100 seconds before and after this event look like this: 6467.31: [Full GC 285948K-236784K(460072K), 1.7318340 secs] 6497.1: [GC 287631K-259103K(460072K), 0.0225250 secs] [My output occurred here] 6497.84: [GC 287775K-259175K(460072K), 0.0198420 secs] 6529.71: [Full GC 382024K-259185K(460072K), 0.7856030 secs] The garbage collector is not taking very long to run. Does anyone have any insights to why this is taking so long? Thanks, Neil. -- Neil Aggarwal, JAMM Consulting, (972)612-6056, www.JAMMConsulting.com FREE! Valuable info on how your business can reduce operating costs by 17% or more in 6 months or less! = http://newsletter.JAMMConsulting.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RMI Performance problem
Has anyone noticed a performance problem, using RMI from within a web app? I developed a test program that looks up a remote object, and sends it 99 messages (i.e., invokes one of the remote methods.) When I run this as a stand-alone program, my results show an average invocation time of about 3 - 4ms. When I run the same program as a web app (tomcat 4.0.1, or 4.0.4) I'm seeing averages around 80 ms. JProbe confirms that cpu time is primarily spent in sun.rmi.server.UnicastRef.invoke( ) I don't have the sun.rmi source right now (I've looked on Sun One, but can't find it -- anyone know the URL?), so I don't have any idea what's the hang up. Anyone have insight into this? I saw a similar thread msg77001 RMI Class Annotation, in which a fellow sees 800 ms per invocation for his test, but he was talking about JBoss, and huge classpaths. Or, am I having the same problem? (I don't know anything about RMIClassLoader.getClassAnnotation(), which he says delivers 35K bytes from server to client in his situation.) Thanks, Mike Arachtingi
RE: RMI Performance problem
RMI has never been fast. It uses java serialization to marshall requests. hence it is slow. The more complicated objects you send over the request, the slower it gets. Filip -Original Message- From: Arachtingi, Mike [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 2:07 PM To: [EMAIL PROTECTED] Subject: RMI Performance problem Has anyone noticed a performance problem, using RMI from within a web app? I developed a test program that looks up a remote object, and sends it 99 messages (i.e., invokes one of the remote methods.) When I run this as a stand-alone program, my results show an average invocation time of about 3 - 4ms. When I run the same program as a web app (tomcat 4.0.1, or 4.0.4) I'm seeing averages around 80 ms. JProbe confirms that cpu time is primarily spent in sun.rmi.server.UnicastRef.invoke( ) I don't have the sun.rmi source right now (I've looked on Sun One, but can't find it -- anyone know the URL?), so I don't have any idea what's the hang up. Anyone have insight into this? I saw a similar thread msg77001 RMI Class Annotation, in which a fellow sees 800 ms per invocation for his test, but he was talking about JBoss, and huge classpaths. Or, am I having the same problem? (I don't know anything about RMIClassLoader.getClassAnnotation(), which he says delivers 35K bytes from server to client in his situation.) Thanks, Mike Arachtingi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: RMI Performance problem
sorry didn't read the full email. Performance degrading when inside of an webapp, shouldn't be doing that, unless the classloader is doing something funky when demarshalling your request. what you could do is to play around putting your RMI classes in different classpaths, like common/lib instead of WEB-INF/lib and see if that yields a difference Filip -Original Message- From: Filip Hanik Sent: Friday, January 31, 2003 2:16 PM To: Tomcat Users List Subject: RE: RMI Performance problem RMI has never been fast. It uses java serialization to marshall requests. hence it is slow. The more complicated objects you send over the request, the slower it gets. Filip -Original Message- From: Arachtingi, Mike [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 2:07 PM To: [EMAIL PROTECTED] Subject: RMI Performance problem Has anyone noticed a performance problem, using RMI from within a web app? I developed a test program that looks up a remote object, and sends it 99 messages (i.e., invokes one of the remote methods.) When I run this as a stand-alone program, my results show an average invocation time of about 3 - 4ms. When I run the same program as a web app (tomcat 4.0.1, or 4.0.4) I'm seeing averages around 80 ms. JProbe confirms that cpu time is primarily spent in sun.rmi.server.UnicastRef.invoke( ) I don't have the sun.rmi source right now (I've looked on Sun One, but can't find it -- anyone know the URL?), so I don't have any idea what's the hang up. Anyone have insight into this? I saw a similar thread msg77001 RMI Class Annotation, in which a fellow sees 800 ms per invocation for his test, but he was talking about JBoss, and huge classpaths. Or, am I having the same problem? (I don't know anything about RMIClassLoader.getClassAnnotation(), which he says delivers 35K bytes from server to client in his situation.) Thanks, Mike Arachtingi - 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: RMI Performance problem
Hello, Mike Arachtingi, When I run this as a stand-alone program, my results show an average invocation time of about 3 - 4ms. When I run the same program as a web app (tomcat 4.0.1, or 4.0.4) I'm seeing averages around 80 ms. 80ms doesn't sound too slow to me! But you've made a very interesting observation. I don't have much experience with RMI, and I've never looked at Tomcat's source code. But this is a mailing list, so I don't see why these facts should stop me from writing a response! ;-) In your Test program, I would try starting up a second do nothing thread before you run your RMI test. All it would do in its run() method is this: while ( true ) { synchronized( this ) { wait( 10 ); } } With that running, how much slower is your RMI test? Tomcat is somehow always listening on 1 or more ports for incoming requests... (that code is probably not in Tomcat, but in the JDK Socket stuff...) Those have got to eat up a few resources. Now, I don't imagine my do nothing thread is an accurate simulation of a web server waiting for incoming requests, but it must be better than nothing! yours, Julius Davies, Programmer, CUCBC Email: [EMAIL PROTECTED], Ph: 604.730.6385 ps to Derek: any thoughts? -Original Message- From: Arachtingi, Mike [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 2:07 PM To: [EMAIL PROTECTED] Subject: RMI Performance problem Has anyone noticed a performance problem, using RMI from within a web app? I developed a test program that looks up a remote object, and sends it 99 messages (i.e., invokes one of the remote methods.) When I run this as a stand-alone program, my results show an average invocation time of about 3 - 4ms. When I run the same program as a web app (tomcat 4.0.1, or 4.0.4) I'm seeing averages around 80 ms. JProbe confirms that cpu time is primarily spent in sun.rmi.server.UnicastRef.invoke( ) I don't have the sun.rmi source right now (I've looked on Sun One, but can't find it -- anyone know the URL?), so I don't have any idea what's the hang up. Anyone have insight into this? I saw a similar thread msg77001 RMI Class Annotation, in which a fellow sees 800 ms per invocation for his test, but he was talking about JBoss, and huge classpaths. Or, am I having the same problem? (I don't know anything about RMIClassLoader.getClassAnnotation(), which he says delivers 35K bytes from server to client in his situation.) Thanks, Mike Arachtingi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: RMI Performance problem
Just drop a comment. Between 4 ms to 80ms, netword traffic could be effect too. You might consider run the script a couple more times to check if there is a difference. -Original Message- From: Arachtingi, Mike [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 2:07 PM To: [EMAIL PROTECTED] Subject: RMI Performance problem Has anyone noticed a performance problem, using RMI from within a web app? I developed a test program that looks up a remote object, and sends it 99 messages (i.e., invokes one of the remote methods.) When I run this as a stand-alone program, my results show an average invocation time of about 3 - 4ms. When I run the same program as a web app (tomcat 4.0.1, or 4.0.4) I'm seeing averages around 80 ms. JProbe confirms that cpu time is primarily spent in sun.rmi.server.UnicastRef.invoke( ) I don't have the sun.rmi source right now (I've looked on Sun One, but can't find it -- anyone know the URL?), so I don't have any idea what's the hang up. Anyone have insight into this? I saw a similar thread msg77001 RMI Class Annotation, in which a fellow sees 800 ms per invocation for his test, but he was talking about JBoss, and huge classpaths. Or, am I having the same problem? (I don't know anything about RMIClassLoader.getClassAnnotation(), which he says delivers 35K bytes from server to client in his situation.) Thanks, Mike Arachtingi
performance problem
Hello! I have extremly performance problem! I send a http-request to Tomcat, which forwards the request over RMI to a business logic. This sends back a XML with the templates to include and values to place in the templates. This process takes about 100 - 400ms (not very fast but ok) After received the answer, Tomcat processes the XML via a few custom tags to include templates and write text values in this templates. A small (3k) template needs about 500ms to display. A little bit larger one (9k), about 20 sec For the time the HTML is created (resolving custom tags) , Tomcat is using 100% of the CPU! Looking at my log files, it seems that the HttpProcessor-Thread on Tomcat is blocked by another tomcat thread. In intervalls of about 4sec the HttpProcessor-Thread can process a little bit of its code and than is blocked again. Or tomcat is not able to hold the request object and writes it somewhere to disk. So every 4sec it has to read or write the information needed for this process to disk. Must I increment the cache for the context or the server? But where and how? Here a snippet of my log-file: 2002-08-14 15:49:36,403 DEBUG [HttpProcessor[8080][3]] obsession.juice.out CmsTag doStartTag - CurrentNode = [Element: pers_klassifikation/] looking for child [pers_klassifikation_item] 1 of 2 2002-08-14 15:49:40,068 DEBUG [HttpProcessor[8080][3]] obsession.juice.out SelectTag getOutputText - looking for parent the JSP-Code involved in this 4 sec: tr tdcms:text name=pers_klassifikation data=name//td td select size=1 class=long name=cms:text name=pers_klassifikation data=parameter/ cms:enter_area name=pers_klassifikation cms:area name=pers_klassifikation_item option value=cms:text name=pers_klassifikation_item data=value/ cms:select name=pers_klassifikation_item output=selected/cms:text name=pers_klassifikation_item//option /cms:area /cms:enter_area /select /td /tr the XML needed to populate the custom tags: pers_klassifikation name=Klassifikation parameter=fk_klassifikation_id validate=int range=1:100 mandatory=0 id=44 value=2 pers_klassifikation_item value=1Lead/pers_klassifikation_item pers_klassifikation_item value=2Honorar/pers_klassifikation_item /pers_klassifikation 4sec to know if the option tag is selected or not! Libraries involved jdom.jar and log4j.jar Using Tomcat 4.0.3, Java 1.3 on Windows2000 and Linux Debian as well. Thx for any help Alessandro -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: performance problem
It looks like you are using custom tags, and usually with XML transformations, they are quite processor heavy. You might want to look at the new Jaxen benchmarks with Dom4j: www.jaxen.org -Jacob | -Original Message- | From: Alessandro Di Maria [mailto:[EMAIL PROTECTED]] | Sent: Thursday, August 15, 2002 4:59 AM | To: tomcat-user | Subject: performance problem | | Hello! | | I have extremly performance problem! | | I send a http-request to Tomcat, which forwards the request over RMI to | a business logic. | This sends back a XML with the templates to include and values to place | in the templates. | | This process takes about 100 - 400ms (not very fast but ok) | | After received the answer, Tomcat processes the XML via a few custom | tags to include | templates and write text values in this templates. | | A small (3k) template needs about 500ms to display. | A little bit larger one (9k), about 20 sec | | For the time the HTML is created (resolving custom tags) , Tomcat is | using 100% of the CPU! | | Looking at my log files, it seems that the HttpProcessor-Thread on | Tomcat is blocked | by another tomcat thread. In intervalls of about 4sec the | HttpProcessor-Thread can process a little | bit of its code and than is blocked again. | | Or tomcat is not able to hold the request object and writes it somewhere | to disk. | So every 4sec it has to read or write the information needed for this | process to disk. | Must I increment the cache for the context or the server? But where and | how? | | Here a snippet of my log-file: | 2002-08-14 15:49:36,403 DEBUG [HttpProcessor[8080][3]] | obsession.juice.out CmsTag doStartTag - CurrentNode = [Element: | pers_klassifikation/] looking for child [pers_klassifikation_item] 1 of | 2 | | 2002-08-14 15:49:40,068 DEBUG [HttpProcessor[8080][3]] | obsession.juice.out SelectTag getOutputText - looking for parent | | the JSP-Code involved in this 4 sec: | | tr | tdcms:text name=pers_klassifikation data=name//td | td | select size=1 class=long name=cms:text | name=pers_klassifikation data=parameter/ | cms:enter_area name=pers_klassifikation | cms:area name=pers_klassifikation_item | option value=cms:text name=pers_klassifikation_item | data=value/ cms:select name=pers_klassifikation_item | output=selected/cms:text name=pers_klassifikation_item//option | /cms:area | /cms:enter_area | /select | /td | /tr | | | the XML needed to populate the custom tags: | | pers_klassifikation name=Klassifikation | parameter=fk_klassifikation_id validate=int range=1:100 | mandatory=0 id=44 value=2 | pers_klassifikation_item value=1Lead/pers_klassifikation_item | pers_klassifikation_item value=2Honorar/pers_klassifikation_item | /pers_klassifikation | | 4sec to know if the option tag is selected or not! | | Libraries involved jdom.jar and log4j.jar | | Using Tomcat 4.0.3, Java 1.3 on Windows2000 and Linux Debian as well. | | Thx for any help | Alessandro | | | -- | To unsubscribe, e-mail: mailto:tomcat-user- | [EMAIL PROTECTED] | For additional commands, e-mail: mailto:tomcat-user- | [EMAIL PROTECTED] | | --- | Incoming mail is certified Virus Free. | Checked by AVG anti-virus system (http://www.grisoft.com). | Version: 6.0.381 / Virus Database: 214 - Release Date: 8/2/2002 | --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.381 / Virus Database: 214 - Release Date: 8/2/2002 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: performance problem
before you go exploring other ideas, try jasper2 from the latest beta 4.1.9. if you have nested tags, most likely you're suffering from jdk bug with deeply nested try/catch. I would bother looking into other things until you've atleast tried jasper2. peter Alessandro Di Maria wrote: Hello! I have extremly performance problem! I send a http-request to Tomcat, which forwards the request over RMI to a business logic. This sends back a XML with the templates to include and values to place in the templates. This process takes about 100 - 400ms (not very fast but ok) After received the answer, Tomcat processes the XML via a few custom tags to include templates and write text values in this templates. A small (3k) template needs about 500ms to display. A little bit larger one (9k), about 20 sec For the time the HTML is created (resolving custom tags) , Tomcat is using 100% of the CPU! Looking at my log files, it seems that the HttpProcessor-Thread on Tomcat is blocked by another tomcat thread. In intervalls of about 4sec the HttpProcessor-Thread can process a little bit of its code and than is blocked again. Or tomcat is not able to hold the request object and writes it somewhere to disk. So every 4sec it has to read or write the information needed for this process to disk. Must I increment the cache for the context or the server? But where and how? Here a snippet of my log-file: 2002-08-14 15:49:36,403 DEBUG [HttpProcessor[8080][3]] obsession.juice.out CmsTag doStartTag - CurrentNode = [Element: pers_klassifikation/] looking for child [pers_klassifikation_item] 1 of 2 2002-08-14 15:49:40,068 DEBUG [HttpProcessor[8080][3]] obsession.juice.out SelectTag getOutputText - looking for parent the JSP-Code involved in this 4 sec: tr tdcms:text name=pers_klassifikation data=name//td td select size=1 class=long name=cms:text name=pers_klassifikation data=parameter/ cms:enter_area name=pers_klassifikation cms:area name=pers_klassifikation_item option value=cms:text name=pers_klassifikation_item data=value/ cms:select name=pers_klassifikation_item output=selected/cms:text name=pers_klassifikation_item//option /cms:area /cms:enter_area /select /td /tr the XML needed to populate the custom tags: pers_klassifikation name=Klassifikation parameter=fk_klassifikation_id validate=int range=1:100 mandatory=0 id=44 value=2 pers_klassifikation_item value=1Lead/pers_klassifikation_item pers_klassifikation_item value=2Honorar/pers_klassifikation_item /pers_klassifikation 4sec to know if the option tag is selected or not! Libraries involved jdom.jar and log4j.jar Using Tomcat 4.0.3, Java 1.3 on Windows2000 and Linux Debian as well. Thx for any help Alessandro -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tomcat 4.0.4 Performance - PROBLEM
Victor Popiol wrote: I set up Jasper2 on Tomcat 4.0.3 as previously recomended. Our webapp worked great. But other webapps, inclding the JSP examples don't work. Wehen invoking a jsp such as this: http://host:8080/examples/jsp/dates/date.jsp this exception is displayed: For this Jasper 2 build (fairly old, and has a bug), you need to have a /WEB-INF/lib folder (even if it is empty). This got fixed since then. Remy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tomcat 4.0.4 Performance - PROBLEM
On Wed, Jun 26, 2002 at 05:37:37PM -0400, Victor Popiol wrote: Hi all. I solved my problem. Jasper was dying for not having a lib directory under each web app's web-inf. This sounds like a bug in Jasper2. Thanks for pursuing this! I just hit the same problem, and found your solution here to work. Since Jasper2 doesn't show this behaviour with Tomcat 4.1.3, I'd imagine it is a (fixed) Catalina bug, not a Jasper bug. --Jeff Thasnks Victor -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat 4.0.4 Performance - PROBLEM
I don't think so. I saw the error inside jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TldLocationsCache int he method processJars. Here is the source: /** * Process all the jar files contained in this web application * WEB-INF/lib directory. */ private void processJars(ServletContext ctxt) throws JasperException { Set libSet = ctxt.getResourcePaths(/WEB-INF/lib); Iterator it = libSet.iterator(); while (it.hasNext()) { String resourcePath = (String) it.next(); if (resourcePath.endsWith(.jar)) tldConfigJar(ctxt, resourcePath); } } As you can see, there is no check for libSet being not null. Although, it might be that in Tomcat 4.1.3, libSet wil be an empty collection. Regards Victor -Original Message- From: Jeff Turner [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 27, 2002 9:13 PM To: Tomcat Users List Subject: Re: Tomcat 4.0.4 Performance - PROBLEM On Wed, Jun 26, 2002 at 05:37:37PM -0400, Victor Popiol wrote: Hi all. I solved my problem. Jasper was dying for not having a lib directory under each web app's web-inf. This sounds like a bug in Jasper2. Thanks for pursuing this! I just hit the same problem, and found your solution here to work. Since Jasper2 doesn't show this behaviour with Tomcat 4.1.3, I'd imagine it is a (fixed) Catalina bug, not a Jasper bug. --Jeff Thasnks Victor -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tomcat 4.0.4 Performance - PROBLEM
hi victor, there is a bug, which is already patched I believe. basically if you delete the working folder while tomcat is running, jasper2 doesn't recompile the dependent pages. you can get around that by restarting, or creating the missing folder manually. it should be fixed with the next alpha release of 4.1.6. peter Victor Popiol wrote: I did delete the working folders. This is how I set up Jasper2 on Tomcat 4.0.4: - Copied the following files to $catalina_home$/lib: ant.jar, commos-collections.jar, commons-logging.jar, jasper-compiler.jar, jasper-runtime.jar - Also tried as an alternative to move those files to $catalina_home$/common/lib to no avail. Is that how you set it up? Thanks Victor -Original Message- From: peter lin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 26, 2002 10:50 AM To: Tomcat Users List Subject: Re: Tomcat 4.0.4 Performance - PROBLEM hi victor, it worked fine for me with tomcat 4.0.3 and jasper2 on win2k. It looks like it couldn't load something. Did you delete the working folders maybe? Here is the generated file I got. peter package org.apache.jsp; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; import org.apache.jasper.runtime.*; public class date$jsp extends HttpJspBase { private static java.util.Vector _jspx_includes; public java.util.List getIncludes() { return _jspx_includes; } public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { JspFactory _jspxFactory = null; javax.servlet.jsp.PageContext pageContext = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; try { _jspxFactory = JspFactory.getDefaultFactory(); response.setContentType(text/html;ISO-8859-1); pageContext = _jspxFactory.getPageContext(this, request, response, null, false, 8192, true); application = pageContext.getServletContext(); config = pageContext.getServletConfig(); out = pageContext.getOut(); _jspx_out = out; out.write(html\r\n); out.write(!--\r\n Copyright (c) 1999 The Apache Software Foundation. All rights \r\n reserved.\r\n--\r\n\r\n); out.write(\r\n\r\n); out.write(body bgcolor=\white\\r\n); dates.JspCalendar clock = null; synchronized (pageContext) { clock = (dates.JspCalendar) pageContext.getAttribute(clock, PageContext.PAGE_SCOPE); if (clock == null){ try { clock = (dates.JspCalendar) java.beans.Beans.instantiate(this.getClass().getClassLoader(), dates.JspCalendar); } catch (ClassNotFoundException exc) { throw new InstantiationException(exc.getMessage()); } catch (Exception exc) { throw new ServletException(Cannot create bean of class + dates.JspCalendar, exc); } pageContext.setAttribute(clock, clock, PageContext.PAGE_SCOPE); } } out.write(\r\n\r\n); out.write(font size=4\r\n); out.write(ul\r\n); out.write(li\tDay of month: is ); out.print(JspRuntimeLibrary.toStringdates.JspCalendar)pageContext.findAttribute(clock)).getDayOfMonth(; out.write(\r\n); out.write(li\tYear: is ); out.print(JspRuntimeLibrary.toStringdates.JspCalendar)pageContext.findAttribute(clock)).getYear(; out.write(\r\n); out.write(li\tMonth: is ); out.print(JspRuntimeLibrary.toStringdates.JspCalendar)pageContext.findAttribute(clock)).getMonth(; out.write(\r\n); out.write(li\tTime: is ); out.print(JspRuntimeLibrary.toStringdates.JspCalendar)pageContext.findAttribute(clock)).getTime(; out.write(\r\n); out.write(li\tDate: is ); out.print(JspRuntimeLibrary.toStringdates.JspCalendar)pageContext.findAttribute(clock)).getDate(; out.write(\r\n); out.write(li\tDay: is ); out.print(JspRuntimeLibrary.toStringdates.JspCalendar)pageContext.findAttribute(clock)).getDay(; out.write(\r\n); out.write(li\tDay Of Year: is ); out.print(JspRuntimeLibrary.toStringdates.JspCalendar)pageContext.findAttribute(clock)).getDayOfYear(; out.write(\r\n); out.write(li\tWeek Of Year: is ); out.print(JspRuntimeLibrary.toStringdates.JspCalendar)pageContext.findAttribute(clock)).getWeekOfYear(; out.write(\r\n); out.write(li\tera: is ); out.print(JspRuntimeLibrary.toStringdates.JspCalendar)pageContext.findAttribute(clock)).getEra(; out.write(\r\n); out.write(li\tDST Offset: is ); out.print(JspRuntimeLibrary.toStringdates.JspCalendar
RE: Tomcat 4.0.4 Performance - PROBLEM
At this point, I'm trying to isolate the issue by having reinstalled tomcat vanilla, no config changes and no custom webapps added. I did move commons-collections.jar to tomcat4.0.4/common/lib, restarted tomcat and continue having the same problem. This smells like a classpath issue. But I can't figure it out. Thanks Victor -Original Message- From: Reynir Hübner [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 26, 2002 1:20 PM To: Tomcat Users List Subject: RE: Tomcat 4.0.4 Performance - PROBLEM I have an idea of what may be wrong there.. I had to move commons-collection.jar from the tc4.1.3 dist to my tc.4.0.3. common/lib you say u're running struts apps, so that may produce the possibility that you have a wrong version of this jar-file, as it is distributed with struts too. just an idea. hope it helps [EMAIL PROTECTED] -Original Message- From: Victor Popiol [mailto:[EMAIL PROTECTED]] Sent: 26. júní 2002 17:22 To: Tomcat Users List Subject: RE: Tomcat 4.0.4 Performance - PROBLEM I just reinstalled tomcat 4.0.4, tested it, it worked, copied jasper2 jars from tomcat 4.1.3 to tomcat/lib, copied ant.jar from tomcat 4.1.3 to tomcat/lib and get the same JSP problems. My question is, where did you get your jasper2 jars from? Again my problem is that I can not get the sample jsps to work. I get the error below. I can't get this to work! Thanks Victor -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 26, 2002 11:31 AM To: Tomcat Users List Subject: RE: Tomcat 4.0.4 Performance - PROBLEM the only thing different is I have jaxp-api.jar which is uused by JSTL. I don't have classes12 since I don't use Oracle. check your web.xml file under examples/WEB-INF/ it could be corrupted or wrong for some unknown reason. peter --- Victor Popiol [EMAIL PROTECTED] wrote: It does recreate the examples folder but it does not create any content inside the folder. I made shure that tomcat/lib contains jasper-compiler.jar, jasper-runtime.jar and ant.jar plus naming-factory.jar and still doesn't work. What do you have in your tomcat/common/lib? I have the following: activation.jar classes12_01.jar -- Oracle jdbc2_0-stdext.jar jndi.jar jta-spec1_0_1.jar mail.jar naming-common.jar naming-resources.jar servlet.jar tyrex-0.9.7.0.jar tyrex.license xerces.jar Thanks Victor -Original Message- From: peter lin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 26, 2002 11:16 AM To: Tomcat Users List Subject: Re: Tomcat 4.0.4 Performance - PROBLEM victor, do you see tomcat re-create the examples folder under work/localhost/? I only have jasper-compiler.jar, jasper-runtime.jar and ant.jar in my tomcat/lib/ directory. other than that I didn't use any other 4.1.5 jars. I hope that helps. peter Victor Popiol wrote: That doesn't seem to be the problem I'm experiencing, though. I stopped tomcat, deleted the work folder, restarted it and still get the error running the example jsps. I am very puzzled by this since our web application, which uses struts, works perfectly. Thanks Victor -Original Message- From: peter lin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 26, 2002 11:06 AM To: Tomcat Users List Subject: Re: Tomcat 4.0.4 Performance - PROBLEM hi victor, there is a bug, which is already patched I believe. basically if you delete the working folder while tomcat is running, jasper2 doesn't recompile the dependent pages. you can get around that by restarting, or creating the missing folder manually. it should be fixed with the next alpha release of 4.1.6. peter Victor Popiol wrote: I did delete the working folders. This is how I set up Jasper2 on Tomcat 4.0.4: - Copied the following files to $catalina_home$/lib: ant.jar, commos-collections.jar, commons-logging.jar, jasper-compiler.jar, jasper-runtime.jar - Also tried as an alternative to move those files to $catalina_home$/common/lib to no avail. Is that how you set it up? Thanks Victor -Original Message- From: peter lin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 26, 2002 10:50 AM To: Tomcat Users List Subject: Re: Tomcat 4.0.4 Performance - PROBLEM hi victor, it worked fine for me with tomcat 4.0.3 and jasper2 on win2k. It looks like it couldn't load something. Did you delete the working folders maybe? Here is the generated file I got. peter package org.apache.jsp; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; import org.apache.jasper.runtime.*; public class date$jsp extends
performance problem with Tomcat 4 + ISAPI + IIS 5
We encounter a real problem of performances on our server. We were able to determinate that the problem comes from the ISAPI filter (neither the webapp nor the hardware nor the tomcat installation...). A more detailed description of the case is available ( with duke dollars ! ;) ) at : http://forum.java.sun.com/thread.jsp?forum=33thread=244516 Has someone had the same problem or got some info ? Regards. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Performance problem
Hello everyone.] My name is Hideyuki. I'm Japanese ( poor at English). I've got a trouble when I'm trying to optimize performance. I want to: 1. set accept queue size 30. 2. process request on 3 thread concurrently. So, I wrote below ---conf/server.xml start--- Connector className=org.apache.catalina.connector.http.HttpConnector port=8080 minProcessors=3 maxProcessors=3 enableLookups=true acceptCount=30 debug=0 connectionTimeout=6/ ---conf/server.xml end--- I think it's OK... But when I send 30 request at once by LoadRunner, 27 requests is failure. 3 request is OK. Is this a BUG? or a spec? The source code is below. I think we need own accept queue. Or Processor thread should do accept form serverSocket directly. How do you think? ---HttpConnector start (1028)--- // Hand this socket off to an appropriate processor HttpProcessor processor = createProcessor(); if (processor == null) { try { log(sm.getString(httpConnector.noProcessor)); socket.close(); } catch (IOException e) { ; } continue; } ---HttpConnector end (1038)--- ---HttpConnector start (834)--- /** * Create (or allocate) and return an available processor for use in * processing a specific HTTP request, if possible. If the maximum * allowed processors have already been created and are in use, return * codenull/code instead. */ private HttpProcessor createProcessor() { synchronized (processors) { if (processors.size() 0) { // if (debug = 2) // log(createProcessor: Reusing existing processor); return ((HttpProcessor) processors.pop()); } if ((maxProcessors 0) (curProcessors maxProcessors)) { // if (debug = 2) // log(createProcessor: Creating new processor); return (newProcessor()); } else { if (maxProcessors 0) { // if (debug = 2) // log(createProcessor: Creating new processor); return (newProcessor()); } else { // if (debug = 2) // log(createProcessor: Cannot create new processor); return (null); } } } } ---HttpConnector end (865)--- -- HIRAUCHI Hideyuki [EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Performance problem with Tomcat 3.2 on NT
Hi folks ! I am facing performance problem on Tomcat 3.2 when used on NT workstation. I am running servlets JSPs on Tomcat. My JSPs Servlets pick huge amount of XML data from Oracle tables(in CLOB field) and show on the browser(IE 5). The application works fine 1 or 2 times. But when run repeatedly, I get error Tomcat stops processing the requests. Tomcat runs fine when it processes less data intensive requests, but it gives problem when it has to fetch store large amount of data in the database. Can anybody suggest a way to make my environment more stable for this scenario ? Any help will be much appreciated. Regards mukul __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
Re: AW: Performance problem with Tomcat 3.2 on NT
I am not storing heavy data in sessions(just integer IDs). But in my servlet, i do parse the XML using standard XML parser(Oracle XDK) and manipulate the DOM tree generated from it. But is,nt it, when servlet finishes execution, the DOM tree corresponding to the XML must be freed from memory ;) and whole memory should be available to subsequent requests. I am making JDBC calls from the servlet, but I close the connections before returning result to the browser. Is NT environment the problem ? Has anybody experianced a similar problem ? Would the same application run better on Unix ? Regards mukul --- Thomas Bezdicek [EMAIL PROTECTED] wrote: most likely you cache something, either the servlet sessions, the xml - dom trees or maybe the connection and the resultsets (maybe implicit by the jdbc driver) this results in an enormous ram problem which actually slows down the whole system dramatically. regards -Ursprungliche Nachricht- Von: Mukul Gandhi [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 4. Juli 2001 18:19 An: [EMAIL PROTECTED] Betreff: Performance problem with Tomcat 3.2 on NT Hi folks ! I am facing performance problem on Tomcat 3.2 when used on NT workstation. I am running servlets JSPs on Tomcat. My JSPs Servlets pick huge amount of XML data from Oracle tables(in CLOB field) and show on the browser(IE 5). The application works fine 1 or 2 times. But when run repeatedly, I get error Tomcat stops processing the requests. Tomcat runs fine when it processes less data intensive requests, but it gives problem when it has to fetch store large amount of data in the database. Can anybody suggest a way to make my environment more stable for this scenario ? Any help will be much appreciated. Regards mukul __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
Re: AW: Performance problem with Tomcat 3.2 on NT
I am not storing heavy data in sessions(just integer IDs). But in my servlet, i do parse the XML using standard XML parser(Oracle XDK) and manipulate the DOM tree generated from it. But is,nt it, when servlet finishes execution, the DOM tree corresponding to the XML must be freed from memory ;) and whole memory should be available to subsequent requests. I am making JDBC calls from the servlet, but I close the connections before returning result to the browser. Is NT environment the problem ? Has anybody experianced a similar problem ? Would the same application run better on Unix ? Regards mukul --- Thomas Bezdicek [EMAIL PROTECTED] wrote: most likely you cache something, either the servlet sessions, the xml - dom trees or maybe the connection and the resultsets (maybe implicit by the jdbc driver) this results in an enormous ram problem which actually slows down the whole system dramatically. regards -Ursprungliche Nachricht- Von: Mukul Gandhi [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 4. Juli 2001 18:19 An: [EMAIL PROTECTED] Betreff: Performance problem with Tomcat 3.2 on NT Hi folks ! I am facing performance problem on Tomcat 3.2 when used on NT workstation. I am running servlets JSPs on Tomcat. My JSPs Servlets pick huge amount of XML data from Oracle tables(in CLOB field) and show on the browser(IE 5). The application works fine 1 or 2 times. But when run repeatedly, I get error Tomcat stops processing the requests. Tomcat runs fine when it processes less data intensive requests, but it gives problem when it has to fetch store large amount of data in the database. Can anybody suggest a way to make my environment more stable for this scenario ? Any help will be much appreciated. Regards mukul __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
Re: Solaris Performance Problem
Hello, It should be fixed with a call to Socket.setTcpNoDelay() on the Tomcat server socket. A C program that I wrote had the same problem as the Tomcat server. and the problem was fixed with the setting of the TCP NODELAY transmission. Anybody there who volunteer to add this option to the Tomcat Java server code? My analysis of the problem is attached at the end of this mail. From: [EMAIL PROTECTED] (Douglas E. Hornig) Subject: Solaris Performance Problem To: [EMAIL PROTECTED] I have run into a strance performance problem with Tomcat that I am at a loss to figure out. In a nutshell, when I run Tomcat (version 3.2.1, standalone) on a Solaris Sparc server and hit it with a Windows client, the minimum response time is is abount 0.2 seconds. This is for a simple servlet that just returns some static data. That may not sound like a lot of time but if a client makes several requests to the server it can add up fast. If I run the server on a Linux PC that number is about 0.01 seconds or less. I also get good performce if I use a Linux client and hit the Solaris server. I have tried using different PC clients (different PCs, one running NT 4 and one with Windows 2000), different test programs (one in Java and one in Visual Basic) and it makes no difference. I have tried using different Solaris servers, a 420R and an Ultra 5, neither with any kind of load. I have tried different JDKs (1.2.2 and 1.3.0). No difference. I wrote a quickie standalone Java server for the Sparcs and their response time was very fast ( 0.01 secs). The server reads a request, sends a reply, and closes the socket much like a web server would. So the problem combination seems to be Solaris server with Tomcat and a PC client. I know this sounds nuts but it's totally repeatable and a very serious problem. Does anyone have an idea what I can do to get to the bottom of this? Thanks a lot. Douglas Hornig Dartmouth-Hitchcock Medical Center Lebanon, NH slow response time with Solaris 8 server and Windows 2000 TCP client as tested with Tomcat and IE Problem description: Tomcat Hello World examples (/examples/servlet/HelloWorldExample) divide the response into two parts: HTTP protocol header HTML data At the Solaris TCP level, the second part of the response will not be send till the Windows client acknowledge (ACK) the first part. The result: a delay of ~170ms (dependent on client/server configuration) The configuration in problem: - Solaris 8 running Tomcat 3.2.1 server Windows 2000 client machine running a web client And the raw data: - The output was gathered with: truss -fdDla -o /tmp/tmp.dat -p 5732 On a Solaris machine: SunOS node2mde 5.8 Generic_108528-05 sun4u sparc SUNW,Ultra-60 root nexus = Sun Enterprise 220R (2 X UltraSPARC-II 450MHz) Tomcat server (on the Solaris 8) send two sends within a few milliseconds: time stampdurationsystem-call and its arguments (seconds)(seconds) 100759.36250.0009 send(14, HTTP/1.0 200 , 179, 0) = 179 100759.36290.0004 send(14, html\nhead , 400, 0) = 400 The Windows 2000 client receive the second part about 170ms after the first The delay the transfer of the second send till it receive an acknowledge for the first. Analyze: This is a generic Solaris server Windows client TCP problem that is not specific to Tomcat. The originate of the problem is probably an obscure Windows TCP implementation, however, the Solaris TCP implementation should be able to recognize a Windows client on its LAN and to modify its TCP parameters accordingly to improve performance. The Solaris OS try to optimize the transfer of data to its client by combining a few sends/write of small amount of data each into one data transfer. If the client machine is slow to acknowledge the first transfer (i.e. Windows client), then the inevitable consequence is a delay transfer: non of the small bits of data will be transferred to the client till the Solaris gather enough small bits for one big transfer or till the client acknowledge the first transfer. This optimization is good for connections with high latency (Internet, WAN) that has a big overhead per one transfer but is very bad for LAN where the latency is small and the overhead of one transfer is small and the client machine is slow to acknowledge the first transfer. The bottom line is: When the latency is small (LAN) and the client machine run windows (NT, Win2000) then the delay transfer optimization introduce delays and the TCP default
performance problem - too many processes
Hi, I have setup a web server with following configuration: - Redhat 7.0 - Kernel 2.2.16-22, PIII 650, 256M Ram - Tomcat 3.2.1 - Apache 1.3.19 - mod_jk - Inprise Application server for EJBs and the server has two SSL acceleration cards, and mod-ssl module for apache. I have configured the apache to use mod_jk and Ajp13 protocol, and I have left the default parameters for PoolTcpConnector. and the http.conf has the following parameters: MaxKeepAliveRequests 0 MinSpareServers 16 MaxSpareServers 64 StartServers 20 MaxClients 250 MaxRequestPerChild 10 When I make the server up, I see there are 100+ processes initially (apprx. ~130), and in the load intervals it has near 400 process, why it has too many processes? is there any idea? Our old system has Apache JServ for JSP/Servlet and it runs much more efficient than tomcat, and much less processes were avaliable in the system at that time. Response time of server was decreased very much. can anybody say me what the reasons of this situation is, or where I am wrong, what I should do? I am waiting for your comments and ideas and solutions if any. Regards, Deniz Demir.
RE: performance problem - too many processes
You can try the following things to make tomcat faster. 1) keep the log level low. 2) Set reloadable=false(Disable Servlet Auto-Reloading ) As it is very expensive. 3) Configure PoolTcpConnector depending on the number of requests/load.(this should help a lot). Can u tell how much RAM or perecntage of RAM are tomcat's processess using ? 4) Give more RAM to tomcat.(if i am right the default setting is for 64MB). So even though you would be having 256 MB RAM but then u might not be using it optimally. Even i had similar problems, and tomcat's performance had improoved a lot after working on the above mentioned points. HTH, Shuklix -Original Message- From: DENIZ DEMIR [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 02, 2001 6:31 PM To: [EMAIL PROTECTED] Subject: performance problem - too many processes Hi, I have setup a web server with following configuration: - Redhat 7.0 - Kernel 2.2.16-22, PIII 650, 256M Ram - Tomcat 3.2.1 - Apache 1.3.19 - mod_jk - Inprise Application server for EJBs and the server has two SSL acceleration cards, and mod-ssl module for apache. I have configured the apache to use mod_jk and Ajp13 protocol, and I have left the default parameters for PoolTcpConnector. and the http.conf has the following parameters: MaxKeepAliveRequests 0 MinSpareServers 16 MaxSpareServers 64 StartServers 20 MaxClients 250 MaxRequestPerChild 10 When I make the server up, I see there are 100+ processes initially (apprx. ~130), and in the load intervals it has near 400 process, why it has too many processes? is there any idea? Our old system has Apache JServ for JSP/Servlet and it runs much more efficient than tomcat, and much less processes were avaliable in the system at that time. Response time of server was decreased very much. can anybody say me what the reasons of this situation is, or where I am wrong, what I should do? I am waiting for your comments and ideas and solutions if any. Regards, Deniz Demir.
Re: performance problem - too many processes
Hi, * DENIZ DEMIR [EMAIL PROTECTED] [010502 15:23]: When I make the server up, I see there are 100+ processes initially (apprx. ~130), and in the load intervals it has near 400 process, why it has too many processes? is there any idea? Do not worry, they are not different processes, but different threads. So they do not eat the memory separately. There have been some threads about it, search for the subject to many tomcat processes!! AAH!!. Regards, Laszlo
Re: performance problem - too many processes
Hi Saurabh, Thank you for your advise, we will make these change now, but I want to ask some question and answer your questions first. You can try the following things to make tomcat faster. 1) keep the log level low. in server.xml file of tomcat or httpd.conf? do you mean error parameter for low logging? 2) Set reloadable=false(Disable Servlet Auto-Reloading ) As it is very expensive. do you mean the following parameter from server.xml Context path=/ docBase=/var/www/html crossContext=false debug=0 reloadable=true /Context 3) Configure PoolTcpConnector depending on the number of requests/load.(this should help a lot). First, We are a brokerage firm and approximately 1000 different customers use our internet branch, and I guess 100 user at most use the web branche simultaneously. what do you think about parameters for Pooling? (max_threads, mx_spare_servers, min_spare_servers). But now, the system has too many processes, when I look at with top or ps commands. Can u tell how much RAM or perecntage of RAM are tomcat's processess using ? I do not know, how can I see? 4) Give more RAM to tomcat.(if i am right the default setting is for 64MB). So even though you would be having 256 MB RAM but then u might not be using it optimally. I do not know how to make this change. But Now system runs under heavy memory load now, I mean that the system uses some swap memory when the server has heavy load (when it has about 400 processes, it has 3-5M free memory, and uses 5-6M swap memory). Even i had similar problems, and tomcat's performance had improoved a lot after working on the above mentioned points. this is very critical for us, if you help me it is very appreciated. Thanks a lot again, and I am waiting for your reply. Regards, Deniz Demir. HTH, Shuklix -Original Message- From: DENIZ DEMIR [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 02, 2001 6:31 PM To: [EMAIL PROTECTED] Subject: performance problem - too many processes Hi, I have setup a web server with following configuration: - Redhat 7.0 - Kernel 2.2.16-22, PIII 650, 256M Ram - Tomcat 3.2.1 - Apache 1.3.19 - mod_jk - Inprise Application server for EJBs and the server has two SSL acceleration cards, and mod-ssl module for apache. I have configured the apache to use mod_jk and Ajp13 protocol, and I have left the default parameters for PoolTcpConnector. and the http.conf has the following parameters: MaxKeepAliveRequests 0 MinSpareServers 16 MaxSpareServers 64 StartServers 20 MaxClients 250 MaxRequestPerChild 10 When I make the server up, I see there are 100+ processes initially (apprx. ~130), and in the load intervals it has near 400 process, why it has too many processes? is there any idea? Our old system has Apache JServ for JSP/Servlet and it runs much more efficient than tomcat, and much less processes were avaliable in the system at that time. Response time of server was decreased very much. can anybody say me what the reasons of this situation is, or where I am wrong, what I should do? I am waiting for your comments and ideas and solutions if any. Regards, Deniz Demir.
Solaris Performance Problem
I have run into a strance performance problem with Tomcat that I am at a loss to figure out. In a nutshell, when I run Tomcat (version 3.2.1, standalone) on a Solaris Sparc server and hit it with a Windows client, the minimum response time is is abount 0.2 seconds. This is for a simple servlet that just returns some static data. That may not sound like a lot of time but if a client makes several requests to the server it can add up fast. If I run the server on a Linux PC that number is about 0.01 seconds or less. I also get good performce if I use a Linux client and hit the Solaris server. I have tried using different PC clients (different PCs, one running NT 4 and one with Windows 2000), different test programs (one in Java and one in Visual Basic) and it makes no difference. I have tried using different Solaris servers, a 420R and an Ultra 5, neither with any kind of load. I have tried different JDKs (1.2.2 and 1.3.0). No difference. I wrote a quickie standalone Java server for the Sparcs and their response time was very fast ( 0.01 secs). The server reads a request, sends a reply, and closes the socket much like a web server would. So the problem combination seems to be Solaris server with Tomcat and a PC client. I know this sounds nuts but it's totally repeatable and a very serious problem. Does anyone have an idea what I can do to get to the bottom of this? Thanks a lot. Douglas Hornig Dartmouth-Hitchcock Medical Center Lebanon, NH
RE: Solaris Performance Problem
Another issue that it may be is there is a noticeable difference in speed of response between IE/Netscape and some of the thinner browsers you see on other platforms. Download Opera and try it - it is significantly faster in opening. If there is still a significant difference in response times I would then check the routing and network configuration as Tim mentioned. Bill Penberthy Sr. Functional Architect IQNavigator -Original Message- From: Tim O'Neil [mailto:[EMAIL PROTECTED]] Sent: Friday, April 20, 2001 12:34 PM To: [EMAIL PROTECTED] Subject: Re: Solaris Performance Problem At 02:24 PM 4/20/2001 -0400, Douglas wrote: I have run into a strance performance problem with Tomcat that I am at a loss to figure out. In a nutshell, when I run Tomcat (version 3.2.1, standalone) on a Solaris Sparc server and hit it with a Windows client, the minimum response time is is abount 0.2 seconds. This is for a simple servlet that just returns some static data. That may not sound like a lot of time but if a client makes several requests to the server it can add up fast. If I run the server on a Linux PC that number is about 0.01 seconds or less. I also get good performce if I use a Linux client and hit the Solaris server. It would be real easy to simply blame Windows for this but the actual problem is more likely something to do with the networking set up of the Windows machines. I haven't seen poor performance with regard to Windows and http that's any more than with Unix boxes. I'd look at any differences between the way the two platforms are connected to your network. Are the Windows machines dhcp clients, what does a tracert or a ping tell you, compare that to the output of a traceroute on the solaris boxes, etc. You may find that the routing of the Windows machines is different and will need to be adjusted.
RE: Solaris Performance Problem
I have a same kind of experience on Solaris performance. I run Tomcat 3.2.1 standalone on Solaris 8. My servlet also returns some static data. When I hit my servlet with IE, it took 137.5ms and Netscape took 327.5ms to complete. I did not understand what was happening. I posted this kind of question but I did not get any reply. Connie -Original Message- From: Penberthy, Bill [SMTP:[EMAIL PROTECTED]] Sent: Friday, April 20, 2001 3:07 PM To: '[EMAIL PROTECTED]' Subject: RE: Solaris Performance Problem Another issue that it may be is there is a noticeable difference in speed of response between IE/Netscape and some of the thinner browsers you see on other platforms. Download Opera and try it - it is significantly faster in opening. If there is still a significant difference in response times I would then check the routing and network configuration as Tim mentioned. Bill Penberthy Sr. Functional Architect IQNavigator -Original Message- From: Tim O'Neil [mailto:[EMAIL PROTECTED]] Sent: Friday, April 20, 2001 12:34 PM To: [EMAIL PROTECTED] Subject: Re: Solaris Performance Problem At 02:24 PM 4/20/2001 -0400, Douglas wrote: I have run into a strance performance problem with Tomcat that I am at a loss to figure out. In a nutshell, when I run Tomcat (version 3.2.1, standalone) on a Solaris Sparc server and hit it with a Windows client, the minimum response time is is abount 0.2 seconds. This is for a simple servlet that just returns some static data. That may not sound like a lot of time but if a client makes several requests to the server it can add up fast. If I run the server on a Linux PC that number is about 0.01 seconds or less. I also get good performce if I use a Linux client and hit the Solaris server. It would be real easy to simply blame Windows for this but the actual problem is more likely something to do with the networking set up of the Windows machines. I haven't seen poor performance with regard to Windows and http that's any more than with Unix boxes. I'd look at any differences between the way the two platforms are connected to your network. Are the Windows machines dhcp clients, what does a tracert or a ping tell you, compare that to the output of a traceroute on the solaris boxes, etc. You may find that the routing of the Windows machines is different and will need to be adjusted.
Re: Solaris Performance Problem
You might want to try and write a simple servlet that loops through and prints out all the HTTP headers. I know the different browsers send different information, probably not enough to cause the difference in speed but it may shed some light. Also I am assuming you are doing the test from the same machine ?? If not you may want to look into DNS resolution. Sometimes the logging mechanisms want to resolve the IP Address which is slower if a name can not be resolved. Are you running in stand alone mode (port 8080) or are you using a Web Server (Apache). Make sure the problem is actually the Java Server. Also there is a big difference in the way NS IE pull assets and display. I have a servlet that serves up the assets as well as the HTML (icons, images). Original testing with IE no problem, then I tested with NS and threading problems big time. Tough to troubleshoot too. It seems that NS multitasks differently and will actually make many requests at once. Just my two cents John G "Douglas E. Hornig" wrote: I have run into a strance performance problem with Tomcat that I am at a loss to figure out. In a nutshell, when I run Tomcat (version 3.2.1, standalone) on a Solaris Sparc server and hit it with a Windows client, the minimum response time is is abount 0.2 seconds. This is for a simple servlet that just returns some static data. That may not sound like a lot of time but if a client makes several requests to the server it can add up fast. If I run the server on a Linux PC that number is about 0.01 seconds or less. I also get good performce if I use a Linux client and hit the Solaris server. I have tried using different PC clients (different PCs, one running NT 4 and one with Windows 2000), different test programs (one in Java and one in Visual Basic) and it makes no difference. I have tried using different Solaris servers, a 420R and an Ultra 5, neither with any kind of load. I have tried different JDKs (1.2.2 and 1.3.0). No difference. I wrote a quickie standalone Java server for the Sparcs and their response time was very fast ( 0.01 secs). The server reads a request, sends a reply, and closes the socket much like a web server would. So the problem combination seems to be Solaris server with Tomcat and a PC client. I know this sounds nuts but it's totally repeatable and a very serious problem. Does anyone have an idea what I can do to get to the bottom of this? Thanks a lot. Douglas Hornig Dartmouth-Hitchcock Medical Center Lebanon, NH