• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Web app slow after migrating from WebSphere 6.1 to Tomcat 7

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have a production web app that runs just fine in WebSphere 6.1. I am trying to move this
app to Tomcat 7. Performance testing has revealed significantly (and unacceptable) slower page
response times for Tomcat. I have pinpointed the problem to the resources being served including *.js, *.css
and bitmaps, of which there aren't really that many. If I strip these resources out of the app then it
runs very fast so I know it's not about the Java frameworks (Wicket/Spring/Hibernate etc). I tried making a plain
HTML test page, and referring to the resources in the page -- this page is also really slow in performance testing.

The Tomcat instance is sitting on beefy hardware, has a significant amount of memory and threads
allocated to it. Is there something I have missed when setting up Tomcat?

Tomcat 7, JRE 6, Rehat Linux
Hardware and O/S are the same for the WebSphere and Tomcat performance tests

Thanks,
Steve
 
author
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Slowness is a common issues which comes while migration, if the application/OS/Web container are not tuned properly
Every application has its own memory requirement and it requires different JVM tuning. If your application is running slow, might be chance the JVM parameters are not tuned properly, like (max-min memory, garbage collection.
 
Bartender
Posts: 20849
125
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since the most-affected files are static data, I'd take a look at how they're being transported. It's possible that there's a difference in automated compression and/or encryption being applied to the data stream.

One of the biggest issues, however, is that when you are running SSL, Tomcat switches off client-side caching of these files (actually, Tomcat switches off caching of everything). It's a security feature, intended to ensure that man-in-in-the-middle exploits couldn't insinuate themselves into secured sessions by being pulled in prior to entering secure mode. Whether the benefit is worth the pain has been debated, though. I was being punished so badly that I added a servlet filter to my most-impacted webapp that overrode this behavior when used in conjunction with certain settings in Tomcat's server configuration.
 
Steve Hiller
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@tanuj -- Does your book address this kind of problem?

@Tim -- Thanks for the advice. We are not using SSL while performance testing.
 
Steve Hiller
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@tanuj -- Bought your book today, I'll read it over the weekend.
 
tanuj khare
author
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Steve

Yes, there is one complete chapter dedicated on troubleshooting of tomcat issues; this problem is also covered in it
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!