RE: tomcat CPU utilization pegged...total CPU only 50%

2005-02-08 Thread Kevin Williams


> -Original Message-
> From: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
> Sent: Monday, February 07, 2005 10:04 PM
> To: Tomcat Users List
> Subject: RE: tomcat CPU utilization pegged...total CPU only 50%
> [bcc][faked-from][bayes]
> Importance: Low
> 
> > From: Kevin Williams [mailto:[EMAIL PROTECTED]
> > Subject: RE: tomcat CPU utilization pegged...total CPU only 50%
> >
> > The two Xeon CPU's are hyperthreaded to represent 4 CPU's
> > on the machine.  I'm not sure exactly how tomcat/java
> > interact with this, but it was not favorable.
> 
> Other than for determining the number of threads to use for parallel
GC,
> the JVM does not care how many CPUs there are.  I don't know what
Windows
> returns for the number of CPUs installed when hyperthreading is
enabled,
> but you can determine that with the Runtime.availableProcessors()
method.
> 
> You really should be measuring performance by some measurement of
actual
> workload completed, not CPU utilization.  Turning off hyperthreading
may
> actually reduce your overall throughput.  (Then again, it might make
it
> better - very application dependent.)
> 
> 

You're right.  I was measuring average response time.  The CPU was just
the bottleneck.  My average response time under a specified user load
actually decreased with hyperthreading off.  My next step is to start
analyzing the code:)

Thanks for the pointer!

Kevin Williams

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat CPU utilization pegged...total CPU only 50%

