Re: Optimizing Tomcat with Http11NioProtocol?

2008-12-30 Thread Brian Clark
We use Hyperic HQ to monitor all of our production servers without any 
noticeable performance impact. Hyperic takes samples (remotely) from the Tomcat 
server at regular intervals--which is configurable--but no more than once per 
minute. That has been good enough for us to see when we have heap usage or 
thread usage issues. 

However, Mark makes a good point--your issue may not be heap usage or thread 
usage. It may be your app code. I suggest first seeing if you have a heap or 
thread usage problem because that is easier to diagnose and (sometimes) easier 
to fix. But if those aren't your problems, then you will probably need to use a 
profiler to find the problems. Yourkit seems to be the most popular. It is a 
commercial application, and we have used it and seen it have a significant 
impact on our production servers--as much as a 15% performance hit. We have 
also seen it cause stability issues on our servers. However, if you can afford 
to run it for 5 or 10 minutes, you can see what is going on in your code and 
possibly find your issue. 

Another lightweight profiler and troubleshooting tool is from Sun called 
VisualVM. I have found it very useful, and it's free. But it only works with 
JDK 1.6.x. It seems to have most of the features of LambdaProbe, Jmeter and 
Jconsole, as well as a bunch of others. 
https://visualvm.dev.java.net/

Brian





From: Mark Thomas 
To: Tomcat Users List 
Sent: Tuesday, December 30, 2008 4:48:47 AM
Subject: Re: Optimizing Tomcat with Http11NioProtocol?

nodje wrote:
> thanks again Brian.
> 
> one last question about monitoring, have you bean able to use Hyperic HQ on
> your production environment without significant performance reduction?
> 
> We have identified Glassbox and LambdaProbe as potentially good tools but
> never dared to put them on the production server.

I have run LambdaProbe on production without issue in the past but I doubt it
(or jconsole) is going to help you very much.

The quickest way to track down a performance bottleneck, assuming your
application logging isn't giving you enough data, is to use a profiler. A good
profiler, like YourKit (I use it because they give free copies to Tomcat
developers) will tell you how much time is spent in what code. It will place a
little more load on the server but a little more load for 5 minutes to tell you
where the real problem is will be worth it.

Other techniques (access logs, jmeter, etc) should point you in the right
direction but you'll need to do soem more work to figure out exactly where the
bottleneck(s) is(are).

Mark

