From: Rick Jones <rick.jones2@hp.com>
To: linux-perf-users@vger.kernel.org
Subject: measuring and/or dealing with "idleness" and variable frequency
Date: Thu, 06 Jun 2013 10:46:07 -0700 [thread overview]
Message-ID: <51B0CADF.8040508@hp.com> (raw)
I am coming to "perf" (record -e cycles and report) from an old-time
background where one could see the "idle routine" in a profile and know
how "idle" (in terms of classic reporting a la top) a CPU was. Back
then the frequency was fixed, the idle loop was always "running" when
the CPU was idle and there were no hardware threads. Life was simple
and good.
Now I have to realign to the present and am wondering where/how to get
started. I've looked at https://perf.wiki.kernel.org/index.php/Tutorial
which talks about:
> By default, perf record uses the cycles event as the sampling event.
> This is a generic hardware event that is mapped to a
> hardware-specific PMU event by the kernel. For Intel, it is mapped to
> UNHALTED_CORE_CYCLES. This event does not maintain a constant
> correlation to time in the presence of CPU frequency scaling. Intel
> provides another event, called UNHALTED_REFERENCE_CYCLES but this
> event is NOT currently available with perf_events.
>
> On AMD systems, the event is mapped to CPU_CLK_UNHALTED and this
> event is also subject to frequency scaling. On any Intel or AMD
> processor, the cycle event does not count when the processor is idle,
> i.e., when it calls mwait().
And I am wondering if those are all still true.
I am running a 3.5.0 kernel in an Ubuntu environment (3.5.0-23-generic
#35~precise1-Ubuntu SMP), and among the things I wish to do is sanity
check the Idle % being reported by top on one system which is passing
traffic back and forth between two others. Compared to the CPU
utilization reported by top on those two systems, the reports for this
one look extraordinarily low.
The CPU involved here is:
Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
I am also interested in seeing how the CPU consumption changes as I
tweak the setup of the middle box, does it go more or less idle which
routines have their consumption change etc etc. and I am wondering if I
can get that all with just perf or if I have to correlate things between
multiple tools.
thanks, and happy benchmarking,
rick jones
next reply other threads:[~2013-06-06 17:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-06 17:46 Rick Jones [this message]
2013-06-09 3:21 ` measuring and/or dealing with "idleness" and variable frequency David Ahern
2013-06-10 20:34 ` Rick Jones
2013-06-10 22:28 ` Rick Jones
2013-06-10 22:33 ` David Ahern
2013-06-10 22:39 ` Rick Jones
2013-06-12 21:21 ` Rick Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51B0CADF.8040508@hp.com \
--to=rick.jones2@hp.com \
--cc=linux-perf-users@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).