Re: Slow on Linux
I have read that Suse linux team has been working closely with AMD to support AMD64, and I am going to try their commercial product (professional edition, $130). I know that SUN plan to have an AMD64 version for the JDK 1.5, which should be next year. The reason for choosing the Linux OS is not Java, but the database. I plan to use PostgreSQL 7.4, and they have a builds for suse x86_64, so it looks promising. Nikola Milutinovic wrote: Yonatan Goraly wrote: The exact execution time of that line of code is not very relevant, since the difference is between an interval I can't notice to an interval I can notice very well - should be at least a factor of x100. I just finished installing RedHat 9 (32 bit), the performance is much better, and the CPU is working much less. I guess it was something related to the Mandrake version I had. It still feels slower than what I am used to on Windows, but I have to make measurements in order to arrive at any conclusions. You're using Opteron - that is 64-bit CPU. Why not compile kernel from the source for your desired platform? Is there a JRE specifically for Opteron? Nix. - 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: Slow on Linux
Isn't this what connection pooling is all about? Wade Chandler wrote: Just wondering. Did you know that every Postgres connection creates a system process, and not a thread? PostgreSQL uses Fork. I don't use it because of this. DB Connection = Separate Process. I use Firebird. You can use Firebird 1.5 even. That's just a consideration since you are posting about performance. Wade -Original Message- From: Yonatan Goraly [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 25, 2003 3:05 AM To: Tomcat Users List Subject: Re: Slow on Linux I have read that Suse linux team has been working closely with AMD to support AMD64, and I am going to try their commercial product (professional edition, $130). I know that SUN plan to have an AMD64 version for the JDK 1.5, which should be next year. The reason for choosing the Linux OS is not Java, but the database. I plan to use PostgreSQL 7.4, and they have a builds for suse x86_64, so it looks promising. Nikola Milutinovic wrote: Yonatan Goraly wrote: The exact execution time of that line of code is not very relevant, since the difference is between an interval I can't notice to an interval I can notice very well - should be at least a factor of x100. I just finished installing RedHat 9 (32 bit), the performance is much better, and the CPU is working much less. I guess it was something related to the Mandrake version I had. It still feels slower than what I am used to on Windows, but I have to make measurements in order to arrive at any conclusions. You're using Opteron - that is 64-bit CPU. Why not compile kernel from the source for your desired platform? Is there a JRE specifically for Opteron? Nix. - 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]
Slow on Linux
I am in the process of evaluating Linux as a server platform for my application (this is my first Linux experience). The environment is: - Single AMD Opteron 1.8 GHz - Tyan motherboard with 1 GB memory - Mandrake Linux 9.2 AMD64 RC1 - SUN JDK 1.4.2_02 - Tomcat 4.29, without Apache web server The first impression is that the application is extremely slow. I found out that calling getServletConfig().getServletContext().getRequestDispatcher(url).forward(request, response); can take about 500 ms (I put one log command before the call, and the other at the beginning of the forwarded JSP page, so I know that the only call my application does between the log commands is the forward call) Please advise - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Slow on Linux
The same application is deployed on multiple Windows boxes, with excellent performance (unless there is a heavy DB query involved, with a fast network and client machine the response seems to be instant with servers that should be dwarfed by this one). As we start to provide hosted services, the cost of the OS and DB become significant, that is the reason for evaluating Linux. I have selected AMD Opteron since I know that I can fall back to 32 bit OS if the 64 bit is not stable, and that it performs very well in that scenario. I started with Mandrake since it was possible to download ISO images, but I have also ordered an AMD 64 version of SUSE LINUX, since they have better support for that platform. Just to be able to compare, I will install Windows 2000 on the server as well. IMHO, if the performance I see is within the expected range, Windows is a much better OS for that purpose. I have read about performance issues related to Java java using OS threads in Linux, that should be resolved in the 2.6 version of the kernel - might that be related? Red hat have published that they have a solution implemented in their current products, the only problem is that the price is high Shapira, Yoav wrote: Howdy, First of all, how fast was the forward call on another platform? OTOH, 500ms for the line of code you gave below is not that atrocious. Both the getRequestDispatcher and forward calls are not lightweight. Yoav Shapira Millennium ChemInformatics -Original Message- From: Yonatan Goraly [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 2:17 AM To: Tomcat Users List Subject: Slow on Linux I am in the process of evaluating Linux as a server platform for my application (this is my first Linux experience). The environment is: - Single AMD Opteron 1.8 GHz - Tyan motherboard with 1 GB memory - Mandrake Linux 9.2 AMD64 RC1 - SUN JDK 1.4.2_02 - Tomcat 4.29, without Apache web server The first impression is that the application is extremely slow. I found out that calling getServletConfig().getServletContext().getRequestDispatcher(url).forwar d(re quest, response); can take about 500 ms (I put one log command before the call, and the other at the beginning of the forwarded JSP page, so I know that the only call my application does between the log commands is the forward call) Please advise - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Slow on Linux
The exact execution time of that line of code is not very relevant, since the difference is between an interval I can't notice to an interval I can notice very well - should be at least a factor of x100. I just finished installing RedHat 9 (32 bit), the performance is much better, and the CPU is working much less. I guess it was something related to the Mandrake version I had. It still feels slower than what I am used to on Windows, but I have to make measurements in order to arrive at any conclusions. Shapira, Yoav wrote: Howdy, I understand and agree with your considerations. The only thing I asked was very simple: how fast does the same call perform on a different platform. Not the overall application, not DB queries, just the exact same line of code (which has four function calls). Yoav Shapira Millennium ChemInformatics -Original Message- From: Yonatan Goraly [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 2:55 PM To: Tomcat Users List Subject: Re: Slow on Linux The same application is deployed on multiple Windows boxes, with excellent performance (unless there is a heavy DB query involved, with a fast network and client machine the response seems to be instant with servers that should be dwarfed by this one). As we start to provide hosted services, the cost of the OS and DB become significant, that is the reason for evaluating Linux. I have selected AMD Opteron since I know that I can fall back to 32 bit OS if the 64 bit is not stable, and that it performs very well in that scenario. I started with Mandrake since it was possible to download ISO images, but I have also ordered an AMD 64 version of SUSE LINUX, since they have better support for that platform. Just to be able to compare, I will install Windows 2000 on the server as well. IMHO, if the performance I see is within the expected range, Windows is a much better OS for that purpose. I have read about performance issues related to Java java using OS threads in Linux, that should be resolved in the 2.6 version of the kernel - might that be related? Red hat have published that they have a solution implemented in their current products, the only problem is that the price is high Shapira, Yoav wrote: Howdy, First of all, how fast was the forward call on another platform? OTOH, 500ms for the line of code you gave below is not that atrocious. Both the getRequestDispatcher and forward calls are not lightweight. Yoav Shapira Millennium ChemInformatics -Original Message- From: Yonatan Goraly [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 2:17 AM To: Tomcat Users List Subject: Slow on Linux I am in the process of evaluating Linux as a server platform for my application (this is my first Linux experience). The environment is: - Single AMD Opteron 1.8 GHz - Tyan motherboard with 1 GB memory - Mandrake Linux 9.2 AMD64 RC1 - SUN JDK 1.4.2_02 - Tomcat 4.29, without Apache web server The first impression is that the application is extremely slow. I found out that calling getServletConfig().getServletContext().getRequestDispatcher(url).forw ar d(re quest, response); can take about 500 ms (I put one log command before the call, and the other at the beginning of the forwarded JSP page, so I know that the only call my application does between the log commands is the forward call) Please advise - 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] - 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
Re: Allocated instances
I was at that customer today, and disabled the CPU hyper threading feature. Tomcat and the application seems to work normally now. I sent the thread dumps to myself, but unfortunately they didn't arrive. Not sure it is still relevant. Shapira, Yoav wrote: Howdy, At this particular installation, each time I shut down Tomcat, I get a message that is waiting for x instance(s) to be deallocated - can get to It'd be useful to know instances of what class ;) Can the customer, or you, reproduce this problem easily? If so, you can run the app inside a profiler or another tool that will give you a heap snapshot showing what those instances are. Since it is a standard configuration that didn't cause any problems so far, I don't think it has anything to do with the application code. Maybe, maybe not. It's impossible to rule out the application code without further information. legacy HTTP1.1 connector - same behavior. A thread dump shows various threads as locked (don't have it with me now) - but I understood that it doesn't necessarily implies a deadlock. It doesn't necessarily mean a deadlock, you're right. But it could mean a deadlock, and it could be very helpful in determining what's causing problems. If you post the thread dump we'll help analyze it... ;) Yoav Shapira 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]
Re: Allocated instances
The thread dumps are attached Shapira, Yoav wrote: Howdy, Very interesting, actually... Post the thread dumps if you can... Yoav Shapira Millennium ChemInformatics -Original Message- From: Yonatan Goraly [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 05, 2003 2:05 AM To: Tomcat Users List Subject: Re: Allocated instances I was at that customer today, and disabled the CPU hyper threading feature. Tomcat and the application seems to work normally now. I sent the thread dumps to myself, but unfortunately they didn't arrive. Not sure it is still relevant. Shapira, Yoav wrote: Howdy, At this particular installation, each time I shut down Tomcat, I get a message that is waiting for x instance(s) to be deallocated - can get to It'd be useful to know instances of what class ;) Can the customer, or you, reproduce this problem easily? If so, you can run the app inside a profiler or another tool that will give you a heap snapshot showing what those instances are. Since it is a standard configuration that didn't cause any problems so far, I don't think it has anything to do with the application code. Maybe, maybe not. It's impossible to rule out the application code without further information. legacy HTTP1.1 connector - same behavior. A thread dump shows various threads as locked (don't have it with me now) - but I understood that it doesn't necessarily implies a deadlock. It doesn't necessarily mean a deadlock, you're right. But it could mean a deadlock, and it could be very helpful in determining what's causing problems. If you post the thread dump we'll help analyze it... ;) Yoav Shapira 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] 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] MonitorRunnable daemon prio=5 tid=0x18638b70 nid=0x960 in Object.wait() [1ac4f000..1ac4fdb0] at java.lang.Object.wait(Native Method) - waiting on 0x109ae1d8 (a org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable) at org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable.run(ThreadPool.java:503) - locked 0x109ae1d8 (a org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable) at java.lang.Thread.run(Thread.java:534) Thread-5 daemon prio=5 tid=0x1874a538 nid=0x908 runnable [1ac0f000..1ac0fdb0] at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353) - locked 0x1085d3f8 (a java.net.PlainSocketImpl) at java.net.ServerSocket.implAccept(ServerSocket.java:448) at java.net.ServerSocket.accept(ServerSocket.java:419) at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:107) at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:356) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:529) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619) at java.lang.Thread.run(Thread.java:534) Thread-4 daemon prio=5 tid=0x18551b70 nid=0x918 in Object.wait() [1abcf000..1abcfdb0] at java.lang.Object.wait(Native Method) - waiting on 0x109ae300 (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnable) at java.lang.Object.wait(Object.java:429) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:595) - locked 0x109ae300
Allocated instances
I work for a company that provides an application that is shipped pre-configured with Tomcat as a server. Until this customer, we had no issues with Tomcat. At this particular installation, each time I shut down Tomcat, I get a message that is waiting for x instance(s) to be deallocated - can get to hundreds. I have also been notified that the application didn't respond twice and had to be restarted. Since it is a standard configuration that didn't cause any problems so far, I don't think it has anything to do with the application code. This instance is deployed on an Intel platform -2 hyperthreaded Xeon CUPs, gigabit ethernet, Windows 2000 server, 2 disk RAID, MS SQL 2000 database, JSQLConnect JDBC driver, latest JDK (1.4.2_2), Tomcat 4.1.27. I tried to change JDK versions (various 1.4.1 and 1.4.2), JDBC driver vendor, and Tomcat 4.1.24 - with no success. I also tried to use the legacy HTTP1.1 connector - same behavior. A thread dump shows various threads as locked (don't have it with me now) - but I understood that it doesn't necessarily implies a deadlock. Any ideas? Yonatan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]