Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

1.0

Use Linux perf interface to collect data about performance events on a per core basis


2.0

Use jevents library (PMU tools)


3.0

Should have a configurable interval


4.0

Should have configurable hardware specific events list


5.0

Provide SNMP support for any collectd values, through an PMU MIB

6.0

Provide support for multi PMU uncore events


76.0Provide option to choose all the events from json event list file

...

The intel_pmu plugin collects information provided by Linux perf interface. It is not done directly, but through jevents API. Using this interface, the intel_pmu plugin collects the hardware specific metrics defined in event list file which should contain definitions of PMU events. The list of events to monitor is configurable.

Image Added

Plugin configuration

The following configuration options should be supported by intel_pmu collectd plugin:  

...

    Cores ""
HardwareEvents "L2_RQSTS.PF_MISS"
Cores "1"
DispatchMultiPmu false
  </Plugin>

In above example events L2_RQSTS.CODE_RD_HIT,L2_RQSTS.CODE_RD_MISS and L2_RQSTS.ALL_CODE_RD are going to be monitored on
all available cores, and event L2_RQSTS.PF_MISS is going to be monitored on core 1.

Another example with only uncore events set:

...

plugin API
jevents API
Description
pmu_config

Parse events groups to monitor provided by user in collectd.conf
pmu_init
alloc_eventlist
Allocate memory for new eventlist
resolve_event_extra
Resolve hardware specific events names to perf events (perf_event_attr)
jevent_pmu_uncore
Check if event is uncore event
jevent_next_pmu
Expand event into multiple PMU if neccessary (in use for uncore events)
setup_event
Setup perf events for monitoring
pmu_read
read_all_events
Read values of all monitored events
pmu_shutdown
free_eventlist
Free memory allocated for eventlist (recursively including all events) 

...

Note: For uncore events values can be collected only for first core of every socket e.g. '0' '18' etc.

Time based multiplexing

If there are more events than counters, the kernel uses time multiplexing to give each event a chance to access the monitoring hardware. With multiplexing, an event is not measured all the time. At the end of the run, the tool scales the count based on total time enabled vs time running. The actual formula is:
scaledcount = rawcount * timeenabled / timerunning

This provides an estimate of what the count would have been, had the event been measured during the entire run. Note that this is an estimate not an actual count. Depending on the workload, there will be blind spots which can introduce errors during scaling.
The plugin dispatches all the four values, that is scaled, raw, time enabled & running, to the user. The values type is COUNTER.

SNMP Support

All metrics collected by intel_pmu plugin should be available through SNMP.  This will be achieved by creating proper configuration for snmp_agent collectd plugin. No additional functionality needed in intel_pmu plugin to support SNMP. See description of SNMP feature for more details on snmp_agent plugin.

...