2005-02-07 Thread Caldarale, Charles R
> From: Kevin Williams [mailto:[EMAIL PROTECTED]
> Subject: RE: tomcat CPU utilization pegged...total CPU only 50%
> 
> The two Xeon CPU's are hyperthreaded to represent 4 CPU's 
> on the machine.  I'm not sure exactly how tomcat/java 
> interact with this, but it was not favorable.

Other than for determining the number of threads to use for parallel GC, the 
JVM does not care how many CPUs there are.  I don't know what Windows returns 
for the number of CPUs installed when hyperthreading is enabled, but you can 
determine that with the Runtime.availableProcessors() method.

You really should be measuring performance by some measurement of actual 
workload completed, not CPU utilization.  Turning off hyperthreading may 
actually reduce your overall throughput.  (Then again, it might make it better 
- very application dependent.)

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat CPU utilization pegged...total CPU only 50%

2005-02-07 Thread Kevin Williams
Ok,

Thanks all for the help.  I further optimized the environment while
troubleshooting.  In case anyone else is in a similar issue, I'll list
the solution that worked for me--turn off hyperthreading.  The two Xeon
CPU's are hyperthreaded to represent 4 CPU's on the machine.  I'm not
sure exactly how tomcat/java interact with this, but it was not
favorable.  A coworker mentioned that the windows performance monitor
often records total CPU utilization incorrectly due to the logical split
of the CPU's acting as 4 instead of 2.  Disabling the hyperthreading in
the system bios shot the CPU utilization up to 70%-90% (I imagine the
other 10% of CPU is being reserved by other applications).

Thanks again for the help,

Kevin Williams


-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Vic
Sent: Thursday, February 03, 2005 9:09 PM
To: tomcat-user@jakarta.apache.org
Subject: Re: tomcat CPU utilization pegged...total CPU only 50%
[bcc][faked-from][bayes]
Importance: Low

You could be DB bound or LAN bound.
What is the switch telling you LAN utilization is?
What is the DB stress test telling you?
.V

Kevin Williams wrote:

>Hello,
>
> 
>
>I am trying to performance test an application running Tomcat with
>Apache w/SSL (connected using mod_proxy).  The OS is Windows Server
>2003.
>
> 
>
>The test I am running is simulating a user logging into the application
>(using JMeter for the testing framework).  Increasing the number of
>users from 1, 2, 3, 4,5 the total CPU utilization jumps considerably.
>After 5 users the CPU utilization hits 50% for a second and then
>drops...When simulating 10 users, the CPU hits50% for a few seconds and
>drops back down, the more users, the longer the CPU is pegged at 50%.
>My question is why is tomcat only using 50% of the CPU?  Seeing the CPU
>grow significantly with each user, and then peg out for longer periods
>of time with an increased user load indicates that the CPU is the choke
>point.  Using performance monitor, the Tomcat % Processor Time pegs out
>at 100% for the duration that total CPU utilization is at 50%.  Is
there
>a configuration option that I am unaware of to allow tomcat to use more
>CPU?
>
> 
>
>Thanks in advance!
>
> 
>
>Kevin
>
>
>  
>


-- 
Forums, Boards, Blogs and News in RiA <http://www.boardVU.com>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat CPU utilization pegged...total CPU only 50%

2005-02-03 Thread Caldarale, Charles R
> From: Kevin Williams [mailto:[EMAIL PROTECTED]
> Subject: RE: tomcat CPU utilization pegged...total CPU only 50%
> 
> I've done some more digging and am still stumped.  I don't 
> think it's a garbage collector.

Turn on -verbose:gc to make sure.

> The machine runs on 2 Gigs of Ram.  I set the -Xmx
> and -Xms value to 1024m and the younger generation values as
> -XX:NewSize=386m -XX:MaxNewSize=386m -XX:SurvivorRatio=4.

You may need to increase the size of the perm gen, since this is used to hold 
instances of java.lang.Class (among other things), and heavy use can frequently 
fill up the default maximum.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat CPU utilization pegged...total CPU only 50%

2005-02-03 Thread Vic
You could be DB bound or LAN bound.
What is the switch telling you LAN utilization is?
What is the DB stress test telling you?
.V
Kevin Williams wrote:
Hello,

I am trying to performance test an application running Tomcat with
Apache w/SSL (connected using mod_proxy).  The OS is Windows Server
2003.

The test I am running is simulating a user logging into the application
(using JMeter for the testing framework).  Increasing the number of
users from 1, 2, 3, 4,5 the total CPU utilization jumps considerably.
After 5 users the CPU utilization hits 50% for a second and then
drops...When simulating 10 users, the CPU hits50% for a few seconds and
drops back down, the more users, the longer the CPU is pegged at 50%.
My question is why is tomcat only using 50% of the CPU?  Seeing the CPU
grow significantly with each user, and then peg out for longer periods
of time with an increased user load indicates that the CPU is the choke
point.  Using performance monitor, the Tomcat % Processor Time pegs out
at 100% for the duration that total CPU utilization is at 50%.  Is there
a configuration option that I am unaware of to allow tomcat to use more
CPU?

Thanks in advance!

Kevin
 


--
Forums, Boards, Blogs and News in RiA 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: tomcat CPU utilization pegged...total CPU only 50%

2005-02-03 Thread Kevin Williams
Ok,

I've done some more digging and am still stumped.  I don't think it's a
garbage collector.  The machine runs on 2 Gigs of Ram.  I set the -Xmx
and -Xms value to 1024m and the younger generation values as
-XX:NewSize=386m -XX:MaxNewSize=386m -XX:SurvivorRatio=4.

Watching the system in task manager, the memory used doesn't exceed
300Mb.  Which leads me to believe that it's not gc.

The 2 cpu's are 2 Xeon 3.20 Processors (incorrectly stated 3.06 before I
believe).  Talking with the developer, he thinks that it's hovering
around 50% because of hyperthreading.  I've watched it go up to 80%
(during the first run it peaks there briefly before settling in to the
standard 45%-55% range, so I don't think that's the issue.

I was thinking maybe it's a database issue, but if that was the case,
wouldn't the tomcat processor percent drop off while waiting for the db
response?  Or could this be from using connections?

Also, I noticed that the thread count for the tomcat process is 44.  I
couldn't pass that no matter what I tried.  Does this mean anything?
How can I get more than 44 threads running?

Thanks in advance for any help on this frustrating problem!

Kevin Williams

-Original Message-
From: Kevin Williams [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 01, 2005 10:48 PM
To: Tomcat Users List
Subject: RE: tomcat CPU utilization pegged...total CPU only 50%
[bcc][faked-from][bayes]
Importance: Low

Charles,

My client has installed two instances of tomcat (each as a service).
I'm not really sure how they did it (they have the standard C:/Program
Files/Apache Group/Tomcat 4.1 folder, but the apps and conf files are in
D:/instances/instance1/conf, D:/instances/instance1/app,
D:/instances/instance1/work, D:/instances/instance1/log).  I'll talk to
the guy who configured this so I can emulate one of the instances in
batch mode.  I'll let you know how it goes after I make the changes!

Kevin

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 01, 2005 10:00 PM
To: Tomcat Users List
Subject: RE: tomcat CPU utilization pegged...total CPU only 50%
[bcc][faked-from]
Importance: Low

> From: Kevin Williams [mailto:[EMAIL PROTECTED]
> Subject: RE: tomcat CPU utilization pegged...total CPU only 50%
> 
> 1.  Yes, tomcat is running as a service.

You might want to shutdown that service and run it from a command-line
window, at least for testing purposes.  Easier to fiddle with heap size
options and the like.

> 2.  I am not aware of any CPU affinity settings.

They won't show up in Task Manager.  Not sure if the plain Windows
Server supports affinity; my experience with that capability was on a
32-CPU Advanced (Enterprise?) Server system which I no longer have
access to.  There's an mmc plug in Admin Tools that lets you play with
associating processes with CPUs, if it's available in your OS.

> 3.  I'm not sure what options are set with the jvm (I didn't 
> install the service).

IIRC, the default heap size for the 1.4.1 JVM on Windows is only 64 MB,
and that's really not enough for any serious work.  I suspect that
you're spending much of your time in garbage collection.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat CPU utilization pegged...total CPU only 50%

2005-02-01 Thread Kevin Williams
Charles,

My client has installed two instances of tomcat (each as a service).
I'm not really sure how they did it (they have the standard C:/Program
Files/Apache Group/Tomcat 4.1 folder, but the apps and conf files are in
D:/instances/instance1/conf, D:/instances/instance1/app,
D:/instances/instance1/work, D:/instances/instance1/log).  I'll talk to
the guy who configured this so I can emulate one of the instances in
batch mode.  I'll let you know how it goes after I make the changes!

Kevin

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 01, 2005 10:00 PM
To: Tomcat Users List
Subject: RE: tomcat CPU utilization pegged...total CPU only 50%
[bcc][faked-from]
Importance: Low

> From: Kevin Williams [mailto:[EMAIL PROTECTED]
> Subject: RE: tomcat CPU utilization pegged...total CPU only 50%
> 
> 1.  Yes, tomcat is running as a service.

You might want to shutdown that service and run it from a command-line
window, at least for testing purposes.  Easier to fiddle with heap size
options and the like.

> 2.  I am not aware of any CPU affinity settings.

They won't show up in Task Manager.  Not sure if the plain Windows
Server supports affinity; my experience with that capability was on a
32-CPU Advanced (Enterprise?) Server system which I no longer have
access to.  There's an mmc plug in Admin Tools that lets you play with
associating processes with CPUs, if it's available in your OS.

> 3.  I'm not sure what options are set with the jvm (I didn't 
> install the service).

IIRC, the default heap size for the 1.4.1 JVM on Windows is only 64 MB,
and that's really not enough for any serious work.  I suspect that
you're spending much of your time in garbage collection.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat CPU utilization pegged...total CPU only 50%

2005-02-01 Thread Caldarale, Charles R
> From: Kevin Williams [mailto:[EMAIL PROTECTED]
> Subject: RE: tomcat CPU utilization pegged...total CPU only 50%
> 
> 1.  Yes, tomcat is running as a service.

You might want to shutdown that service and run it from a command-line window, 
at least for testing purposes.  Easier to fiddle with heap size options and the 
like.

> 2.  I am not aware of any CPU affinity settings.

They won't show up in Task Manager.  Not sure if the plain Windows Server 
supports affinity; my experience with that capability was on a 32-CPU Advanced 
(Enterprise?) Server system which I no longer have access to.  There's an mmc 
plug in Admin Tools that lets you play with associating processes with CPUs, if 
it's available in your OS.

> 3.  I'm not sure what options are set with the jvm (I didn't 
> install the service).

IIRC, the default heap size for the 1.4.1 JVM on Windows is only 64 MB, and 
that's really not enough for any serious work.  I suspect that you're spending 
much of your time in garbage collection.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat CPU utilization pegged...total CPU only 50%

2005-02-01 Thread Kevin Williams
Charles,

Thanks for the help, here are your answers:

I am using perfmon to monitor the % CPU Utilization (total and for the
tomcat process).  I added the tomcat process % CPU Utilization by doing
the following:
a.  Within perfmon, Add an additional monitor.
b.  In the popup drop down list select process.
c.  Select % CPU Time
d.  Select the tomcat process.


1.  Yes, tomcat is running as a service.
2.  I am not aware of any CPU affinity settings.  I tried to check these
in Task Manager (never heard of them before you mentioned it--I'm new to
this), but didn't have access.  Looking into that, I found an article
that stated you could only set this if the process is NOT running as a
service.  If this isn't the case, please let me know how to set/check
it!
3.  I'm not sure what options are set with the jvm (I didn't install the
service).  I can check with the individual who created the service
tomorrow, and reset it to include the verbose:gc option though.

