my dog learned polymorphism*
The moose likes Tomcat and the fly likes Tomcat for experts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat for experts" Watch "Tomcat for experts" New topic
Author

Tomcat for experts

Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 4908
    
  10

Good morning everybody,

Got something nice:

when we use on our server (win2000 server, Xeon cpu with HyperThreading, 3 GB RAM where the maximum is used by the JVM, approx 1600MB) jdk1.4.1_03 (sun) my web-application is like an airplane, really really fast. In this app a database is accessed with jtds, records are returned, processed and an image (gif-file) is generated.

When i use jdk1.4.2_05 or jdk1.5 on this same server with the same app, my web-app is extremely slow and even on my pc with only 512m and lot of other progs running it's faster then on server, and not with a few seconds difference but with lots of minutes.

When we looked what deeper in it and we looked at cpu-usage of server it seems that server doesn't do anything and it's going from 12% to 6% to 2% to 1% to 0% (keeping x seconds on 0%), then back again to 3%, back to 1% and again 0% for several seconds, and so on. When i do this on my pc my cpu-usage is going up to 100% and goes to 0% when work is finished.

So we did also check a lot of things:
- disabled HT, but no difference
- made a simple program that we run at server-side and had no problem to push the cpu-usage to 100%
- when we use logging to console-window of the processing of records, server was faster then without logging (the more logging, the faster)

We concluded that it was a problem with the combination of jdk-version and used hardware (cpu). So my question: is this a known issue? is this right or do you people think something different? could it be solved by installing a more recent jdk-version?

all remarks, tips, suggestions are more then welcome
thanks in advance


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12675
    
    5
What about disk usage? Is it thrashing to the swap file due to insufficient memory?
Bill


Java Resources at www.wbrogden.com
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 4908
    
  10

We tought this also, so we monitored this too and compared it with my pc and there are no differences between them. And the JVM has on the server 1.5 GB available to use, and web-app uses only 100-200 MB, so i don't see why he has to use swap-file anyway because his memory is 7.5 times bigger then what he needs.

All hardware components in server are up-to-date with latest drivers and other possible trouble makers. And don't forget: now it's jdk1.4.1_03 that's used and it runs smoothly and rapidly, without any problem with the same hardware configuration.
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 4908
    
  10

Nobody that knows a solution or has some tips, suggestions,...?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Tomcat for experts
 
Similar Threads
IE can only run 3 times with servlet(apache,Tomcat)
What else is Spring good for?
J2ME on Pocket PC
100% cpu usage while loading the records
Criteria for adding servers in a tier