You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Paul, Subhro" <Su...@pseg.com> on 2015/03/29 08:52:14 UTC

Tomcat server Performance imporvement required

Dear Team,

I am an application developer from TCS and working for PSEG (https://www.pseg.com). 

You might have seen my queries which I forwarded on 12 Feb, 2015 for Tomcat server crashing issue. After that we have added some resources to the servers. Now we have two Tomcat6 servers each one is having 16GB of RAM and 8CUPS. All server are Linux 6.5 64 bit OS.

As per application architecture we have two Apache Proxy servers and two Tomcat servers. Also we have two loadbalancers, one for Proxy loadbalancing and another for Tomcat loadbalancing. So, when request comes that comes to proxy loadbalncer first then Apache Proxy server -> Tomcat loadbalancer -> Tomcat server.

Some days back on 19th and 23rd of March another incident occurs when server faced some issues again. This time none of the servers where crashed but for some highly used pages in the site, Apache proxy server started complaining Timeout which is 60 seconds. After googling we thought we could increase the Time out in Proxy but client don't accept that.

So we need some tuning parameters on Tomcat server for better performance. Below are some of the setting parameters from actual server. Ports are masked.


Initializing param:

JAVA_OPTS="${JAVA_OPTS} -Xms1024M -Xmx1024M" 
CATALINA_OPTS="${CATALINA_OPTS} -Xms1024M -Xmx1024M" 



Connector Initialization param:

<Connector port="XXXX" protocol="HTTP/1.1" 
	connectionTimeout="20000"  
	server=" "
	secure="true"
	redirectPort="YYYY" 
	maxThreads="512"/>

All other parameters are kept as default.


Also we did some load testing on the servers in Test environment and found that if we restart the Tomcat server it works absolutely fine but gradually performance decrease though the garbage collection happening and very little memory captured by "PS Old Gen'.

Is there any other parameters we can add in the servers to increase performance?

Thanks & Regards,
Subhro Paul  



-----------------------------------------
The information contained in this e-mail, including any attachment(s), is intended solely for use by the named addressee(s).  If you are not the intended recipient, or a person designated as responsible for delivering such messages to the intended recipient, you are not authorized to disclose, copy, distribute or retain this message, in whole or in part, without written authorization from PSEG.  This e-mail may contain proprietary, confidential or privileged information. If you have received this message in error, please notify the sender immediately. This notice is included in all e-mail messages leaving PSEG.  Thank you for your cooperation.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat server Performance imporvement required

Posted by André Warnier <aw...@ice-sa.com>.
Paul, Subhro wrote:
> Thanks Ameer for your reply.
> 
> What is the max value we can assign to heap space?

Under a 64-bit OS and a 64-bit JVM, as much as you want (taking into account the amount of 
memory available on the host of course).
Whether that is efficient, is another matter entirely, and depends entirely on the 
characteristics of your own systems and applications. (I am mentioning that to fend off 
your probable next question, which could be along the lines of : what should I allocate in 
my case ? Nobody else but you can answer that one, and you can answer that only after 
monitoring your system while running your applications, over a period of time).

As to how this all works : search Google for "java jvm memory management" and read one of 
the many introductions on the subject.
I find "Memory Management in the Java HotSpot™ Virtual Machine" (a PDF) to be a good one.

One more thing : on this forum, it is preferred that you do not "top post", and try to 
keep the conversation in a logical order.  See 
http://tomcat.apache.org/lists.html#tomcat-users
item #6.

> 
> Regards,
> Subhro Paul
> 
> -----Original Message-----
> From: Ameer Mawia [mailto:ameer.mawia@gmail.com] 
> Sent: Sunday, March 29, 2015 3:02 AM
> To: Tomcat Users List
> Subject: Re: Tomcat server Performance imporvement required
> 
> Email sent from outside of PSEG. Use caution before using links/attachments.
> 
> 
> On Mar 29, 2015 2:53 AM, "Paul, Subhro" <Su...@pseg.com> wrote:
>> Dear Team,
>>
>> I am an application developer from TCS and working for PSEG (
> https://www.pseg.com).
>> You might have seen my queries which I forwarded on 12 Feb, 2015 for
> Tomcat server crashing issue. After that we have added some resources to
> the servers. Now we have two Tomcat6 servers each one is having 16GB of RAM
> and 8CUPS. All server are Linux 6.5 64 bit OS.
>> As per application architecture we have two Apache Proxy servers and two
> Tomcat servers. Also we have two loadbalancers, one for Proxy loadbalancing
> and another for Tomcat loadbalancing. So, when request comes that comes to
> proxy loadbalncer first then Apache Proxy server -> Tomcat loadbalancer ->
> Tomcat server.
>> Some days back on 19th and 23rd of March another incident occurs when
> server faced some issues again. This time none of the servers where crashed
> but for some highly used pages in the site, Apache proxy server started
> complaining Timeout which is 60 seconds. After googling we thought we could
> increase the Time out in Proxy but client don't accept that.
>> So we need some tuning parameters on Tomcat server for better
> performance. Below are some of the setting parameters from actual server.
> Ports are masked.
>>
>> Initializing param:
>>
>> JAVA_OPTS="${JAVA_OPTS} -Xms1024M -Xmx1024M"
>> CATALINA_OPTS="${CATALINA_OPTS} -Xms1024M -Xmx1024M"
>>
>>
>>
>> Connector Initialization param:
>>
>> <Connector port="XXXX" protocol="HTTP/1.1"
>>         connectionTimeout="20000"
>>         server=" "
>>         secure="true"
>>         redirectPort="YYYY"
>>         maxThreads="512"/>
>>
>> All other parameters are kept as default.
>>
>>
>> Also we did some load testing on the servers in Test environment and
> found that if we restart the Tomcat server it works absolutely fine but
> gradually performance decrease though the garbage collection happening and
> very little memory captured by "PS Old Gen'.
> 
> You almost HIT the point. You have to allocate more heap space..Xmx..to
> your Tomcat JVM, OR else if you can't afford that, then obviously analyse
> your application and try reducing the memory footprint.
>> Is there any other parameters we can add in the servers to increase
> performance?
>> Thanks & Regards,
>> Subhro Paul
>>
>>
>>
>> -----------------------------------------
>>
>> The information contained in this e-mail, including any attachment(s), is
> intended solely for use by the named addressee(s).  If you are not the
> intended recipient, or a person designated as responsible for delivering
> such messages to the intended recipient, you are not authorized to
> disclose, copy, distribute or retain this message, in whole or in part,
> without written authorization from PSEG.  This e-mail may contain
> proprietary, confidential or privileged information. If you have received
> this message in error, please notify the sender immediately. This notice is
> included in all e-mail messages leaving PSEG.  Thank you for your
> cooperation.
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
> Regards,
> Ameer Mawia
> 
> 
> -----------------------------------------
> 
> The information contained in this e-mail, including any attachment(s), is intended solely for use by the named addressee(s).  If you are not the intended recipient, or a person designated as responsible for delivering such messages to the intended recipient, you are not authorized to disclose, copy, distribute or retain this message, in whole or in part, without written authorization from PSEG.  This e-mail may contain proprietary, confidential or privileged information. If you have received this message in error, please notify the sender immediately. This notice is included in all e-mail messages leaving PSEG.  Thank you for your cooperation.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Tomcat server Performance imporvement required

Posted by "Paul, Subhro" <Su...@pseg.com>.
Thanks Ameer for your reply.

What is the max value we can assign to heap space?

Regards,
Subhro Paul

-----Original Message-----
From: Ameer Mawia [mailto:ameer.mawia@gmail.com] 
Sent: Sunday, March 29, 2015 3:02 AM
To: Tomcat Users List
Subject: Re: Tomcat server Performance imporvement required

Email sent from outside of PSEG. Use caution before using links/attachments.


On Mar 29, 2015 2:53 AM, "Paul, Subhro" <Su...@pseg.com> wrote:
>
> Dear Team,
>
> I am an application developer from TCS and working for PSEG (
https://www.pseg.com).
>
> You might have seen my queries which I forwarded on 12 Feb, 2015 for
Tomcat server crashing issue. After that we have added some resources to
the servers. Now we have two Tomcat6 servers each one is having 16GB of RAM
and 8CUPS. All server are Linux 6.5 64 bit OS.
>
> As per application architecture we have two Apache Proxy servers and two
Tomcat servers. Also we have two loadbalancers, one for Proxy loadbalancing
and another for Tomcat loadbalancing. So, when request comes that comes to
proxy loadbalncer first then Apache Proxy server -> Tomcat loadbalancer ->
Tomcat server.
>
> Some days back on 19th and 23rd of March another incident occurs when
server faced some issues again. This time none of the servers where crashed
but for some highly used pages in the site, Apache proxy server started
complaining Timeout which is 60 seconds. After googling we thought we could
increase the Time out in Proxy but client don't accept that.
>
> So we need some tuning parameters on Tomcat server for better
performance. Below are some of the setting parameters from actual server.
Ports are masked.
>
>
> Initializing param:
>
> JAVA_OPTS="${JAVA_OPTS} -Xms1024M -Xmx1024M"
> CATALINA_OPTS="${CATALINA_OPTS} -Xms1024M -Xmx1024M"
>
>
>
> Connector Initialization param:
>
> <Connector port="XXXX" protocol="HTTP/1.1"
>         connectionTimeout="20000"
>         server=" "
>         secure="true"
>         redirectPort="YYYY"
>         maxThreads="512"/>
>
> All other parameters are kept as default.
>
>
> Also we did some load testing on the servers in Test environment and
found that if we restart the Tomcat server it works absolutely fine but
gradually performance decrease though the garbage collection happening and
very little memory captured by "PS Old Gen'.
>

You almost HIT the point. You have to allocate more heap space..Xmx..to
your Tomcat JVM, OR else if you can't afford that, then obviously analyse
your application and try reducing the memory footprint.
> Is there any other parameters we can add in the servers to increase
performance?
>
> Thanks & Regards,
> Subhro Paul
>
>
>
> -----------------------------------------
>
> The information contained in this e-mail, including any attachment(s), is
intended solely for use by the named addressee(s).  If you are not the
intended recipient, or a person designated as responsible for delivering
such messages to the intended recipient, you are not authorized to
disclose, copy, distribute or retain this message, in whole or in part,
without written authorization from PSEG.  This e-mail may contain
proprietary, confidential or privileged information. If you have received
this message in error, please notify the sender immediately. This notice is
included in all e-mail messages leaving PSEG.  Thank you for your
cooperation.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
Regards,
Ameer Mawia


-----------------------------------------
The information contained in this e-mail, including any attachment(s), is intended solely for use by the named addressee(s).  If you are not the intended recipient, or a person designated as responsible for delivering such messages to the intended recipient, you are not authorized to disclose, copy, distribute or retain this message, in whole or in part, without written authorization from PSEG.  This e-mail may contain proprietary, confidential or privileged information. If you have received this message in error, please notify the sender immediately. This notice is included in all e-mail messages leaving PSEG.  Thank you for your cooperation.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat server Performance imporvement required

Posted by Ameer Mawia <am...@gmail.com>.
On Mar 29, 2015 2:53 AM, "Paul, Subhro" <Su...@pseg.com> wrote:
>
> Dear Team,
>
> I am an application developer from TCS and working for PSEG (
https://www.pseg.com).
>
> You might have seen my queries which I forwarded on 12 Feb, 2015 for
Tomcat server crashing issue. After that we have added some resources to
the servers. Now we have two Tomcat6 servers each one is having 16GB of RAM
and 8CUPS. All server are Linux 6.5 64 bit OS.
>
> As per application architecture we have two Apache Proxy servers and two
Tomcat servers. Also we have two loadbalancers, one for Proxy loadbalancing
and another for Tomcat loadbalancing. So, when request comes that comes to
proxy loadbalncer first then Apache Proxy server -> Tomcat loadbalancer ->
Tomcat server.
>
> Some days back on 19th and 23rd of March another incident occurs when
server faced some issues again. This time none of the servers where crashed
but for some highly used pages in the site, Apache proxy server started
complaining Timeout which is 60 seconds. After googling we thought we could
increase the Time out in Proxy but client don't accept that.
>
> So we need some tuning parameters on Tomcat server for better
performance. Below are some of the setting parameters from actual server.
Ports are masked.
>
>
> Initializing param:
>
> JAVA_OPTS="${JAVA_OPTS} -Xms1024M -Xmx1024M"
> CATALINA_OPTS="${CATALINA_OPTS} -Xms1024M -Xmx1024M"
>
>
>
> Connector Initialization param:
>
> <Connector port="XXXX" protocol="HTTP/1.1"
>         connectionTimeout="20000"
>         server=" "
>         secure="true"
>         redirectPort="YYYY"
>         maxThreads="512"/>
>
> All other parameters are kept as default.
>
>
> Also we did some load testing on the servers in Test environment and
found that if we restart the Tomcat server it works absolutely fine but
gradually performance decrease though the garbage collection happening and
very little memory captured by "PS Old Gen'.
>

You almost HIT the point. You have to allocate more heap space..Xmx..to
your Tomcat JVM, OR else if you can't afford that, then obviously analyse
your application and try reducing the memory footprint.
> Is there any other parameters we can add in the servers to increase
performance?
>
> Thanks & Regards,
> Subhro Paul
>
>
>
> -----------------------------------------
>
> The information contained in this e-mail, including any attachment(s), is
intended solely for use by the named addressee(s).  If you are not the
intended recipient, or a person designated as responsible for delivering
such messages to the intended recipient, you are not authorized to
disclose, copy, distribute or retain this message, in whole or in part,
without written authorization from PSEG.  This e-mail may contain
proprietary, confidential or privileged information. If you have received
this message in error, please notify the sender immediately. This notice is
included in all e-mail messages leaving PSEG.  Thank you for your
cooperation.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
Regards,
Ameer Mawia

Re: Tomcat server Performance imporvement required

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Subhru,

On 3/30/15 7:40 AM, Paul, Subhro wrote:
> -----Original Message----- From: Konstantin Kolinko
> [mailto:knst.kolinko@gmail.com] Sent: Sunday, March 29, 2015 5:59
> PM To: Tomcat Users List Subject: Re: Tomcat server Performance
> imporvement required
> 
> Email sent from outside of PSEG. Use caution before using
> links/attachments.
> 
> 
> 2015-03-29 9:52 GMT+03:00 Paul, Subhro <Su...@pseg.com>:
>> Dear Team,
>> 
>> I am an application developer from TCS and working for PSEG
>> (https://www.pseg.com).
>> 
>> You might have seen my queries which I forwarded on 12 Feb, 2015
>> for Tomcat server crashing issue. After that we have added some
>> resources to the servers. Now we have two Tomcat6 servers each
>> one is having 16GB of RAM and 8CUPS. All server are Linux 6.5 64
>> bit OS.
>> 
>> As per application architecture we have two Apache Proxy servers
>> and two Tomcat servers. Also we have two loadbalancers, one for
>> Proxy loadbalancing and another for Tomcat loadbalancing. So,
>> when request comes that comes to proxy loadbalncer first then
>> Apache Proxy server -> Tomcat loadbalancer -> Tomcat server.
>> 
>> Some days back on 19th and 23rd of March another incident occurs
>> when server faced some issues again. This time none of the
>> servers where crashed but for some highly used pages in the site,
>> Apache proxy server started complaining Timeout which is 60
>> seconds. After googling we thought we could increase the Time out
>> in Proxy but client don't accept that.
>> 
>> So we need some tuning parameters on Tomcat server for better
>> performance. Below are some of the setting parameters from actual
>> server. Ports are masked.
>> 
>> 
>> Initializing param:
>> 
>> JAVA_OPTS="${JAVA_OPTS} -Xms1024M -Xmx1024M" 
>> CATALINA_OPTS="${CATALINA_OPTS} -Xms1024M -Xmx1024M"
> 
> Memory options should go into CATALINA_OPTS only, not both.
> 
> If you are using a 64-bit JVM, it needs more memory than a 32-bit
> JVM would need, as object pointers require more memory.
> 
> <...>
> 
> Best regards, Konstantin Kolinko
> 
> ---------------------------------------------------------------------
>
> 
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 
> 
> 
> Dear Team,
> 
> Thanks for your replies.
> 
> We are going to increase the heap size of CATALINA to 4GB like
> CATALINA_OPTS="${CATALINA_OPTS} -Xms4096M -Xmx4096M".

I'm not sure expanding your heap is going to help. If you aren't
getting OutOfMemoryError, then heap memory isn't your problem.

> Is it required to increase the maxThread count also as we are
> increasing the heap size? As of now the this parameter is as
> below:
> 
> maxThreads="512"

If you increase maxThreads, you will need more memory just for thread
stacks.

Your maxThreads should be adjusted based upon the amount of traffic
you need to be able to handle. If 512 threads is able to handle your
current workload, I don't see any reason to increase it.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVGVoAAAoJEBzwKT+lPKRYbhcQAIQ44P3oCPzdqxV9kKyNY0aC
Nhme+aMEEFUvvYRc4AjT8wiiXZeiums17MQG8X7oXRK+5vx+8cisLh5RkUgEcks8
kO8asDgII6W0RoIj/VVTDmhN58OlIyELpY8l3Jcb37sLStsmMGK240ESh/iaiRtU
/SPUrcEUrDO2FCJcsBPsDkZ+iHGjoQxIhSqsOCbaruI/OXz50GFfWmPhrfAGOgo9
KNHv3+gGlkA8yaWiKWZLAYtvMR9A7KjZ0ToIF3PPZ7J2l3P7UUNxsNWxB2LkBIR7
GxTmzTeffF0oXG9Bu7PtZOmktDfCNZzgHKN0dmBKC0g28GrHPec33kM/Sp5hSOuX
MmyoIBqkWOrATxpHZw99qs2Pi0ufsEqai0HJndSmge9IeXzmw9W+Fv+ajmVoXkO2
4OJ0W3Nv3TPnUqEOIWcfVxIfy5uhOWf/avuSHTjjO3y6Y/85rAIhtUpo/JtVBpLE
4XqLE3siYYZP11R4ZOiNg3OAvy8OAvRcmJiKMCvt0r1b+ZdhuAb0b8xjNU1AegAL
8bCyLHnLVPUgkHA3Fp57jjRgINYWXQfNTAt76XTb8+VqdG/1IoHpHnAP608/nAIm
ekan2u6rokxsVa3QBy7LreBHRvzxUmurdJIpwf+lNDsyUmX6XuEOEKGm40/FD23o
Npco+3b5efGtABtPcgZI
=eM96
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat server Performance imporvement required

Posted by André Warnier <aw...@ice-sa.com>.
Paul, Subhro wrote:
> 
> -----Original Message-----
> From: Konstantin Kolinko [mailto:knst.kolinko@gmail.com] 
> Sent: Sunday, March 29, 2015 5:59 PM
> To: Tomcat Users List
> Subject: Re: Tomcat server Performance imporvement required
> 
> Email sent from outside of PSEG. Use caution before using links/attachments.
> 
> 
> 2015-03-29 9:52 GMT+03:00 Paul, Subhro <Su...@pseg.com>:
>> Dear Team,
>>
>> I am an application developer from TCS and working for PSEG (https://www.pseg.com).
>>
>> You might have seen my queries which I forwarded on 12 Feb, 2015 for Tomcat server crashing issue. After that we have added some resources to the servers. Now we have two Tomcat6 servers each one is having 16GB of RAM and 8CUPS. All server are Linux 6.5 64 bit OS.
>>
>> As per application architecture we have two Apache Proxy servers and two Tomcat servers. Also we have two loadbalancers, one for Proxy loadbalancing and another for Tomcat loadbalancing. So, when request comes that comes to proxy loadbalncer first then Apache Proxy server -> Tomcat loadbalancer -> Tomcat server.
>>
>> Some days back on 19th and 23rd of March another incident occurs when server faced some issues again. This time none of the servers where crashed but for some highly used pages in the site, Apache proxy server started complaining Timeout which is 60 seconds. After googling we thought we could increase the Time out in Proxy but client don't accept that.
>>
>> So we need some tuning parameters on Tomcat server for better performance. Below are some of the setting parameters from actual server. Ports are masked.
>>
>>
>> Initializing param:
>>
>> JAVA_OPTS="${JAVA_OPTS} -Xms1024M -Xmx1024M"
>> CATALINA_OPTS="${CATALINA_OPTS} -Xms1024M -Xmx1024M"
> 
> Memory options should go into CATALINA_OPTS only, not both.
> 
> If you are using a 64-bit JVM, it needs more memory than a 32-bit JVM
> would need, as object pointers require more memory.
> 
> <...>
> 
> Best regards,
> Konstantin Kolinko
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 
> 
> 
> Dear Team,
> 
> Thanks for your replies.
> 
> We are going to increase the heap size of CATALINA to 4GB like CATALINA_OPTS="${CATALINA_OPTS} -Xms4096M -Xmx4096M".
> 
> 
> Is it required to increase the maxThread count also as we are increasing the heap size? As of now the this parameter is as below:
> 
> maxThreads="512"
> 

The size of the heap and the number of threads available to process transactions may have 
a relationship with eachother, but it is indirect, and you do not "have to" modify them in 
parallel.

In other words :
- the maxThreads parameter specifies how many independent threads (think "agents") Tomcat 
may start and have running at the same time, each one of them usually processing one HTTP 
request from one client.  It should be commensurate thus to how many HTTP requests you 
expect your server to have to service simultaneously at any given moment in time.
Which itself is a factor of :
- how many new requests your server is expected to receive over a given period of time
- and how long each request takes on average to be serviced by your server
Suppose that you expect 1000 new requests to arrive within 1 second.
And suppose that it takes on average 0.5 s to service one request.
Then you would need approximately 500 threads to do the job.
(Because the 1st request would be allocated to the first thread, etc. And after 0.5 s, the 
first thread would be free again, so it could handle the 501st request and so on).
Conversely, if it took on average 2 s to process one request, then you would need 2000 
threads to handle the load (because after 1 s, 1000 threads would be busy for at least 
another second, but 1000 new requests will arrive during that next second.)

- each of these threads will use some capacity in the Heap.  So if you have 1000 possible 
threads active at some moment, it is likely that this will use up more Heap capacity than 
if you had only 500.

And finally, memory is not the only thing which each thread is using; it also uses CPU 
time, and there is always a limit somewhere, depending on the total resources of your system.

As mentioned before, the only way to actually find out what is optimal for your system, is 
to monitor what actually is happening during a normal workload.
If the size of the Heap is not comfortable enough for the number of threads running in 
your application, the JVM will start performing more frequent Garbage Collections to free 
space on the Heap more often.  This in itself uses up some processing capacity and thus 
slows down your server, which may have the result of increasing the number of threads 
active, which may have the result of increasing the demand on memory in the Heap, etc..

A general remark : starting to play around with such parameters is a real waste of time, 
if you do not at least have some real-world measurements to back up your changes.
There is no general rule, it all depends on your particular circumstances.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Tomcat server Performance imporvement required

Posted by "Paul, Subhro" <Su...@pseg.com>.

-----Original Message-----
From: Konstantin Kolinko [mailto:knst.kolinko@gmail.com] 
Sent: Sunday, March 29, 2015 5:59 PM
To: Tomcat Users List
Subject: Re: Tomcat server Performance imporvement required

Email sent from outside of PSEG. Use caution before using links/attachments.


2015-03-29 9:52 GMT+03:00 Paul, Subhro <Su...@pseg.com>:
> Dear Team,
>
> I am an application developer from TCS and working for PSEG (https://www.pseg.com).
>
> You might have seen my queries which I forwarded on 12 Feb, 2015 for Tomcat server crashing issue. After that we have added some resources to the servers. Now we have two Tomcat6 servers each one is having 16GB of RAM and 8CUPS. All server are Linux 6.5 64 bit OS.
>
> As per application architecture we have two Apache Proxy servers and two Tomcat servers. Also we have two loadbalancers, one for Proxy loadbalancing and another for Tomcat loadbalancing. So, when request comes that comes to proxy loadbalncer first then Apache Proxy server -> Tomcat loadbalancer -> Tomcat server.
>
> Some days back on 19th and 23rd of March another incident occurs when server faced some issues again. This time none of the servers where crashed but for some highly used pages in the site, Apache proxy server started complaining Timeout which is 60 seconds. After googling we thought we could increase the Time out in Proxy but client don't accept that.
>
> So we need some tuning parameters on Tomcat server for better performance. Below are some of the setting parameters from actual server. Ports are masked.
>
>
> Initializing param:
>
> JAVA_OPTS="${JAVA_OPTS} -Xms1024M -Xmx1024M"
> CATALINA_OPTS="${CATALINA_OPTS} -Xms1024M -Xmx1024M"

Memory options should go into CATALINA_OPTS only, not both.

If you are using a 64-bit JVM, it needs more memory than a 32-bit JVM
would need, as object pointers require more memory.

<...>

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org





Dear Team,

Thanks for your replies.

We are going to increase the heap size of CATALINA to 4GB like CATALINA_OPTS="${CATALINA_OPTS} -Xms4096M -Xmx4096M".


Is it required to increase the maxThread count also as we are increasing the heap size? As of now the this parameter is as below:

maxThreads="512"

Regards,
Subhro Paul


-----------------------------------------
The information contained in this e-mail, including any attachment(s), is intended solely for use by the named addressee(s).  If you are not the intended recipient, or a person designated as responsible for delivering such messages to the intended recipient, you are not authorized to disclose, copy, distribute or retain this message, in whole or in part, without written authorization from PSEG.  This e-mail may contain proprietary, confidential or privileged information. If you have received this message in error, please notify the sender immediately. This notice is included in all e-mail messages leaving PSEG.  Thank you for your cooperation.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat server Performance imporvement required

Posted by Konstantin Kolinko <kn...@gmail.com>.
2015-03-29 9:52 GMT+03:00 Paul, Subhro <Su...@pseg.com>:
> Dear Team,
>
> I am an application developer from TCS and working for PSEG (https://www.pseg.com).
>
> You might have seen my queries which I forwarded on 12 Feb, 2015 for Tomcat server crashing issue. After that we have added some resources to the servers. Now we have two Tomcat6 servers each one is having 16GB of RAM and 8CUPS. All server are Linux 6.5 64 bit OS.
>
> As per application architecture we have two Apache Proxy servers and two Tomcat servers. Also we have two loadbalancers, one for Proxy loadbalancing and another for Tomcat loadbalancing. So, when request comes that comes to proxy loadbalncer first then Apache Proxy server -> Tomcat loadbalancer -> Tomcat server.
>
> Some days back on 19th and 23rd of March another incident occurs when server faced some issues again. This time none of the servers where crashed but for some highly used pages in the site, Apache proxy server started complaining Timeout which is 60 seconds. After googling we thought we could increase the Time out in Proxy but client don't accept that.
>
> So we need some tuning parameters on Tomcat server for better performance. Below are some of the setting parameters from actual server. Ports are masked.
>
>
> Initializing param:
>
> JAVA_OPTS="${JAVA_OPTS} -Xms1024M -Xmx1024M"
> CATALINA_OPTS="${CATALINA_OPTS} -Xms1024M -Xmx1024M"

Memory options should go into CATALINA_OPTS only, not both.

If you are using a 64-bit JVM, it needs more memory than a 32-bit JVM
would need, as object pointers require more memory.

<...>

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org