> 
> -nodje
> 
> 
> Brian Clark-10 wrote:
>> Glad to be of help.
>>
>> First, I don't think that APR has anything to do with thread management. I
>> think the two things it does really well is to serve up static content and
>> provide native SSL processing. Tomcat 6 and/or Java 6 may help with though
>> (I would assume so, but I don't know for sure).
>>
>> Second, Tomcat 6 and Java 6 will provide performance
>> enhancements--particularly from the newer hotspot compiler in Java 6. If
>> using on 32-bit Windows, be sure to select the "server" version of the
>> JVM, and not the "client" JVM. By default, Tomcat will select the client
>> version on 32-bit Windows. On 64-bit Windows, there is only one version
>> available, the server version. 
>>
>> Also, as your original question started off with asking about the NIO
>> protocol, according to the benchmarking done by the authors of the
>> O'Reilly Tomcat book, the JIO connector is sometimes faster than the
>> NIO connector. I recommend getting this book and reviewing the sections
>> on performance tuning.
>>
>> Finally, I suggest using a tool to monitor your JVM and applications over
>> a period of time. We use the free Hyperic HQ monitoring tool. It uses JMX
>> to remotely monitor Java 6/Tomcat 6, and I have found it to be very
>> valuable. There is a free and a commercial version. WE use the free
>> version and it works great. Check it out at http://www.hyperic.com  We use
>> this tool to monitor heap usage and thread usage over time, so that we can
>> tell if we are hitting our upper limits on either of these constraints. 
>>
>> Brian
>>
>>
>>
>>
>> 
>> From: nodje 
>> To: users@tomcat.apache.org
>> Sent: Monday, December 29, 2008 9:10:05 PM
>> Subject: Re: Optimizing Tomcat with Http11NioProtocol?
>>
>>
>> Hi, thanks all for your answers.
>>
>> I have jconsole in place. I can monitor Tomcat and general JVM
>> information. 
>> The think is it's not easy to understand statistics.
>>
>> - How much I

Re: Optimizing Tomcat with Http11NioProtocol?

2008-12-30 Thread Mark Thomas
nodje wrote:
> thanks again Brian.
> 
> one last question about monitoring, have you bean able to use Hyperic HQ on
> your production environment without significant performance reduction?
> 
> We have identified Glassbox and LambdaProbe as potentially good tools but
> never dared to put them on the production server.

I have run LambdaProbe on production without issue in the past but I doubt it
(or jconsole) is going to help you very much.

The quickest way to track down a performance bottleneck, assuming your
application logging isn't giving you enough data, is to use a profiler. A good
profiler, like YourKit (I use it because they give free copies to Tomcat
developers) will tell you how much time is spent in what code. It will place a
little more load on the server but a little more load for 5 minutes to tell you
where the real problem is will be worth it.

Other techniques (access logs, jmeter, etc) should point you in the right
direction but you'll need to do soem more work to figure out exactly where the
bottleneck(s) is(are).

Mark

> 
> -nodje
> 
> 
> Brian Clark-10 wrote:
>> Glad to be of help.
>>
>> First, I don't think that APR has anything to do with thread management. I
>> think the two things it does really well is to serve up static content and
>> provide native SSL processing. Tomcat 6 and/or Java 6 may help with though
>> (I would assume so, but I don't know for sure).
>>
>> Second, Tomcat 6 and Java 6 will provide performance
>> enhancements--particularly from the newer hotspot compiler in Java 6. If
>> using on 32-bit Windows, be sure to select the "server" version of the
>> JVM, and not the "client" JVM. By default, Tomcat will select the client
>> version on 32-bit Windows. On 64-bit Windows, there is only one version
>> available, the server version. 
>>
>> Also, as your original question started off with asking about the NIO
>> protocol, according to the benchmarking done by the authors of the
>> O'Reilly Tomcat book, the JIO connector is sometimes faster than the
>> NIO connector. I recommend getting this book and reviewing the sections
>> on performance tuning.
>>
>> Finally, I suggest using a tool to monitor your JVM and applications over
>> a period of time. We use the free Hyperic HQ monitoring tool. It uses JMX
>> to remotely monitor Java 6/Tomcat 6, and I have found it to be very
>> valuable. There is a free and a commercial version. WE use the free
>> version and it works great. Check it out at http://www.hyperic.com  We use
>> this tool to monitor heap usage and thread usage over time, so that we can
>> tell if we are hitting our upper limits on either of these constraints. 
>>
>> Brian
>>
>>
>>
>>
>> 
>> From: nodje 
>> To: users@tomcat.apache.org
>> Sent: Monday, December 29, 2008 9:10:05 PM
>> Subject: Re: Optimizing Tomcat with Http11NioProtocol?
>>
>>
>> Hi, thanks all for your answers.
>>
>> I have jconsole in place. I can monitor Tomcat and general JVM
>> information. 
>> The think is it's not easy to understand statistics.
>>
>> - How much I am using of Xmx is definitely something I want to know
>> - how many thread are used in peak times is also something I need to know:
>> if it reaches 150, the max, how much further can I push it? Would
>> Http11NioProtocol help for this matter?
>> - How can I detect if it's the application that takes time to process
>> request or Tomcat that is at its max capacity? Number of threads and Heap
>> memory usages are probably two good indicators right?
>>
>> More generally avout Http11NioProtocol, can it be less efficient than the
>> std connector? Or is it suppose to be the next generation good-for-all
>> connector?
>>
>> We are going to update to Tomcat 6 +APR anyways. Is the APR good only for
>> static content? I thought it would help the thread management anyways.
>>
>> Thanks Brian for confirming memory usage! That's very good to know it's
>> possible to use that much memory!
>>
>> cheers
>>
>>
>> Brian Clark-10 wrote:
>>> Try using jconsole.exe (it is part of the Sun JDK) to review memory and
>>> thread usage of your JVM. That should help you narrow down where the
>>> issue
>>> is. One key thing to look at with Jconsole is the heap memory used
>>> figure.
>>> You are setting your -Xmx, but how much of it are you actually using?
>>> Heap
>>> memory used will tell you if you have a memory constraint or not. Also

Re: Optimizing Tomcat with Http11NioProtocol?

2008-12-29 Thread nodje

thanks again Brian.

one last question about monitoring, have you bean able to use Hyperic HQ on
your production environment without significant performance reduction?

We have identified Glassbox and LambdaProbe as potentially good tools but
never dared to put them on the production server.

-nodje


Brian Clark-10 wrote:
> 
> Glad to be of help.
> 
> First, I don't think that APR has anything to do with thread management. I
> think the two things it does really well is to serve up static content and
> provide native SSL processing. Tomcat 6 and/or Java 6 may help with though
> (I would assume so, but I don't know for sure).
> 
> Second, Tomcat 6 and Java 6 will provide performance
> enhancements--particularly from the newer hotspot compiler in Java 6. If
> using on 32-bit Windows, be sure to select the "server" version of the
> JVM, and not the "client" JVM. By default, Tomcat will select the client
> version on 32-bit Windows. On 64-bit Windows, there is only one version
> available, the server version. 
> 
> Also, as your original question started off with asking about the NIO
> protocol, according to the benchmarking done by the authors of the
> O'Reilly Tomcat book, the JIO connector is sometimes faster than the
> NIO connector. I recommend getting this book and reviewing the sections
> on performance tuning.
> 
> Finally, I suggest using a tool to monitor your JVM and applications over
> a period of time. We use the free Hyperic HQ monitoring tool. It uses JMX
> to remotely monitor Java 6/Tomcat 6, and I have found it to be very
> valuable. There is a free and a commercial version. WE use the free
> version and it works great. Check it out at http://www.hyperic.com  We use
> this tool to monitor heap usage and thread usage over time, so that we can
> tell if we are hitting our upper limits on either of these constraints. 
> 
> Brian
> 
> 
> 
> 
> ________
> From: nodje 
> To: users@tomcat.apache.org
> Sent: Monday, December 29, 2008 9:10:05 PM
> Subject: Re: Optimizing Tomcat with Http11NioProtocol?
> 
> 
> Hi, thanks all for your answers.
> 
> I have jconsole in place. I can monitor Tomcat and general JVM
> information. 
> The think is it's not easy to understand statistics.
> 
> - How much I am using of Xmx is definitely something I want to know
> - how many thread are used in peak times is also something I need to know:
> if it reaches 150, the max, how much further can I push it? Would
> Http11NioProtocol help for this matter?
> - How can I detect if it's the application that takes time to process
> request or Tomcat that is at its max capacity? Number of threads and Heap
> memory usages are probably two good indicators right?
> 
> More generally avout Http11NioProtocol, can it be less efficient than the
> std connector? Or is it suppose to be the next generation good-for-all
> connector?
> 
> We are going to update to Tomcat 6 +APR anyways. Is the APR good only for
> static content? I thought it would help the thread management anyways.
> 
> Thanks Brian for confirming memory usage! That's very good to know it's
> possible to use that much memory!
> 
> cheers
> 
> 
> Brian Clark-10 wrote:
>> 
>> Try using jconsole.exe (it is part of the Sun JDK) to review memory and
>> thread usage of your JVM. That should help you narrow down where the
>> issue
>> is. One key thing to look at with Jconsole is the heap memory used
>> figure.
>> You are setting your -Xmx, but how much of it are you actually using?
>> Heap
>> memory used will tell you if you have a memory constraint or not. Also
>> look at how often you have garbage collections. You'll have more of them
>> if you have a memory constraint. One more thing, be sure your min and max
>> memory configurations are the same. It's more efficient that way. 
>> 
>> On 32-bit Windows, you should be able to use 1536MB as your -Xmx size.
>> That is what we are able to use, at least using JDK 1.6.x. Upgrading to
>> 64-bit Windows and a 64-bit JVM (and 64-bit Tomcat) will allow you to use
>> as much RAM as you have available. We have a 64-bit Windows system with
>> 18
>> GB of RAM allocated to Tomcat/Java.
>> 
>> 
>> Good luck,
>> Brian
>> 
>> 
>> 
>> 
>> 
>> From: nodje 
>> To: users@tomcat.apache.org
>> Sent: Monday, December 29, 2008 2:57:14 AM
>> Subject: Optimizing Tomcat with Http11NioProtocol?
>> 
>> 
>> Hi,
>> 
>> we are still using 5.5.12 in production and our users are facing
>> increasing
>> delay

Re: Optimizing Tomcat with Http11NioProtocol?

2008-12-29 Thread Brian Clark
Glad to be of help.

First, I don't think that APR has anything to do with thread management. I 
think the two things it does really well is to serve up static content and 
provide native SSL processing. Tomcat 6 and/or Java 6 may help with though (I 
would assume so, but I don't know for sure).

Second, Tomcat 6 and Java 6 will provide performance enhancements--particularly 
from the newer hotspot compiler in Java 6. If using on 32-bit Windows, be sure 
to select the "server" version of the JVM, and not the "client" JVM. By 
default, Tomcat will select the client version on 32-bit Windows. On 64-bit 
Windows, there is only one version available, the server version. 

Also, as your original question started off with asking about the NIO
protocol, according to the benchmarking done by the authors of the
O'Reilly Tomcat book, the JIO connector is sometimes faster than the
NIO connector. I recommend getting this book and reviewing the sections
on performance tuning.

Finally, I suggest using a tool to monitor your JVM and applications over a 
period of time. We use the free Hyperic HQ monitoring tool. It uses JMX to 
remotely monitor Java 6/Tomcat 6, and I have found it to be very valuable. 
There is a free and a commercial version. WE use the free version and it works 
great. Check it out at http://www.hyperic.com  We use this tool to monitor heap 
usage and thread usage over time, so that we can tell if we are hitting our 
upper limits on either of these constraints. 

Brian





From: nodje 
To: users@tomcat.apache.org
Sent: Monday, December 29, 2008 9:10:05 PM
Subject: Re: Optimizing Tomcat with Http11NioProtocol?


Hi, thanks all for your answers.

I have jconsole in place. I can monitor Tomcat and general JVM information. 
The think is it's not easy to understand statistics.

- How much I am using of Xmx is definitely something I want to know
- how many thread are used in peak times is also something I need to know:
if it reaches 150, the max, how much further can I push it? Would
Http11NioProtocol help for this matter?
- How can I detect if it's the application that takes time to process
request or Tomcat that is at its max capacity? Number of threads and Heap
memory usages are probably two good indicators right?

More generally avout Http11NioProtocol, can it be less efficient than the
std connector? Or is it suppose to be the next generation good-for-all
connector?

We are going to update to Tomcat 6 +APR anyways. Is the APR good only for
static content? I thought it would help the thread management anyways.

Thanks Brian for confirming memory usage! That's very good to know it's
possible to use that much memory!

cheers


Brian Clark-10 wrote:
> 
> Try using jconsole.exe (it is part of the Sun JDK) to review memory and
> thread usage of your JVM. That should help you narrow down where the issue
> is. One key thing to look at with Jconsole is the heap memory used figure.
> You are setting your -Xmx, but how much of it are you actually using? Heap
> memory used will tell you if you have a memory constraint or not. Also
> look at how often you have garbage collections. You'll have more of them
> if you have a memory constraint. One more thing, be sure your min and max
> memory configurations are the same. It's more efficient that way. 
> 
> On 32-bit Windows, you should be able to use 1536MB as your -Xmx size.
> That is what we are able to use, at least using JDK 1.6.x. Upgrading to
> 64-bit Windows and a 64-bit JVM (and 64-bit Tomcat) will allow you to use
> as much RAM as you have available. We have a 64-bit Windows system with 18
> GB of RAM allocated to Tomcat/Java.
> 
> 
> Good luck,
> Brian
> 
> 
> 
> 
> 
> From: nodje 
> To: users@tomcat.apache.org
> Sent: Monday, December 29, 2008 2:57:14 AM
> Subject: Optimizing Tomcat with Http11NioProtocol?
> 
> 
> Hi,
> 
> we are still using 5.5.12 in production and our users are facing
> increasing
> delays with their requests (like way too long by now already).
> While we are not entirely sure about what's causing this (database vs Java
> application), we suppose it comes from the Java application (the database
> server never seems to be under stress).
> The CPU of the Tomcat machine doesn't seem too busy either.
> 
> Providing it comes from the Java application side (by the way, any tips on
> how to precisely identify that is more than welcome), and providing that
> the
> problems come from too many requests, would Http11NioProtocol help Tomcat
> speed up the execution? 
> It seems worth trying Http11NioProtocol before going for clustering+load
> balancing. Any advice on the matter?
> 
> Also we think that request that cannot b served in the reasonable time
> should b

Re: Optimizing Tomcat with Http11NioProtocol?

2008-12-29 Thread nodje

Hi, thanks all for your answers.

I have jconsole in place. I can monitor Tomcat and general JVM information. 
The think is it's not easy to understand statistics.

- How much I am using of Xmx is definitely something I want to know
- how many thread are used in peak times is also something I need to know:
if it reaches 150, the max, how much further can I push it? Would
Http11NioProtocol help for this matter?
- How can I detect if it's the application that takes time to process
request or Tomcat that is at its max capacity? Number of threads and Heap
memory usages are probably two good indicators right?

More generally avout Http11NioProtocol, can it be less efficient than the
std connector? Or is it suppose to be the next generation good-for-all
connector?

We are going to update to Tomcat 6 +APR anyways. Is the APR good only for
static content? I thought it would help the thread management anyways.

Thanks Brian for confirming memory usage! That's very good to know it's
possible to use that much memory!

cheers


Brian Clark-10 wrote:
> 
> Try using jconsole.exe (it is part of the Sun JDK) to review memory and
> thread usage of your JVM. That should help you narrow down where the issue
> is. One key thing to look at with Jconsole is the heap memory used figure.
> You are setting your -Xmx, but how much of it are you actually using? Heap
> memory used will tell you if you have a memory constraint or not. Also
> look at how often you have garbage collections. You'll have more of them
> if you have a memory constraint. One more thing, be sure your min and max
> memory configurations are the same. It's more efficient that way. 
> 
> On 32-bit Windows, you should be able to use 1536MB as your -Xmx size.
> That is what we are able to use, at least using JDK 1.6.x. Upgrading to
> 64-bit Windows and a 64-bit JVM (and 64-bit Tomcat) will allow you to use
> as much RAM as you have available. We have a 64-bit Windows system with 18
> GB of RAM allocated to Tomcat/Java.
> 
> 
> Good luck,
> Brian
> 
> 
> 
> 
> 
> From: nodje 
> To: users@tomcat.apache.org
> Sent: Monday, December 29, 2008 2:57:14 AM
> Subject: Optimizing Tomcat with Http11NioProtocol?
> 
> 
> Hi,
> 
> we are still using 5.5.12 in production and our users are facing
> increasing
> delays with their requests (like way too long by now already).
> While we are not entirely sure about what's causing this (database vs Java
> application), we suppose it comes from the Java application (the database
> server never seems to be under stress).
> The CPU of the Tomcat machine doesn't seem too busy either.
> 
> Providing it comes from the Java application side (by the way, any tips on
> how to precisely identify that is more than welcome), and providing that
> the
> problems come from too many requests, would Http11NioProtocol help Tomcat
> speed up the execution? 
> It seems worth trying Http11NioProtocol before going for clustering+load
> balancing. Any advice on the matter?
> 
> Also we think that request that cannot b served in the reasonable time
> should be refused. Taking into account the described behaviour with the
> default maxThreads=150 and acceptCount =100 values, shouldn't we decrease
> the acceptCount?
> Moreover the CPU on the Tomcat machine doesn't seem too busy. Is it a sign
> that we can increase maxThreads?
> 
> Tomcat is on a Windows 32bits machine, so even though the machine has 4Gb
> of
> RAM, the MAX -Xmx size  that we can be used seems to be around 1200Mb.
> Would
> a 64bits OS automatically allows for more memory usage?
> 
> A lot of questions I know, but facing big problems like we are now, we
> want
> to try anything possible to quickly relieve the pain from using the
> application!
> 
> thanks to anyone providing advice
> -nodje
> -- 
> View this message in context:
> http://www.nabble.com/Optimizing-Tomcat-with-Http11NioProtocol--tp21200419p21200419.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
>   
> 

-- 
View this message in context: 
http://www.nabble.com/Optimizing-Tomcat-with-Http11NioProtocol--tp21200419p21212597.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Optimizing Tomcat with Http11NioProtocol?

2008-12-29 Thread Brian Clark
Try using jconsole.exe (it is part of the Sun JDK) to review memory and thread 
usage of your JVM. That should help you narrow down where the issue is. One key 
thing to look at with Jconsole is the heap memory used figure. You are setting 
your -Xmx, but how much of it are you actually using? Heap memory used will 
tell you if you have a memory constraint or not. Also look at how often you 
have garbage collections. You'll have more of them if you have a memory 
constraint. One more thing, be sure your min and max memory configurations are 
the same. It's more efficient that way. 

On 32-bit Windows, you should be able to use 1536MB as your -Xmx size. That is 
what we are able to use, at least using JDK 1.6.x. Upgrading to 64-bit Windows 
and a 64-bit JVM (and 64-bit Tomcat) will allow you to use as much RAM as you 
have available. We have a 64-bit Windows system with 18 GB of RAM allocated to 
Tomcat/Java.


Good luck,
Brian





From: nodje 
To: users@tomcat.apache.org
Sent: Monday, December 29, 2008 2:57:14 AM
Subject: Optimizing Tomcat with Http11NioProtocol?


Hi,

we are still using 5.5.12 in production and our users are facing increasing
delays with their requests (like way too long by now already).
While we are not entirely sure about what's causing this (database vs Java
application), we suppose it comes from the Java application (the database
server never seems to be under stress).
The CPU of the Tomcat machine doesn't seem too busy either.

Providing it comes from the Java application side (by the way, any tips on
how to precisely identify that is more than welcome), and providing that the
problems come from too many requests, would Http11NioProtocol help Tomcat
speed up the execution? 
It seems worth trying Http11NioProtocol before going for clustering+load
balancing. Any advice on the matter?

Also we think that request that cannot b served in the reasonable time
should be refused. Taking into account the described behaviour with the
default maxThreads=150 and acceptCount =100 values, shouldn't we decrease
the acceptCount?
Moreover the CPU on the Tomcat machine doesn't seem too busy. Is it a sign
that we can increase maxThreads?

Tomcat is on a Windows 32bits machine, so even though the machine has 4Gb of
RAM, the MAX -Xmx size  that we can be used seems to be around 1200Mb. Would
a 64bits OS automatically allows for more memory usage?

A lot of questions I know, but facing big problems like we are now, we want
to try anything possible to quickly relieve the pain from using the
application!

thanks to anyone providing advice
-nodje
-- 
View this message in context: 
http://www.nabble.com/Optimizing-Tomcat-with-Http11NioProtocol--tp21200419p21200419.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


  

Re: Optimizing Tomcat with Http11NioProtocol?

2008-12-29 Thread Gregor Schneider
Hi Nodje,

first, the post from Yassine contains some very valuable information.

To me, it looks as if you're fishing in blur waters, since you've got
no idea what might be the bottleneck.

Maybe some additional hints:

- If you're serving quite some of statical content, the Apache
Portable Runtime (APR) might be a good choice:
http://tomcat.apache.org/tomcat-5.5-doc/apr.html

- you might nwat to consider upgrading Tomcat and Java to the latest
version: Java6 had some performance-optimizations, same - if I'm not
mistaken - goes for Tomcat

On Mon, Dec 29, 2008 at 9:57 AM, nodje  wrote:
>
>
> Providing it comes from the Java application side (by the way, any tips on
> how to precisely identify that is more than welcome), and providing that the
> problems come from too many requests, would Http11NioProtocol help Tomcat
> speed up the execution?

If it really comes from your application, you better check the code of
your application first trying to optimize it. Only when you're sure
that your code is clean, proceed to tune Tomcat

> It seems worth trying Http11NioProtocol before going for clustering+load
> balancing. Any advice on the matter?
>

Should be an option, however, bear in mind that you'll have to move to
Tomcat 6 since HttpNio is not available with older versions

> Also we think that request that cannot b served in the reasonable time
> should be refused. Taking into account the described behaviour with the
> default maxThreads=150 and acceptCount =100 values, shouldn't we decrease
> the acceptCount?

Since the default HttpConnector is blocking and your cpu is idleing
and your memory-usage low, I guess you rather should increase the
maxThreads and acceptCount

I suggest you play around with those parameters using JMeter as your
testing-tool. You'll find out pretty fast how those parameters affect
the overall performance

> Tomcat is on a Windows 32bits machine, so even though the machine has 4Gb of
> RAM, the MAX -Xmx size  that we can be used seems to be around 1200Mb. Would
> a 64bits OS automatically allows for more memory usage?

yes

Cheers

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

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



Re: Optimizing Tomcat with Http11NioProtocol?

2008-12-29 Thread Yassine
my suggestion would be to make sure if the delay is coming from the connector or
somewhere else, you could use some monitoring tools jmeter
[http://jakarta.apache.org/jmeter/],
 moskito [http://moskito.anotheria.net/] or just write your own filter
which logs the number of active session,
the average time of request handling,.. once you have this data the
focus will get smaller and then you can
concentrate on identifying the source of the problem either its the
connector or your application's code

hope this helps
Yassine


On Mon, Dec 29, 2008 at 9:57 AM, nodje  wrote:
>
> Hi,
>
> we are still using 5.5.12 in production and our users are facing increasing
> delays with their requests (like way too long by now already).
> While we are not entirely sure about what's causing this (database vs Java
> application), we suppose it comes from the Java application (the database
> server never seems to be under stress).
> The CPU of the Tomcat machine doesn't seem too busy either.
>
> Providing it comes from the Java application side (by the way, any tips on
> how to precisely identify that is more than welcome), and providing that the
> problems come from too many requests, would Http11NioProtocol help Tomcat
> speed up the execution?
> It seems worth trying Http11NioProtocol before going for clustering+load
> balancing. Any advice on the matter?
>
> Also we think that request that cannot b served in the reasonable time
> should be refused. Taking into account the described behaviour with the
> default maxThreads=150 and acceptCount =100 values, shouldn't we decrease
> the acceptCount?
> Moreover the CPU on the Tomcat machine doesn't seem too busy. Is it a sign
> that we can increase maxThreads?
>
> Tomcat is on a Windows 32bits machine, so even though the machine has 4Gb of
> RAM, the MAX -Xmx size  that we can be used seems to be around 1200Mb. Would
> a 64bits OS automatically allows for more memory usage?
>
> A lot of questions I know, but facing big problems like we are now, we want
> to try anything possible to quickly relieve the pain from using the
> application!
>
> thanks to anyone providing advice
> -nodje
> --
> View this message in context: 
> http://www.nabble.com/Optimizing-Tomcat-with-Http11NioProtocol--tp21200419p21200419.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>



-- 
--
Yassine Elassad
Bonn, Germany.
Fon : +49 228 97629355
Mobile : +49 157 74519666

PEACE :
( P ) Positive ( E ) Energy ( A ) Always ( C ) Correct ( E ) Errors.

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