You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Richard Reyes <ri...@voxsant.com> on 2007/12/22 15:07:34 UTC
Enhancing Tomcat Speed
Hi All,
Please send suggestions on how to improve the tomcat performance.
Thanks in advance.
Richard
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Enhancing Tomcat Speed
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Richard,
Richard Reyes wrote:
> Please send suggestions on how to improve the tomcat performance.
Just turn off the "suck" bit:
$ JAVA_OPTS=-Dsuck=false
$ $TOMCAT_HOME/bin/startup.sh
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkdt7HMACgkQ9CaO5/Lv0PBM0ACgibnZYZeyi3xAkRnsPXKgxH4k
a6EAni7wAMFiKcy/yg85Wze6l6v0EAyK
=nAPv
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Enhancing Tomcat Speed
Posted by Alan Chaney <al...@compulsivecreative.com>.
Hi Richard
Please could you help by giving us some more information:
1. Which version of tomcat?
2. What O/S?
3. What kind of application? Does it read information from a database -
if so, which one?
4. Is it proprietary or did you write it yourself?
5. What is your current performance and by how much do you want to
improve it?
I think it would help if you were more clear as to what aspect of
performance you wanted to improve:
1. Page loading time (ie from the browser GET to when the page is fully
rendered) ("response time")
2. Page throughput - the number of visits a second your server can
handle before response time lengthens.
The 'loading of the webapp' you mention below could refer to the time
taken to do the initial classloading - is that your problem? But then
why talk about reducing image size?
There is rarely a magic bullet to fixing performance problems in complex
systems and a webapp is a complex system.
Regards
Alan Chaney
Richard Reyes wrote:
>
> Hi All,
>
> Sorry a bit unclear. I meant to speed up the loading of the webapp.
> Aside from increasing the min/max jvm heap size, trimming down the
> size of the htmls and the images and toggling the class reloading in
> server.xml. I was hoping you guys could give some more tips.
>
> I have not had the chance to try the heap size and class reloading
> thing, but would still like to learn on other might be areas of
> improvements.
>
> Richard
>
> Andrew Miehs wrote:
>>
>> On 22/12/2007, at 3:45 PM, Pid wrote:
>>
>>> Richard Reyes wrote:
>>>> Hi All,
>>>>
>>>> Please send suggestions on how to improve the tomcat performance.
>>>
>>> Do you mean that you want to improve Tomcat's performance, or the web
>>> application(s) you are deploying on Tomcat?
>>
>> I think he wants us to do his homework....
>>
>> A) Buy a faster machine
>> B) Buy better programmers
>> C) Work out 'what' is slow - App CPU Bound, Disk Bound, Just hangs?!
>>
>> Andrew
>>
>>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
> !DSPAM:476d382b271894221013052!
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: AW: Enhancing Tomcat Speed
Posted by Rakesh Rajan <ra...@gmail.com>.
Read about memcached <http://www.danga.com/memcached/> in case you have more
than one webnode.
-Rakesh
On Dec 24, 2007 2:40 AM, Pid <p...@pidster.com> wrote:
> Richard G. Reyes wrote:
> > Hi Pid, All,
> >
> > Hope you could tell me more about caching...isn't it automatic in
> tomcat?
>
> Not until you've profiled your app and tuned the DB accesses - which is
> where most of your slowdown is likely to be.
>
> Caching is esoteric and application specific, and can refer to static
> files as well as objects. Don't assume it's a magic bullet, sort out
> the basics of your app first.
>
> p
>
>
>
> > Pid wrote:
> >>
> >> And look, we haven't even mentioned caching yet...
> >>
> >> p
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Re: AW: Enhancing Tomcat Speed
Posted by Pid <p...@pidster.com>.
Richard G. Reyes wrote:
> Hi Pid, All,
>
> Hope you could tell me more about caching...isn't it automatic in tomcat?
Not until you've profiled your app and tuned the DB accesses - which is
where most of your slowdown is likely to be.
Caching is esoteric and application specific, and can refer to static
files as well as objects. Don't assume it's a magic bullet, sort out
the basics of your app first.
p
> Pid wrote:
>>
>> And look, we haven't even mentioned caching yet...
>>
>> p
>>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: AW: Enhancing Tomcat Speed
Posted by "Richard G. Reyes" <ri...@voxsant.com>.
Hi Pid, All,
Hope you could tell me more about caching...isn't it automatic in tomcat?
Pid wrote:
>
> And look, we haven't even mentioned caching yet...
>
> p
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: AW: Enhancing Tomcat Speed
Posted by Pid <p...@pidster.com>.
Richard Reyes wrote:
>
> Hi All,
>
> - Version: 5.5 but would upgrading to 6 be wise?
> - OS: Cent OS
> - Kind of App: Webapp with MySQL DB. Have you guys heard of Appfuse.
> - We created it using Spring and Webwork
> - I'm comparing my current performance to the performance when its
> deployed only on my devt desktop because it is so much slower now
> thinking the that it has a good upstream bandwidth allocation and a
> decent box to run on (dual core xenon and 4g ram).
> - I definitely would like to improve page loading time and page throughput.
Appfuse and Spring and Webwork?
I'm not completely familiar with them all, but I'd have thought you'd
get away with using just one framework.
Java6 & Tomcat6 are faster together, in my experience, than lower
version number combos. Having said that, it's most likely that you will
improve your app, rather than Tomcat.
There are other easy gains that can be made depending on how you've
coded your app. If, for example, you're not using a database connection
pool, it can be improved considerably by doing so.
You won't gain performance in terms of raw speed by tuning the jvm
memory parameters, but you will decrease the chance of OOMs and lengthy
gc pauses. 4Gb of RAM is no use until you've set it (sensibly).
You should consider profiling your app (google is your friend), or
adding some simple logging to see where the delays are arising.
And look, we haven't even mentioned caching yet...
p
> Regards,
> Richard
>
> Alan Chaney wrote:
>> Permgen space is used by the ClassLoader to hold copies of classes. It
>> is unlikely that increasing the permgen space will produce a
>> noticeable improvement in performance. Versions of tomcat can exhibit
>> problems with java.lang.OutOfMemoryError: PermGen space failure -
>> there is a good article here discussing some of the issues.
>> http://www.jroller.com/agileanswers/entry/preventing_java_s_java_lang
>>
>> I had problems with tomcat 5.5 following reloading of web apps which
>> were largely overcome by increasing the perm gen space and being
>> prepared to restart the JVM occasionally. So far, I've had no problems
>> with Tomcat 6, but then I have also changed a number of other factors.
>> However, I reiterate that this won't affect the performance of a
>> running application - it will either run or you will get a OOM error.
>>
>> I still think that it would be helpful for Richard to explain exactly
>> what aspect of performance he is trying to improve. Deployment?
>> Startup? Page Response Time? Page Throughput? Memory Footprint?
>>
>> Regards
>>
>> Alan Chaney
>>
>>
>> Schadler Johann wrote:
>>> Richard Reyes wrote:
>>>
>>>> I have not had the chance to try the heap size and class reloading
>>>> thing, but would still like to learn on other might be areas of
>>>> improvements.
>>>>
>>>
>>> To be able to influence the memory consumption (e.g. to tune the
>>> PermGen-Space) is the main criteria and most efficient way to speed
>>> up your
>>> application.
>>> Johann
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>> !DSPAM:476d6f98308891721312192!
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: AW: Enhancing Tomcat Speed
Posted by Richard Reyes <ri...@voxsant.com>.
Hi All,
- Version: 5.5 but would upgrading to 6 be wise?
- OS: Cent OS
- Kind of App: Webapp with MySQL DB. Have you guys heard of Appfuse.
- We created it using Spring and Webwork
- I'm comparing my current performance to the performance when its
deployed only on my devt desktop because it is so much slower now
thinking the that it has a good upstream bandwidth allocation and a
decent box to run on (dual core xenon and 4g ram).
- I definitely would like to improve page loading time and page throughput.
Regards,
Richard
Alan Chaney wrote:
> Permgen space is used by the ClassLoader to hold copies of classes. It
> is unlikely that increasing the permgen space will produce a
> noticeable improvement in performance. Versions of tomcat can exhibit
> problems with java.lang.OutOfMemoryError: PermGen space failure -
> there is a good article here discussing some of the issues.
> http://www.jroller.com/agileanswers/entry/preventing_java_s_java_lang
>
> I had problems with tomcat 5.5 following reloading of web apps which
> were largely overcome by increasing the perm gen space and being
> prepared to restart the JVM occasionally. So far, I've had no problems
> with Tomcat 6, but then I have also changed a number of other factors.
> However, I reiterate that this won't affect the performance of a
> running application - it will either run or you will get a OOM error.
>
> I still think that it would be helpful for Richard to explain exactly
> what aspect of performance he is trying to improve. Deployment?
> Startup? Page Response Time? Page Throughput? Memory Footprint?
>
> Regards
>
> Alan Chaney
>
>
> Schadler Johann wrote:
>> Richard Reyes wrote:
>>
>>> I have not had the chance to try the heap size and class reloading
>>> thing, but would still like to learn on other might be areas of
>>> improvements.
>>>
>>
>> To be able to influence the memory consumption (e.g. to tune the
>> PermGen-Space) is the main criteria and most efficient way to speed
>> up your
>> application.
>> Johann
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>> !DSPAM:476d6f98308891721312192!
>>
>>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: AW: Enhancing Tomcat Speed
Posted by Alan Chaney <al...@compulsivecreative.com>.
Permgen space is used by the ClassLoader to hold copies of classes. It
is unlikely that increasing the permgen space will produce a noticeable
improvement in performance. Versions of tomcat can exhibit problems with
java.lang.OutOfMemoryError: PermGen space failure - there is a good
article here discussing some of the issues.
http://www.jroller.com/agileanswers/entry/preventing_java_s_java_lang
I had problems with tomcat 5.5 following reloading of web apps which
were largely overcome by increasing the perm gen space and being
prepared to restart the JVM occasionally. So far, I've had no problems
with Tomcat 6, but then I have also changed a number of other factors.
However, I reiterate that this won't affect the performance of a running
application - it will either run or you will get a OOM error.
I still think that it would be helpful for Richard to explain exactly
what aspect of performance he is trying to improve. Deployment? Startup?
Page Response Time? Page Throughput? Memory Footprint?
Regards
Alan Chaney
Schadler Johann wrote:
> Richard Reyes wrote:
>
>
>> I have not had the chance to try the heap size and class reloading
>> thing, but would still like to learn on other might be areas of
>> improvements.
>>
>
> To be able to influence the memory consumption (e.g. to tune the
> PermGen-Space) is the main criteria and most efficient way to speed up your
> application.
>
> Johann
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
> !DSPAM:476d6f98308891721312192!
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
AW: Enhancing Tomcat Speed
Posted by Schadler Johann <ao...@aon.at>.
Richard Reyes wrote:
> I have not had the chance to try the heap size and class reloading
> thing, but would still like to learn on other might be areas of
> improvements.
To be able to influence the memory consumption (e.g. to tune the
PermGen-Space) is the main criteria and most efficient way to speed up your
application.
Johann
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Problem in Tomcat 5.5 Server
Posted by "Richard G. Reyes" <ri...@voxsant.com>.
Hi Guys,
We have setup 3 tomcat server for 1 domain name using DNS Round-robin.
Our problem is sometimes the tomcat servers are not responding, we are
monitoring the bandwidth and cpu usage and its not high during those
slow response times. Hope you guys have any ideas on this...
Tia!
Richard
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Enhancing Tomcat Speed
Posted by Richard Reyes <ri...@voxsant.com>.
Hi All,
Sorry a bit unclear. I meant to speed up the loading of the webapp.
Aside from increasing the min/max jvm heap size, trimming down the size
of the htmls and the images and toggling the class reloading in
server.xml. I was hoping you guys could give some more tips.
I have not had the chance to try the heap size and class reloading
thing, but would still like to learn on other might be areas of
improvements.
Richard
Andrew Miehs wrote:
>
> On 22/12/2007, at 3:45 PM, Pid wrote:
>
>> Richard Reyes wrote:
>>> Hi All,
>>>
>>> Please send suggestions on how to improve the tomcat performance.
>>
>> Do you mean that you want to improve Tomcat's performance, or the web
>> application(s) you are deploying on Tomcat?
>
> I think he wants us to do his homework....
>
> A) Buy a faster machine
> B) Buy better programmers
> C) Work out 'what' is slow - App CPU Bound, Disk Bound, Just hangs?!
>
> Andrew
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Enhancing Tomcat Speed
Posted by Andrew Miehs <an...@2sheds.de>.
On 22/12/2007, at 3:45 PM, Pid wrote:
> Richard Reyes wrote:
>> Hi All,
>>
>> Please send suggestions on how to improve the tomcat performance.
>
> Do you mean that you want to improve Tomcat's performance, or the web
> application(s) you are deploying on Tomcat?
I think he wants us to do his homework....
A) Buy a faster machine
B) Buy better programmers
C) Work out 'what' is slow - App CPU Bound, Disk Bound, Just hangs?!
Andrew
Re: Enhancing Tomcat Speed
Posted by Pid <p...@pidster.com>.
Richard Reyes wrote:
> Hi All,
>
> Please send suggestions on how to improve the tomcat performance.
Do you mean that you want to improve Tomcat's performance, or the web
application(s) you are deploying on Tomcat?
p
> Thanks in advance.
> Richard
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org