Thanks!

Kevin Williams

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 01, 2005 8:56 PM
To: Tomcat Users List
Subject: RE: tomcat CPU utilization pegged...total CPU only 50%
[bcc][faked-from][bayes]
Importance: Low

> From: Kevin Williams [mailto:[EMAIL PROTECTED]
> Subject: tomcat CPU utilization pegged...total CPU only 50%

> Using performance monitor, the Tomcat % Processor Time pegs out
> at 100% for the duration that total CPU utilization is at 50%.

I'm confused.  What tool or monitoring mechanism is telling you that
total CPU utilization is 50% at the same time that PerfMon says it's
100%?

Additional questions:
1) Are you running Tomcat as a service?
2) Are you using CPU affinity settings that would restrict Tomcat to one
CPU?
3) Are you going into garbage collection frequently enough to prevent
use of both CPUs? (Turn on -verbose:gc to check.)

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat CPU utilization pegged...total CPU only 50%

2005-02-01 Thread Caldarale, Charles R
> From: Kevin Williams [mailto:[EMAIL PROTECTED]
> Subject: tomcat CPU utilization pegged...total CPU only 50%

> Using performance monitor, the Tomcat % Processor Time pegs out
> at 100% for the duration that total CPU utilization is at 50%.

I'm confused.  What tool or monitoring mechanism is telling you that total CPU 
utilization is 50% at the same time that PerfMon says it's 100%?

Additional questions:
1) Are you running Tomcat as a service?
2) Are you using CPU affinity settings that would restrict Tomcat to one CPU?
3) Are you going into garbage collection frequently enough to prevent use of 
both CPUs? (Turn on -verbose:gc to check.)

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat CPU utilization pegged...total CPU only 50%

