pcp
[Top] [All Lists]

pcp updates: mem+blkio cgroups updates

To: PCP <pcp@xxxxxxxxxxx>
Subject: pcp updates: mem+blkio cgroups updates
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Wed, 25 Jun 2014 03:29:28 -0400 (EDT)
Delivered-to: pcp@xxxxxxxxxxx
Reply-to: Nathan Scott <nathans@xxxxxxxxxx>
Thread-index: 7TVk0YGIjB3oQkVlj0omcI0o3jjPQA==
Thread-topic: pcp updates: mem+blkio cgroups updates
Changes committed to git://git.performancecopilot.org/pcp.git dev

 qa/730                           |   46 ++
 qa/730.out                       |  822 ++++++++++++++++++++++++++++++++++++
 qa/731                           |   50 ++
 qa/731.out                       |  706 ++++++++++++++++++++++++++++++
 qa/GNUmakefile                   |    2 
 qa/group                         |    2 
 qa/linux/GNUmakefile             |   20 
 qa/linux/GNUmakefile.install     |    1 
 qa/linux/cgroups-root-001.tgz    |binary
 src/include/pcp/pmda.h           |    2 
 src/libpcp_pmda/src/dynamic.c    |   56 +-
 src/libpcp_pmda/src/exports      |    5 
 src/libpcp_pmda/src/open.c       |    3 
 src/pmdas/linux_proc/GNUmakefile |   13 
 src/pmdas/linux_proc/cgroups.c   |  890 +++++++++++++++++++++++++++++----------
 src/pmdas/linux_proc/cgroups.h   |   49 +-
 src/pmdas/linux_proc/clusters.h  |    5 
 src/pmdas/linux_proc/filesys.c   |   97 ----
 src/pmdas/linux_proc/filesys.h   |   27 -
 src/pmdas/linux_proc/help        |    5 
 src/pmdas/linux_proc/indom.h     |   16 
 src/pmdas/linux_proc/ksym.c      |   18 
 src/pmdas/linux_proc/pmda.c      |  388 +++++++++++++----
 src/pmdas/linux_proc/proc_pid.c  |   24 -
 src/pmdas/linux_proc/root_proc   |   18 
 25 files changed, 2770 insertions(+), 495 deletions(-)

commit 6a6251f700414b9d68d7445daa02b2095f9df2cd
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Wed Jun 25 16:36:50 2014 +1000

    pmdaproc: additional memory and new blkio cgroup metrics on Linux
    
    This seemed so simple on the surface ... but turned into a massive
    effort. The new memory metrics are a straightforward extension to
    the existing code, but the blkio metrics took a ton of unexpected
    work.  Oh well.
    
    Some of the things making this complex included:
    - quirks of the blkio file formats, and instances within files (and
      different instance sets within some files, different metrics within
      some files, and, and...);
    - sufficiently large metric sets that the existing PMID "item" field
      split was not sufficient, and a new scheme ended up being needed;
    - requirement to use an instance domain for disks, and that instance
      name being unhelpfully exported by the kernel as major:minor
    
    So, a new PMID cluster-masking scheme has been introduced (support in
    libpcp_pmda was needed, making it yet more involved) allowing the full
    PMID item space to be dedicated to the different metric values, and
    the high bits in the cluster to be dedicated to the cgroup identifier.
    
    Another scheme has been implemented for blkio cgroups such that its
    disk indom is exported the human-readable device names (sda, sdb, etc)
    instead of simply the major:minor pair.
    
    The cgroup.subsys and cgroup.mounts metric namespaces are made fixed,
    instead of dynamic (which in hindsight they should always have been).
    
    A new testing methodology is introduced to pmdaproc.  This makes use
    of an environment variable to set an alternate root filesystem path,
    to be used by the PMDA (bit like a chroot).  The root can be populated
    with the set of proc and other (cgroup) files needed by pmdaproc, thus
    giving fine-grained and deterministic output.  This also allows us to
    inject crafted data that would otherwise be hard to evoke on a running
    kernel.
    
    Tests qa/730 and qa/731 are added to exercise the metrics (the latter
    is a valgrind test, the former focuses on different call trajectories
    into the PMDA) using this method, with one canned set of data.  Over
    time, more roots can be gathered from various running systems, and the
    tests are written so that they'll automatically start to use them.

<Prev in Thread] Current Thread [Next in Thread>
  • pcp updates: mem+blkio cgroups updates, Nathan Scott <=