Measuring CPU performance? Which is right?

2008-06-12 Thread CHAPLIN, JAMES (CTR)
On the zLinux guest (ZP013), using sar I get a CPU usage of about 15%:  

11:00:01 AM   CPU %user %nice   %system   %iowait%steal
%idle

11:50:01 AM   all  14.78  0.00   0.70  0.53
0.1583.84

 

But under Perfkit (zVM) we get the following exception message, 33.5%
CPU:

11:51:51 FCXUSL317A User ZP013 %CPU 33.5 exceeded threshold 30.0 for 5
min.

 

'top' numbers match the 'sar' values from the zLinux guest. We have two
IFLs defined to the guest.

 

Why are the numbers from PERFKIT different from the zLinux environment?
Which numbers should we be monitoring from?

 

James Chaplin

Systems Programmer, MVS, zVM  zLinux

Base Technologies, Inc

(703) 921-6220

 


--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: Measuring CPU performance? Which is right?

2008-06-12 Thread Mark Post
 On Thu, Jun 12, 2008 at 12:31 PM, in message
[EMAIL PROTECTED],
CHAPLIN, JAMES (CTR) [EMAIL PROTECTED] wrote: 
-snip-
 Why are the numbers from PERFKIT different from the zLinux environment?
 Which numbers should we be monitoring from?

You didn't say which version of which distribution you are using.  Anything 
prior to SLES10 and RHEL5 will report (possibly wildly) incorrect CPU 
utilization numbers from inside the Linux guests.  If you're at one of those 
levels or higher, then the numbers should match.


Mark Post

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: Measuring CPU performance? Which is right?

2008-06-12 Thread Malcolm Beattie
CHAPLIN, JAMES (CTR) writes:
 On the zLinux guest (ZP013), using sar I get a CPU usage of about 15%:
[...]
 But under Perfkit (zVM) we get the following exception message, 33.5%
 CPU:

 11:51:51 FCXUSL317A User ZP013 %CPU 33.5 exceeded threshold 30.0 for 5
 min.
[...]
 We have two
 IFLs defined to the guest.
[...]
 Why are the numbers from PERFKIT different from the zLinux environment?

PerfKit percentages are calculated as percentage of one engine.
Linux percentages calculate percentage of CPU resource available to
the image. For your Linux guest with 2 engines, Linux tells you it's
using ~15% of its 2-engines'-worth. PerfKit spells that as ~30% of
a nominally-100%-utilised single engine. Same resource usage,
different way of displaying the measurement.

[For the purposes of this posting, I'm treating any remaining few
percent difference as a second order effect or else we'd muddy the
waters with discussing a bunch of more complex measurement issues.]

--Malcolm

--
Malcolm Beattie
System z SWG/STG, Europe
IBM UK

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: Measuring CPU performance? Which is right?

2008-06-12 Thread Kim Goldenberg

Malcolm Beattie wrote:

CHAPLIN, JAMES (CTR) writes:

On the zLinux guest (ZP013), using sar I get a CPU usage of about 15%:

[...]

But under Perfkit (zVM) we get the following exception message, 33.5%
CPU:

11:51:51 FCXUSL317A User ZP013 %CPU 33.5 exceeded threshold 30.0 for 5
min.

[...]

We have two
IFLs defined to the guest.

[...]

Why are the numbers from PERFKIT different from the zLinux environment?


PerfKit percentages are calculated as percentage of one engine.
Linux percentages calculate percentage of CPU resource available to
the image. For your Linux guest with 2 engines, Linux tells you it's
using ~15% of its 2-engines'-worth. PerfKit spells that as ~30% of
a nominally-100%-utilised single engine. Same resource usage,
different way of displaying the measurement.


Isn't that in the wrong direction? I'd expect 15% of two engines ~= 7.5%
of one engine (.15x200 = .075x100).

If, however, Linux is reporting as if 1 engine and PerfKit is doubling
due to two engines, I could see your scenario.

Which is correct?

TIA
Kim

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
begin:vcard
fn:Kim Goldenberg
n:Goldenberg;Kim
org:State of New Jersey;Office of Information Technology (OIT)
adr:200 Riverview Plaza;;PO Box 212;Trenton;NJ;08625-0212;USA
email;internet:[EMAIL PROTECTED]
title:Systems Programmer I
tel;work:609-777-3722
tel;fax:609-777-3939
x-mozilla-html:FALSE
url:http://www.state.nj.us
version:2.1
end:vcard



Re: Measuring CPU performance? Which is right?

2008-06-12 Thread Mark Post
 On Thu, Jun 12, 2008 at  3:19 PM, in message [EMAIL PROTECTED],
