pcp
[Top] [All Lists]

pcp updates: kenj merge

To: pcp <pcp@xxxxxxxxxxx>
Subject: pcp updates: kenj merge
From: Mark Goodwin <mgoodwin@xxxxxxxxxx>
Date: Thu, 23 Apr 2015 16:19:28 +1000
Delivered-to: pcp@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0
Changes committed to git://git.pcp.io/pcp.git master

Ken McDonell (5):
      libpcp/pmns.c: pmLookupName() fix up
      libpcp/derive.c: fix typo in diagnostic message
      qa/admin/check-vm: Add note to ignore networking warnings if not running 
QA
      libpcp/interp.c: another performance improvement
      libpcp/interp.c: major breakthrough!

 man/man3/pmlookupname.3 |   94 ++++++++++++++++-
 qa/180.out.3            |    2
 qa/404.out              |   12 +-
 qa/787.out              |    8 -
 qa/901.out              |   12 +-
 qa/909                  |  122 +++++++++++++++++++++++
 qa/909.out              |  131 ++++++++++++++++++++++++
 qa/admin/check-vm       |   11 +-
 qa/group                |    1
 qa/src/interp_bug.c     |   10 +
 qa/src/interp_bug2.c    |   22 +++-
 qa/src/lookupnametest.c |   53 +++++++++-
 qa/src/multifetch.c     |    3
 qa/src/multithread5.c   |    5
 qa/src/multithread6.c   |    5
 qa/src/multithread7.c   |    5
 qa/src/multithread8.c   |    5
 qa/src/multithread9.c   |    5
 qa/src/permfetch.c      |    2
 qa/src/torture_api.c    |    6 -
 src/libpcp/src/derive.c |    2
 src/libpcp/src/interp.c |   48 +++++----
 src/libpcp/src/pmns.c   |  252 +++++++++++++++++++++++++++++++++++-------------
 src/pmcd/src/dopdus.c   |   83 +++++++++------
 24 files changed, 734 insertions(+), 165 deletions(-)

Details ...

commit 2a3b5ff6668c13791e9c9df64673419dd7903281
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Thu Apr 23 09:10:07 2015 +1000

    libpcp/interp.c: major breakthrough!

    One and off for more than 15 months(!), I've been trying to
    understand two guards that control the backwards and forwards
    searching when trying to "bound" a metric-instance for a point in
    time value interpolation from a PCP archive.  This is in the dark
    heart of some of the most complex code in libpcp, and sometimes
    was observed to trigger obscene amounts of archive record reading,
    and re-reading, and re-reading ...

    In the guards one clause in particular made no sense to me ... but
    each time I tried to remove these clauses or refine them so they
    made less nonsense, there were a spate of hard to understand and
    harder to diagnose QA failures.

    After many other changes to improve the logic in the code to
    deal with unrelated corner cases, I finally was down to a single
    QA anomaly.  In desperation, I removed the "makes no sense to me
    guards" and bingo!

    All tests pass, and the performance problems reported by Frank
    (in a pmmgr context) and Paul Smith (in a pmchart context with big
    production archives) have both gone away _and_ interp mode seems
    to produce the correct metric values across all of the QA tests.

    With hindsight, it appears the guards were an incorrect attempt
    to address logic errors elsewhere, and when these other errors
    were finally all fixed properly, the guards were no longer needed
    for correctness, but they did sometimes trigger lots of archive
    reading that was not required.

    For the historical record the guard that has been dropped is this one
    (for forward search and the similar one for backwards search):
        /* ...
         *  t_next is a mark and t_next > t_req => need to search
         *      back also (unless we've already scanned to this mark)
         ...
         */
        ...
(IS_MARK(icp->s_next) && !IS_SCANNED(icp->s_next) && icp->t_next > t_req) ||

    Now back to the rest of my life!

commit 8a28abe2c3ecd75daef3e01424a64523d8601738
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Thu Apr 23 08:31:12 2015 +1000

    libpcp/interp.c: another performance improvement

    Small one this time, we're down to the obscure corner cases now.

commit b113884be5060a1a99ddbef94baaab416638bbca
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Thu Apr 23 08:29:17 2015 +1000

    qa/admin/check-vm: Add note to ignore networking warnings if not running QA

commit 81d987bf77a8f74d29847fd136fb903bee09c8d4
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Thu Apr 23 08:28:40 2015 +1000

    libpcp/derive.c: fix typo in diagnostic message

commit d26ac520e34c42a07825864dc7db84b4bee300bf
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Wed Apr 22 10:17:33 2015 +1000

    libpcp/pmns.c: pmLookupName() fix up

    Complete audit of pmLookupName() error handling, to ensure we are
    consistent across all of
    - local PMNS (with and without a current context)
    - remote host context
    - local context
    - archive context
    for all types of metrics, but especially DYNAMIC metrics.

    Mostly in libpcp, but also a small pmcd change.

    pmLookupName() man page updated to reflect the real error handling
    protocol and verified example code added.

    As a by-product, discovered that pmNameID() and pmNameAll() were
    broken for DYNAMIC metrics, so drive-by fix for these as well.

    And finally a bunch of QA consequential cleanup.

<Prev in Thread] Current Thread [Next in Thread>