• Post Reply Bookmark Topic Watch Topic
  • New Topic

Bottleneck: Linux vs Windows, Poor connector config...  RSS feed

 
Tyler Alexander
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey fellas,
I am having trouble finding the bottleneck on my server. I am not familiar with Performance tools and much of the architecture of Tomcat and the Apache server. However, I am constantly learning would be much oblidged if you could give me some guidance or a point in the right direction.

I am running Tomcat 5.028 through the Apache webserver on the 'main' server, while simply running Tomcat 5.028 as stand alone on the 'test' server.

Also, the 'main' server is running on Linux Redhat ES 3.0, 1024mb RAM, dual 2.4Ghz processor, and the 'test' server is running on Windows Server 2003, 1.5 gig Ram, single 3.0Ghz processor.

In general the 'test' server is faster than the 'main' server. I'm sure there are several reasons why this is but the following is what currently concerns me:

Using the usual css and some java script I display a large quantity of data to a user. The extraction of the data takes place very quickly, but when attempting to pass it to the jsp page and then displaying it to the user there is quite a large delay. On the local server it is approx. 5 seconds. On the main server the delay is approx. 17 seconds. For now, 5 seconds is okay, but 17 seconds it way too long.

Observations:
*****
When using a simple tool like top, I've noticed the 'java' process (or JVM) is only using 2-4% of the CPU

When the page is loading, everything loads up quickly except for the section that contains the large quantity of data.
*****

What my intuition tells me is the bottleneck revolves somewhere, either when attempting to compile the dynamic jsp page, or perhaps this is a connector configuration problem. Also, if everything was optimized the 'main' server should be faster then the 'test' server correct? If you could point me in the right direction on this subject I'd be grateful as well.

I'm sorry for my lack of knowledge on the subject but any comments/help would be appreciated.

-Tyler
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The dual processor server should certainly be roughly as fast as the standalone Tomcat. The JSP compile should only affect the first query anyway. Connector configuration is an arcane area I don't know much about - which connector are you using? Also which version of Java is on these machines.
Are you giving Tomcat the same memory on the "main" server as on the standalone? How about disk activity - is there alot of paging going on?
Bill
 
Tyler Alexander
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Bill,
Thanks for the comments.

That's interesting, so when Tomcat does not run in stand alone, Tomcat runs considerably slower?

I'm using the Coyote HTTP/1.1 connector that comes with Tomcat 5.x, but perhaps there's a better one? the 'test' server is using Suns 1.5 JDK, where the 'main server is using 1.4.2. I am actually giving the "main" server more memory than the "test", or standalone, server. The "test" server is given 256 mb, and the "main" server is giving 400 mb. Do you happen to know whether assigning too much memory is a bad thing? I'm not sure how to effectivly track paging on Linux, but as a guess I would say that the paging is minimal.

-Tyler
 
M Beck
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
paging (and other) activity on Linux can be tracked with the "vmstat" command, and to some smaller extent with the "free" and/or "top" commands. google "procps" for more details.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's interesting, so when Tomcat does not run in stand alone, Tomcat runs considerably slower?

I'm using the Coyote HTTP/1.1 connector that comes with Tomcat 5.x, but perhaps there's a better one? the 'test' server is using Suns 1.5 JDK,

When Tomcat is used to handle servlets for an Apache or IIS main server there is an extra step of buffering and data transfer on both the request and response side of things through a "Connector". This will naturally slow things down some.
The Coyote connector is NOT involved with communication between Apache and Tomcat - that is probably a Connector of the AJP 1.3 or similar type.
Coyote handles direct requests to the port defined in the Connector statement.
Again, Connector configuration is an arcane area where you can get LOTS of conflicting advice that changes with the Tomcat version and connector version. I have only configured Tomcat 4 with an IIS server so you will have to seek out specific suggestions for your configuration.
I found the "Professional Apache Tomcat 5" book published by Wrox to be a great help.
Bill
Since this is all VERY Tomcat specific, this thread should move to the Tomcat forum.
[ May 04, 2005: Message edited by: William Brogden ]
 
Tyler Alexander
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see, okay thanks guys. I suppose it is a connector issue. I'll start looking into connector configurations. I am still a little concerned that the cpu is not working very hard during the loading process. Do you know of a tool, or whatever, that might help me determine what is actually going on during the loading process?

-Tyler
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!