Kim Goldenberg [EMAIL PROTECTED] wrote: 
-snip-
 Isn't that in the wrong direction? I'd expect 15% of two engines ~= 7.5%
  of one engine (.15x200 = .075x100).
 
 If, however, Linux is reporting as if 1 engine and PerfKit is doubling
 due to two engines, I could see your scenario.
 
 Which is correct?

If using top, it varies depending on whether you have it show you all the CPUs 
available, or take the summary.  If it is showing the summary line, it shows 
the average of the various CPUs.  If it is showing the individual CPUs, then it 
lists how busy each one is.  Some distributions also have the total/average 
of the individual CPUs listed as a separate line on the display.


Mark Post

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: Measuring CPU performance? Which is right?

2008-06-12 Thread CHAPLIN, JAMES (CTR)
RHEL 5.0

James Chaplin
Systems Programmer, MVS, zVM  zLinux
Base Technologies, Inc
(703) 921-6220
 

-Original Message-
From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On Behalf Of
Mark Post
Sent: Thursday, June 12, 2008 1:33 PM
To: LINUX-390@VM.MARIST.EDU
Subject: Re: Measuring CPU performance? Which is right?

 On Thu, Jun 12, 2008 at 12:31 PM, in message
[EMAIL PROTECTED],
CHAPLIN, JAMES (CTR) [EMAIL PROTECTED] wrote: 
-snip-
 Why are the numbers from PERFKIT different from the zLinux
environment?
 Which numbers should we be monitoring from?

You didn't say which version of which distribution you are using.
Anything prior to SLES10 and RHEL5 will report (possibly wildly)
incorrect CPU utilization numbers from inside the Linux guests.  If
you're at one of those levels or higher, then the numbers should match.


Mark Post

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or
visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: Measuring CPU performance? Which is right?

2008-06-12 Thread Rob van der Heij
On Thu, Jun 12, 2008 at 7:29 PM, Malcolm Beattie [EMAIL PROTECTED] wrote:

 PerfKit percentages are calculated as percentage of one engine.
 Linux percentages calculate percentage of CPU resource available to
 the image. For your Linux guest with 2 engines, Linux tells you it's
 using ~15% of its 2-engines'-worth. PerfKit spells that as ~30% of
 a nominally-100%-utilised single engine. Same resource usage,
 different way of displaying the measurement.

Obviously Linux on z/VM has no idea how much is really available to
it. It's just dividing things by the number of virtual CPUs. That does
not mean Linux would have n * 100% available.

 [For the purposes of this posting, I'm treating any remaining few
 percent difference as a second order effect or else we'd muddy the
 waters with discussing a bunch of more complex measurement issues.]

You can ignore what you like, but the remainder is probably significant.
With the later kernel releases that use the virtual cpu accounting
(recognized by the reporting of steal percentage) the basis is virtual
time rather than total time. So anything done by CP on behalf of this
Linux virtual machine is reported by Linux as unused.

Rob
--
Rob van der Heij
Velocity Software
http://velocitysoftware.com/

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: Measuring CPU performance? Which is right?

2008-06-12 Thread CHAPLIN, JAMES (CTR)
From zLinux, I am seeing one CPU at 15%, the other at a much lower value
(~5%) using 'mpstat -P ALL'

James Chaplin
Systems Programmer, MVS, zVM  zLinux
Base Technologies, Inc
(703) 921-6220
 

-Original Message-
From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On Behalf Of
Kim Goldenberg
Sent: Thursday, June 12, 2008 3:19 PM
To: LINUX-390@VM.MARIST.EDU
Subject: Re: Measuring CPU performance? Which is right?

Malcolm Beattie wrote:
 CHAPLIN, JAMES (CTR) writes:
 On the zLinux guest (ZP013), using sar I get a CPU usage of about
15%:
 [...]
 But under Perfkit (zVM) we get the following exception message, 33.5%
 CPU:

 11:51:51 FCXUSL317A User ZP013 %CPU 33.5 exceeded threshold 30.0 for
5
 min.
 [...]
 We have
two
 IFLs defined to the guest.
 [...]
 Why are the numbers from PERFKIT different from the zLinux
environment?

 PerfKit percentages are calculated as percentage of one engine.
 Linux percentages calculate percentage of CPU resource available to
 the image. For your Linux guest with 2 engines, Linux tells you it's
 using ~15% of its 2-engines'-worth. PerfKit spells that as ~30% of
 a nominally-100%-utilised single engine. Same resource usage,
 different way of displaying the measurement.

Isn't that in the wrong direction? I'd expect 15% of two engines ~= 7.5%
 of one engine (.15x200 = .075x100).

If, however, Linux is reporting as if 1 engine and PerfKit is doubling
due to two engines, I could see your scenario.

Which is correct?

TIA
Kim

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or
visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390