Re: Tomcat/Java and SMP
Dan, Did you start the second connection from the same machine? Doug - Original Message - From: "Dan Foreman" <[EMAIL PROTECTED]> To: "Tomcat-User" <[EMAIL PROTECTED]> Sent: Thursday, December 02, 2004 10:40 PM Subject: Tomcat/Java and SMP Hi, I have a setup of 10 application servers using Tomcat 4/5, jsdk 1.4.2_02, SMP, win2k. In watching the performance under load I am concerned that only one CPU is being utilized at a time. To validate my theory I try hitting the application server with a request to generate a large report and then making another connection. The second connection is painfully slow and task manager only reports a 50% CPU utilization. After doing some reading on SMP/native threads and windows, I wrote a test java application that spawns n infinite loop threads from a single JVM with a delay between each creation. Sure enough one cpu (task manager reporting 50%) and then the other cpu are consumed (task manager reporting 100%). This test tells me that Java is capable of using both CPU's via native threading and some black magic in the windows dll's but that this scenario isn't happening in tomcat. Is it possible for tomcat to use more than one CPU or is there a critical flaw in my logic? -Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat/Java and SMP
The ability of Tomcat (or any other Java application) to use multiple CPUs depends on if the JVM can support multiple CPUs. Sun's JVM for Windows uses native threads which the OS can schedule across multiple CPUs. Clearly, your test application shows this. I believe Java threads are mapped one-to-one to native Windows threads. With concurrent Java threads, the OS is basically determining which processors handle which threads. If you want to see what's happening in Tomcat when this is going on, try a profiler like JProfiler. You can also press Ctrl-break in the console window to get a thread dump of the JVM. If there's any kind of blocking going on, this should help identify that. >>> [EMAIL PROTECTED] 12/2/2004 9:40:36 PM >>> Hi, I have a setup of 10 application servers using Tomcat 4/5, jsdk 1.4.2_02, SMP, win2k. In watching the performance under load I am concerned that only one CPU is being utilized at a time. To validate my theory I try hitting the application server with a request to generate a large report and then making another connection. The second connection is painfully slow and task manager only reports a 50% CPU utilization. After doing some reading on SMP/native threads and windows, I wrote a test java application that spawns n infinite loop threads from a single JVM with a delay between each creation. Sure enough one cpu (task manager reporting 50%) and then the other cpu are consumed (task manager reporting 100%). This test tells me that Java is capable of using both CPU's via native threading and some black magic in the windows dll's but that this scenario isn't happening in tomcat. Is it possible for tomcat to use more than one CPU or is there a critical flaw in my logic? -Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat/Java and SMP
Hi, Yes, my test was from my workstation with two browser windows open (separate sessions). I have also observed a 50% cpu load from tomcat on the server, hit that server while someone else was presumably generating a large report and not able to get the cpu to go above 50% yet observed slw performance. -Dan -Original Message- From: Parsons Technical Services [mailto:[EMAIL PROTECTED] Sent: Thursday, December 02, 2004 10:18 PM To: Tomcat Users List Subject: Re: Tomcat/Java and SMP Dan, Did you start the second connection from the same machine? Doug - Original Message - From: "Dan Foreman" <[EMAIL PROTECTED]> To: "Tomcat-User" <[EMAIL PROTECTED]> Sent: Thursday, December 02, 2004 10:40 PM Subject: Tomcat/Java and SMP > Hi, > > I have a setup of 10 application servers using Tomcat 4/5, jsdk 1.4.2_02, > SMP, win2k. In watching the performance under load I am > concerned that only one CPU is being utilized at a time. To validate my > theory I try hitting the application server with a request > to generate a large report and then making another connection. The second > connection is painfully slow and task manager only > reports a 50% CPU utilization. After doing some reading on SMP/native > threads and windows, I wrote a test java application that > spawns n infinite loop threads from a single JVM with a delay between each > creation. Sure enough one cpu (task manager reporting > 50%) and then the other cpu are consumed (task manager reporting 100%). > This test tells me that Java is capable of using both CPU's > via native threading and some black magic in the windows dll's but that > this scenario isn't happening in tomcat. > > Is it possible for tomcat to use more than one CPU or is there a critical > flaw in my logic? > > -Dan > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat/Java and SMP
Dan, Okay. I just wanted to make sure you had two sessions. I think it's one thread per session and wanted to ensure the test was valid. Just for grins try it from two machines. Especially if the workstations are Windows. Hate to see you chase a ghost. Beyond that I will have to bow out and let more knowledgeable ones of such things take over. Doug - Original Message - From: "Dan Foreman" <[EMAIL PROTECTED]> To: "'Tomcat Users List'" <[EMAIL PROTECTED]> Sent: Thursday, December 02, 2004 11:30 PM Subject: RE: Tomcat/Java and SMP Hi, Yes, my test was from my workstation with two browser windows open (separate sessions). I have also observed a 50% cpu load from tomcat on the server, hit that server while someone else was presumably generating a large report and not able to get the cpu to go above 50% yet observed slw performance. -Dan -Original Message- From: Parsons Technical Services [mailto:[EMAIL PROTECTED] Sent: Thursday, December 02, 2004 10:18 PM To: Tomcat Users List Subject: Re: Tomcat/Java and SMP Dan, Did you start the second connection from the same machine? Doug - Original Message - From: "Dan Foreman" <[EMAIL PROTECTED]> To: "Tomcat-User" <[EMAIL PROTECTED]> Sent: Thursday, December 02, 2004 10:40 PM Subject: Tomcat/Java and SMP Hi, I have a setup of 10 application servers using Tomcat 4/5, jsdk 1.4.2_02, SMP, win2k. In watching the performance under load I am concerned that only one CPU is being utilized at a time. To validate my theory I try hitting the application server with a request to generate a large report and then making another connection. The second connection is painfully slow and task manager only reports a 50% CPU utilization. After doing some reading on SMP/native threads and windows, I wrote a test java application that spawns n infinite loop threads from a single JVM with a delay between each creation. Sure enough one cpu (task manager reporting 50%) and then the other cpu are consumed (task manager reporting 100%). This test tells me that Java is capable of using both CPU's via native threading and some black magic in the windows dll's but that this scenario isn't happening in tomcat. Is it possible for tomcat to use more than one CPU or is there a critical flaw in my logic? -Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat/Java and SMP
Dan, U have 10 application servers on one machine or 10 application on 10 distinct machines ? Dan Foreman wrote: Hi, I have a setup of 10 application servers using Tomcat 4/5, jsdk 1.4.2_02, SMP, win2k. In watching the performance under load I am concerned that only one CPU is being utilized at a time. To validate my theory I try hitting the application server with a request to generate a large report and then making another connection. The second connection is painfully slow and task manager only reports a 50% CPU utilization. After doing some reading on SMP/native threads and windows, I wrote a test java application that spawns n infinite loop threads from a single JVM with a delay between each creation. Sure enough one cpu (task manager reporting 50%) and then the other cpu are consumed (task manager reporting 100%). This test tells me that Java is capable of using both CPU's via native threading and some black magic in the windows dll's but that this scenario isn't happening in tomcat. Is it possible for tomcat to use more than one CPU or is there a critical flaw in my logic? -Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat/Java and SMP
Hi, NTI: Not a Tomcat Issue. Parallelization depends on the VM implementation for your specific OS and might require special configuration switches: consult your JVM documentation. Yoav Shapira http://www.yoavshapira.com >-Original Message- >From: Dan Foreman [mailto:[EMAIL PROTECTED] >Sent: Thursday, December 02, 2004 10:41 PM >To: Tomcat-User >Subject: Tomcat/Java and SMP > >Hi, > >I have a setup of 10 application servers using Tomcat 4/5, jsdk 1.4.2_02, >SMP, win2k. In watching the performance under load I am >concerned that only one CPU is being utilized at a time. To validate my >theory I try hitting the application server with a request >to generate a large report and then making another connection. The second >connection is painfully slow and task manager only >reports a 50% CPU utilization. After doing some reading on SMP/native >threads and windows, I wrote a test java application that >spawns n infinite loop threads from a single JVM with a delay between each >creation. Sure enough one cpu (task manager reporting >50%) and then the other cpu are consumed (task manager reporting 100%). >This test tells me that Java is capable of using both CPU's >via native threading and some black magic in the windows dll's but that >this scenario isn't happening in tomcat. > >Is it possible for tomcat to use more than one CPU or is there a critical >flaw in my logic? > >-Dan > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] 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: Tomcat/Java and SMP
10 application servers. -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: Friday, December 03, 2004 6:53 AM To: Tomcat Users List Subject: Re: Tomcat/Java and SMP Dan, U have 10 application servers on one machine or 10 application on 10 distinct machines ? Dan Foreman wrote: > Hi, > > I have a setup of 10 application servers using Tomcat 4/5, jsdk > 1.4.2_02, SMP, win2k. In watching the performance under load I am > concerned that only one CPU is being utilized at a time. To validate > my theory I try hitting the application server with a request to > generate a large report and then making another connection. The > second connection is painfully slow and task manager only reports a > 50% CPU utilization. After doing some reading on SMP/native threads > and windows, I wrote a test java application that spawns n infinite > loop threads from a single JVM with a delay between each creation. > Sure enough one cpu (task manager reporting > 50%) and then the other cpu are consumed (task manager reporting > 100%). This test tells me that Java is capable of using both CPU's via > native threading and some black magic in the windows dll's but that this scenario isn't happening in tomcat. > > Is it possible for tomcat to use more than one CPU or is there a critical > flaw in my logic? > > -Dan > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat/Java and SMP
So these are 10 separate boxes? I think the clarification is necessary because "application server" in the context of java usually refers to the J2EE or (sometimes) servlet container. Are you taling about 10 instances of tomcat each running on their own box? >>> [EMAIL PROTECTED] 12/3/2004 11:20:55 AM >>> 10 application servers. -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: Friday, December 03, 2004 6:53 AM To: Tomcat Users List Subject: Re: Tomcat/Java and SMP Dan, U have 10 application servers on one machine or 10 application on 10 distinct machines ? Dan Foreman wrote: > Hi, > > I have a setup of 10 application servers using Tomcat 4/5, jsdk > 1.4.2_02, SMP, win2k. In watching the performance under load I am > concerned that only one CPU is being utilized at a time. To validate > my theory I try hitting the application server with a request to > generate a large report and then making another connection. The > second connection is painfully slow and task manager only reports a > 50% CPU utilization. After doing some reading on SMP/native threads > and windows, I wrote a test java application that spawns n infinite > loop threads from a single JVM with a delay between each creation. > Sure enough one cpu (task manager reporting > 50%) and then the other cpu are consumed (task manager reporting > 100%). This test tells me that Java is capable of using both CPU's via native threading and some black magic in the windows dll's but that this scenario isn't happening in tomcat. > > Is it possible for tomcat to use more than one CPU or is there a critical flaw in my logic? > > -Dan > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat/Java and SMP
Dan Foreman wrote: 10 application servers. -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: Friday, December 03, 2004 6:53 AM To: Tomcat Users List Subject: Re: Tomcat/Java and SMP Dan, U have 10 application servers on one machine or 10 application on 10 distinct machines ? Dan Foreman wrote: Hi, I have a setup of 10 application servers using Tomcat 4/5, jsdk 1.4.2_02, SMP, win2k. In watching the performance under load I am concerned that only one CPU is being utilized at a time. To validate my theory I try hitting the application server with a request to generate a large report and then making another connection. The second connection is painfully slow and task manager only reports a 50% CPU utilization. After doing some reading on SMP/native threads and windows, I wrote a test java application that spawns n infinite loop threads from a single JVM with a delay between each creation. Sure enough one cpu (task manager reporting 50%) and then the other cpu are consumed (task manager reporting 100%). This test tells me that Java is capable of using both CPU's via native threading and some black magic in the windows dll's but that this scenario isn't happening in tomcat. Is it possible for tomcat to use more than one CPU or is there a critical flaw in my logic? -Dan - 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] Hmm do you mean you have 10 webapps and/hosts? To me application servers means you are running multiple instances of tomcat which means you should have 10 different java.exe processes running. Wade - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat/Java and SMP
Yes, 10 separate boxes with a single JVM (tomcat instance) running on each box. All boxes are SMP. -Original Message- From: David Boyer [mailto:[EMAIL PROTECTED] Sent: Friday, December 03, 2004 12:32 PM To: [EMAIL PROTECTED] Subject: RE: Tomcat/Java and SMP So these are 10 separate boxes? I think the clarification is necessary because "application server" in the context of java usually refers to the J2EE or (sometimes) servlet container. Are you taling about 10 instances of tomcat each running on their own box? >>> [EMAIL PROTECTED] 12/3/2004 11:20:55 AM >>> 10 application servers. -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: Friday, December 03, 2004 6:53 AM To: Tomcat Users List Subject: Re: Tomcat/Java and SMP Dan, U have 10 application servers on one machine or 10 application on 10 distinct machines ? Dan Foreman wrote: > Hi, > > I have a setup of 10 application servers using Tomcat 4/5, jsdk > 1.4.2_02, SMP, win2k. In watching the performance under load I am > concerned that only one CPU is being utilized at a time. To validate > my theory I try hitting the application server with a request to > generate a large report and then making another connection. The > second connection is painfully slow and task manager only reports a > 50% CPU utilization. After doing some reading on SMP/native threads > and windows, I wrote a test java application that spawns n infinite > loop threads from a single JVM with a delay between each creation. > Sure enough one cpu (task manager reporting > 50%) and then the other cpu are consumed (task manager reporting > 100%). This test tells me that Java is capable of using both CPU's via native threading and some black magic in the windows dll's but that this scenario isn't happening in tomcat. > > Is it possible for tomcat to use more than one CPU or is there a critical flaw in my logic? > > -Dan > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat/Java and SMP
Dan Foreman wrote: Yes, 10 separate boxes with a single JVM (tomcat instance) running on each box. All boxes are SMP. -Original Message- From: David Boyer [mailto:[EMAIL PROTECTED] Sent: Friday, December 03, 2004 12:32 PM To: [EMAIL PROTECTED] Subject: RE: Tomcat/Java and SMP So these are 10 separate boxes? I think the clarification is necessary because "application server" in the context of java usually refers to the J2EE or (sometimes) servlet container. Are you taling about 10 instances of tomcat each running on their own box? [EMAIL PROTECTED] 12/3/2004 11:20:55 AM >>> 10 application servers. -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: Friday, December 03, 2004 6:53 AM To: Tomcat Users List Subject: Re: Tomcat/Java and SMP Dan, U have 10 application servers on one machine or 10 application on 10 distinct machines ? Dan Foreman wrote: Hi, I have a setup of 10 application servers using Tomcat 4/5, jsdk 1.4.2_02, SMP, win2k. In watching the performance under load I am concerned that only one CPU is being utilized at a time. To validate my theory I try hitting the application server with a request to generate a large report and then making another connection. The second connection is painfully slow and task manager only reports a 50% CPU utilization. After doing some reading on SMP/native threads and windows, I wrote a test java application that spawns n infinite loop threads from a single JVM with a delay between each creation. Sure enough one cpu (task manager reporting 50%) and then the other cpu are consumed (task manager reporting 100%). This test tells me that Java is capable of using both CPU's via native threading and some black magic in the windows dll's but that this scenario isn't happening in tomcat. Is it possible for tomcat to use more than one CPU or is there a critical flaw in my logic? -Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Hmm. I would write a small test to hit my http url to cause tomcat to fire up more threads just to get a feel for it. Also maybe make a JSP page and call Runtime.getRuntime().availableProcessors() and print that to the screen and see how many processors the JVM thinks it has available. You might want to loop for something like 30seconds reading this number every few milliseconds in your jsp page and print out all unique values. You could then hit tomcat server multiple times by some client your write. Write a simple java app that spawns off multiple threads and have each thread record it's own findings from the jsp page. This could give you some insight as to whether it is working right or not. I would make the jsp page for a starter and let it run 30 seconds and record unique values and see what I end up with. Maybe then you can change it up to see how many times the value changes if you find you get weird results. Wade - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]