2005-02-01 Thread Kevin Williams
Doug,

Here you go:

Tomcat Version: 4.1
JVM Version: 1.4.1_07
2 processors: P4 Xeon 3.06 Ghz

Thanks,

Kevin Williams

-Original Message-
From: Parsons Technical Services [mailto:[EMAIL PROTECTED]

Sent: Tuesday, February 01, 2005 8:38 PM
To: Tomcat Users List
Subject: Re: tomcat CPU utilization pegged...total CPU only 50%
[bcc][faked-from][bayes]

Is this on a dual processor machine?

What version of Tomcat and JVM?

Doug

- Original Message - 
From: "Kevin Williams" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, February 01, 2005 11:25 PM
Subject: tomcat CPU utilization pegged...total CPU only 50%


Hello,

 

I am trying to performance test an application running Tomcat with
Apache w/SSL (connected using mod_proxy).  The OS is Windows Server
2003.

 

The test I am running is simulating a user logging into the application
(using JMeter for the testing framework).  Increasing the number of
users from 1, 2, 3, 4,5 the total CPU utilization jumps considerably.
After 5 users the CPU utilization hits 50% for a second and then
drops...When simulating 10 users, the CPU hits50% for a few seconds and
drops back down, the more users, the longer the CPU is pegged at 50%.
My question is why is tomcat only using 50% of the CPU?  Seeing the CPU
grow significantly with each user, and then peg out for longer periods
of time with an increased user load indicates that the CPU is the choke
point.  Using performance monitor, the Tomcat % Processor Time pegs out
at 100% for the duration that total CPU utilization is at 50%.  Is there
a configuration option that I am unaware of to allow tomcat to use more
CPU?

 

Thanks in advance!

 

Kevin




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat CPU utilization pegged...total CPU only 50%

2005-02-01 Thread Parsons Technical Services
Is this on a dual processor machine?
What version of Tomcat and JVM?
Doug
- Original Message - 
From: "Kevin Williams" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, February 01, 2005 11:25 PM
Subject: tomcat CPU utilization pegged...total CPU only 50%

Hello,

I am trying to performance test an application running Tomcat with
Apache w/SSL (connected using mod_proxy).  The OS is Windows Server
2003.

The test I am running is simulating a user logging into the application
(using JMeter for the testing framework).  Increasing the number of
users from 1, 2, 3, 4,5 the total CPU utilization jumps considerably.
After 5 users the CPU utilization hits 50% for a second and then
drops...When simulating 10 users, the CPU hits50% for a few seconds and
drops back down, the more users, the longer the CPU is pegged at 50%.
My question is why is tomcat only using 50% of the CPU?  Seeing the CPU
grow significantly with each user, and then peg out for longer periods
of time with an increased user load indicates that the CPU is the choke
point.  Using performance monitor, the Tomcat % Processor Time pegs out
at 100% for the duration that total CPU utilization is at 50%.  Is there
a configuration option that I am unaware of to allow tomcat to use more
CPU?

Thanks in advance!

Kevin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]