[lkml]   [2009]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [perf] howto switch from pfmon
Ingo Molnar wrote:
> btw., it might make sense to expose NUMA inbalance via generic
> enumeration. Right now we have:
> plus we have cache stats:
> * Generalized hardware cache counters:
> *
> * { L1-D, L1-I, LLC, ITLB, DTLB, BPU } x
> * { read, write, prefetch } x
> * { accesses, misses }

By the way, is there a way to know which cache was actually used when we
request cache references/misses? Always the largest/top one by default?

> NUMA is here to stay, and expressing local versus remote access
> stats seems useful. We could add two generic counters:
> And map them properly on all CPUs that support such stats. They'd be
> accessible via '-e ram-local-refs' and '-e ram-remote-refs' type of
> event symbols.
> What is your typical usage pattern of this counter? What (general)
> kind of app do you profile with it and how do you make use of the
> specific node masks?
> Would a local/all-remote distinction be enough, or do you need to
> make a distinction between the individual nodes to get the best
> insight into the workload?

People here work on OpenMP runtime systems where you try to keep threads
and data together. So in the end, what's important is to maximize the
overall local/remote access ratio. But during development, it may useful
to have a distinction between individual nodes so as to understand
what's going on. That said, we still have raw numbers when we really
need that many details, and I don't know if it'd be easy for you to add
a generic counter with a sort of node-number attribute.

(including part of your other email here since it's relevant)

> How many threads does your workload typically run, and how do you
> get their stats displayed?

In the aforementioned OpenMP stuff, we use pfmon to get the local/remote
numa memory access ratio of each thread. In this specific case, we bind
one thread per core (even with a O(1) scheduler, people tend to avoid
launching hundreds of threads on current machines). pfmon gives us
something similar to the output of 'perf stat' in a file whose filename
contains process and thread IDs. We apply our own custom script to
convert these many pfmon output files into a single summary saying for
each thread, its thread ID, its core binding, its individual numa node
access numbers and percentages, and if they were local or remote (with
the Barcelona counters we were talking about, you need to check where
you were running before you know if accesses to node X are actually
local or remote accesses).


 \ /
  Last update: 2009-06-23 17:25    [W:0.070 / U:15.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site