RE: Tomcat problem on a multiple CPU system
I open 8 IE on a remote computer, basically once a JSP is called, the browser is just waiting the process to be done. -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: 4 mai 2008 23:00 To: Tomcat Users List Subject: Re: Tomcat problem on a multiple CPU system Can you describe how you open the 8 browser windows and what browser you are using? I ask because those 8 browser windows may be coming from one process and using at most 2 connections, hence the slower processing. Firefox normally only has one process no matter how you open the new windows. IE can be 8 separate processes if you launch each separately from Explorer (ie the Start button or desktop shortcut) and not use the new window menu option or ctrl-n. --David Gilbert, Antoine wrote: Well, each process is a image rendering process. But my point is, if I launch 8 threads directly in a JVM outside of tomcat, it run faster and use 100% of the 8 CPU... If I make a Servlet (or a JSP) who will start a process each time I call it (I call it 8 times). So, the big question is, why It's fast directly on the JVM and it's slow on Tomcat ? Why with Tomcat It's not possible to use 100% of all the 8 CPU ? There is no data transfer between client and server, in both case the images are rendered on the disk. I just made this rendering test to expose the fact that I'm unable to make my tomcat use efficiently all my CPU. So the big question, why these 8 processes run betters than these 8 process within Tomcat ? -Original Message- From: Alan Chaney [mailto:[EMAIL PROTECTED] Sent: 4 mai 2008 17:33 To: Tomcat Users List Subject: Re: Tomcat problem on a multiple CPU system Hi Antoine The thing to remember is that this is a system which has (at least) four main parts: 1. Tomcat 2. The operating system 3. A network connection 4. Your application (and potentially) 5. A database (but you didn't mention that) Here are some questions. 1. How do you make the connection to the servlet. Does the browser run on the same machine as the application? 2. Does you application create network traffic? If so, how many bytes are transferred to the browser? Each servlet thread will have to wait until the application has transferred all the data out. 3. What kind of disk activity does your application generate? Is it different when the app is running from the servlet? Probably somewhere your servlet threads are sleeping waiting for a resource. You could do a thread dump to see what is happening (I don't use Windows so I can't remember how you do that with the Win setup) In the end, you'll need to profile the system to work out where the bottlenecks are. You'll need to use network analysers and probably Java profilers to track down what's happening such as when packets are received, when the replies are generated and maybe profile what your app. is doing. HTH Alan Chaney Gilbert, Antoine wrote: Hi I have a 2x quad core (8 cpu units) server. If I start a java program and this one is launching (at the same time) 8 thread doing some CPU intensive jobs, all the CPU are used at 100%, and that's what I'm expecting.. But, if I am using tomcat, and I call a servlet 8 times to process these 8 jobs, it take longer to execute these same 8 jobs and all the CPU are not used at 100%, it's more like 30%... Any idea about this problem or behavior ? I'm using Tomcat 5.5.17, windows, JDK 1.6 Antoine !DSPAM:481e1bf27941527717022! - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- David Smith Network Operations Supervisor Department of Entomology Cornell University 2132 Comstock Hall Ithaca, NY 14853 Phone: (607) 255-9571 Fax: (607) 255-0940 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat problem on a multiple CPU system
I think I found the problem, but not the solution :( I have the same problem on my local 2 cpu computer, if I start Tomcat in server (-server) mode I have exactly the same problem, i.e. Tomcat doesn't want to use all CPU resources.. If I start my Tomcat in client (-client) mode, my processes run faster by using 100% of all CPU... But, my server is 64 bit, I'm using all the 64 bit stuff, and JDK 1.5 and 1.6 can only be started in server mode... But I still don't understand why it's fast without Tomcat even in server mode since this is the default and only one mode... -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: 5 mai 2008 07:26 To: Tomcat Users List Subject: Re: Tomcat problem on a multiple CPU system Gilbert, Antoine wrote: I open 8 IE on a remote computer, basically once a JSP is called, the browser is just waiting the process to be done. Use ieHttpHeaders, the AccessLogValve or similar to check when the requests are actually being sent. I suspect that, as David suggested that you have no more than two requests running in parallel. You can tweak the registry to increase the concurrent connection limit or use a test tool like JMeter to increase the number of parallel requests. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat problem on a multiple CPU system
Hi I have a 2x quad core (8 cpu units) server. If I start a java program and this one is launching (at the same time) 8 thread doing some CPU intensive jobs, all the CPU are used at 100%, and that's what I'm expecting.. But, if I am using tomcat, and I call a servlet 8 times to process these 8 jobs, it take longer to execute these same 8 jobs and all the CPU are not used at 100%, it's more like 30%... Any idea about this problem or behavior ? I'm using Tomcat 5.5.17, windows, JDK 1.6 Antoine
RE: Tomcat problem on a multiple CPU system
Well, each process is a image rendering process. But my point is, if I launch 8 threads directly in a JVM outside of tomcat, it run faster and use 100% of the 8 CPU... If I make a Servlet (or a JSP) who will start a process each time I call it (I call it 8 times). So, the big question is, why It's fast directly on the JVM and it's slow on Tomcat ? Why with Tomcat It's not possible to use 100% of all the 8 CPU ? There is no data transfer between client and server, in both case the images are rendered on the disk. I just made this rendering test to expose the fact that I'm unable to make my tomcat use efficiently all my CPU. So the big question, why these 8 processes run betters than these 8 process within Tomcat ? -Original Message- From: Alan Chaney [mailto:[EMAIL PROTECTED] Sent: 4 mai 2008 17:33 To: Tomcat Users List Subject: Re: Tomcat problem on a multiple CPU system Hi Antoine The thing to remember is that this is a system which has (at least) four main parts: 1. Tomcat 2. The operating system 3. A network connection 4. Your application (and potentially) 5. A database (but you didn't mention that) Here are some questions. 1. How do you make the connection to the servlet. Does the browser run on the same machine as the application? 2. Does you application create network traffic? If so, how many bytes are transferred to the browser? Each servlet thread will have to wait until the application has transferred all the data out. 3. What kind of disk activity does your application generate? Is it different when the app is running from the servlet? Probably somewhere your servlet threads are sleeping waiting for a resource. You could do a thread dump to see what is happening (I don't use Windows so I can't remember how you do that with the Win setup) In the end, you'll need to profile the system to work out where the bottlenecks are. You'll need to use network analysers and probably Java profilers to track down what's happening such as when packets are received, when the replies are generated and maybe profile what your app. is doing. HTH Alan Chaney Gilbert, Antoine wrote: Hi I have a 2x quad core (8 cpu units) server. If I start a java program and this one is launching (at the same time) 8 thread doing some CPU intensive jobs, all the CPU are used at 100%, and that's what I'm expecting.. But, if I am using tomcat, and I call a servlet 8 times to process these 8 jobs, it take longer to execute these same 8 jobs and all the CPU are not used at 100%, it's more like 30%... Any idea about this problem or behavior ? I'm using Tomcat 5.5.17, windows, JDK 1.6 Antoine !DSPAM:481e1bf27941527717022! - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat problem on a multiple CPU system
My english is not very good, I'll try to explain again For example, my test outside of Tomcat for(int i=0;i8;i++){ Thread t = new Thread(new Runner()); t.setDaemon(true); t.start(); if(i==7) t.join(); } My Runner class do some image rendering test... If I run this directly using Java.exe all is fine, 100% of the 8 CPU are used and it run fast.. If I create a JSP and put the Runner code in it, I open 8 browser windows to launch 8 process via Tomcat, it run slow and it's using like 30% of all CPU... My rendering process read a small geometry file on disk and render it in an Image Buffer, it's not IO intense, just pure CPU processing, no database connection, no network usage, and anyway, whatever this process do, I can run 8 of them using Java.exe and make them using the 8 CPU, but with Tomcat this is not working very well... Antoine -Original Message- From: Gilbert, Antoine Sent: 4 mai 2008 20:20 To: Tomcat Users List Subject: RE: Tomcat problem on a multiple CPU system Well, each process is a image rendering process. But my point is, if I launch 8 threads directly in a JVM outside of tomcat, it run faster and use 100% of the 8 CPU... If I make a Servlet (or a JSP) who will start a process each time I call it (I call it 8 times). So, the big question is, why It's fast directly on the JVM and it's slow on Tomcat ? Why with Tomcat It's not possible to use 100% of all the 8 CPU ? There is no data transfer between client and server, in both case the images are rendered on the disk. I just made this rendering test to expose the fact that I'm unable to make my tomcat use efficiently all my CPU. So the big question, why these 8 processes run betters than these 8 process within Tomcat ? -Original Message- From: Alan Chaney [mailto:[EMAIL PROTECTED] Sent: 4 mai 2008 17:33 To: Tomcat Users List Subject: Re: Tomcat problem on a multiple CPU system Hi Antoine The thing to remember is that this is a system which has (at least) four main parts: 1. Tomcat 2. The operating system 3. A network connection 4. Your application (and potentially) 5. A database (but you didn't mention that) Here are some questions. 1. How do you make the connection to the servlet. Does the browser run on the same machine as the application? 2. Does you application create network traffic? If so, how many bytes are transferred to the browser? Each servlet thread will have to wait until the application has transferred all the data out. 3. What kind of disk activity does your application generate? Is it different when the app is running from the servlet? Probably somewhere your servlet threads are sleeping waiting for a resource. You could do a thread dump to see what is happening (I don't use Windows so I can't remember how you do that with the Win setup) In the end, you'll need to profile the system to work out where the bottlenecks are. You'll need to use network analysers and probably Java profilers to track down what's happening such as when packets are received, when the replies are generated and maybe profile what your app. is doing. HTH Alan Chaney Gilbert, Antoine wrote: Hi I have a 2x quad core (8 cpu units) server. If I start a java program and this one is launching (at the same time) 8 thread doing some CPU intensive jobs, all the CPU are used at 100%, and that's what I'm expecting.. But, if I am using tomcat, and I call a servlet 8 times to process these 8 jobs, it take longer to execute these same 8 jobs and all the CPU are not used at 100%, it's more like 30%... Any idea about this problem or behavior ? I'm using Tomcat 5.5.17, windows, JDK 1.6 Antoine !DSPAM:481e1bf27941527717022! - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Undeploying problem with Tomcat 5.5 and Log4J
Hi list I deploy an application WAR on a Tomcat 5.5 instance. This application use Log4j (via commons-logging) and create some logs in a file within the related Web app directory (/webapps/myWebApp). The file is defined by a file appender tag in my log4j.xml file. The problem is when I undeploy this Web app, my Web app directory can't be deleted because of the log file; it seems to be locked by Tomcat. Any idea?
RE: Undeploying problem with Tomcat 5.5 and Log4J
I'm not sure I understand. Calling shutdown within a finalize() of my objects ? Does this will cause problem to the other Web apps running within the tomcat instance ? -Original Message- From: Mikolaj Rydzewski [mailto:[EMAIL PROTECTED] Sent: January 3, 2007 10:52 AM To: Tomcat Users List Subject: Re: Undeploying problem with Tomcat 5.5 and Log4J Gilbert, Antoine wrote: I deploy an application WAR on a Tomcat 5.5 instance. This application use Log4j (via commons-logging) and create some logs in a file within the related Web app directory (/webapps/myWebApp). The file is defined by a file appender tag in my log4j.xml file. It's a good practice to avoid writing files inside application's directory. It's also a good practice to have separate directory for logfiles, i.e. ${CATALINA_HOME}/logs. The problem is when I undeploy this Web app, my Web app directory can't be deleted because of the log file; it seems to be locked by Tomcat. Try to call shutdown() http://logging.apache.org/log4j/docs/api/org/apache/log4j/LogManager.htm l#shutdown() in contextDestroyed event in servlet context listener. -- Mikolaj Rydzewski [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
commons-digester.jar locking issues using struts default library
Hi list, I have a Web application under NetBeans 5.5 using default Struts library 1.2.9 with the built-in Tomcat 5.5.17 For some reasons the file commons-digester seem to always be locked by this Tomcat; I can't clean and build my application while Tomcat is running. One more thing annoying I suspect to be related with that jar locking issue: When I do some changes to my Web application, NetBeans try to redeploy the application and it often froze... the run application output window showing only: Undeploying ... undeploy?path=/myApp In-place deployment at D:\Dev\... I don't want to use the antiJARLocking attribute because the deploy-undeploy time become very long... Anyone have an idea how to resolve my issue? Antoine
DataSourceRealm vs DataSource
Hi I have a data source and a data source realm using this data source. Both are defined in the context. It seems the realm is unable to reference the data source. I get this error message: ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/pushnse e-trunc]][15-11-2006 15:08:16]: Exception performing authentication javax.naming.NameNotFoundException: Name pushnsee is not bound in this Context Here is an example of what I'm trying to do Resource name=pushnsee auth=Container type=javax.sql.DataSource driverClassName=com.lutris.instantdb.jdbc.idbDriver url=jdbc:idb:D:/Dev/ultimate/data/db/admin.prp username=PUBLIC password=PUBLIC maxActive=10 maxIdle=5 maxWait=3/ Realm className=org.apache.catalina.realm.DataSourceRealm dataSourceName=pushnsee userTable=pnsUsers userNameCol=userLogin userCredCol=password userRoleTable=pnsProfilesRolesAgg roleNameCol=roleName/
RE: DataSourceRealm vs DataSource
No matter, found my problem, had to set localDataSource=true in my realm Have a nice day! -Original Message- From: Gilbert, Antoine Sent: November 15, 2006 3:22 PM To: Tomcat Users List Cc: Siino, Daniel Subject: DataSourceRealm vs DataSource Hi I have a data source and a data source realm using this data source. Both are defined in the context. It seems the realm is unable to reference the data source. I get this error message: ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/pushnse e-trunc]][15-11-2006 15:08:16]: Exception performing authentication javax.naming.NameNotFoundException: Name pushnsee is not bound in this Context Here is an example of what I'm trying to do Resource name=pushnsee auth=Container type=javax.sql.DataSource driverClassName=com.lutris.instantdb.jdbc.idbDriver url=jdbc:idb:D:/Dev/ultimate/data/db/admin.prp username=PUBLIC password=PUBLIC maxActive=10 maxIdle=5 maxWait=3/ Realm className=org.apache.catalina.realm.DataSourceRealm dataSourceName=pushnsee userTable=pnsUsers userNameCol=userLogin userCredCol=password userRoleTable=pnsProfilesRolesAgg roleNameCol=roleName/ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: jsessionid
I tried too, no success :p -Original Message- From: Marc Farrow [mailto:[EMAIL PROTECTED] Sent: May 26, 2006 9:16 AM To: Tomcat Users List Subject: Re: jsessionid Oh yeah! Parameters are case sensitive. You need to make sure the case is the same as what is produced automatically. I don't recall it being all lowercase. On 5/26/06, Gilbert, Antoine [EMAIL PROTECTED] wrote: Tried these without success http://myurl;jsessionid=xx?otherparams http://myurl?jsessionid=xxotherparams http://myurl?otherparams;jsessionid=xx -Original Message- From: Marc Farrow [mailto:[EMAIL PROTECTED] Sent: May 26, 2006 9:10 AM To: Tomcat Users List Subject: Re: jsessionid should not the jsessionid be just another parameter like the rest? have you tried this? http://myurl?jsessionid=xxotherparams On 5/26/06, Gilbert, Antoine [EMAIL PROTECTED] wrote: Hi I have a problem related to http sessions. I have an image tag in a page. Using JavaScript I change the source of the image and calling a servlet hosted by tomcat 5. In this particular case I have to specify the jsessionid in the url to bind the call to an existing session. http://myurl;jsessionid=xx?otherparams http://myurl;jsessionid=xx/?otherparams =... I don't know why, but this is not working. It seem to be on a different session than the existing one. -- Marc Farrow - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Marc Farrow - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
system.out
How to redirect system.out and system.err to a file to a specific location and with a specific name ?
common-compress
Hi Where I can find the jar of this project? Unable to find it there http://jakarta.apache.org/commons/sandbox/compress/
file servlet
I'm using tomcat 5.5 Any way to make tomcat able to serve zip and video files ? without having to write code