Bug 1376857 - poor pmlogconf performance, esp. with derived metrics
Summary: poor pmlogconf performance, esp. with derived metrics
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: pcp
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Berk
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-16 15:35 UTC by Frank Ch. Eigler
Modified: 2017-07-26 22:51 UTC (History)
8 users (show)

Fixed In Version: pcp-3.12.0-1.fc24 pcp-3.12.0-1.fc25
Clone Of:
Environment:
Last Closed: 2017-07-26 21:18:27 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Frank Ch. Eigler 2016-09-16 15:35:54 UTC
pmlogconf simply takes too long.  The task of probing for some dozens of metrics should not take *minutes*, but because of the shell-script/awk/pmprobe based implementation, and because of derived-metrics amplifying traffic further, it easily does, esp. with busy networks & remote hosts.

For more analysis, see http://www.pcp.io/pipermail/pcp/2016-May/010540.html

Partial improvement patch:

https://sourceware.org/git/gitweb.cgi?p=pcpfans.git;a=commitdiff;h=8a158581ddc58d7f50f53f4688631f8f82a29b1a

But really it should be rewritten in python or something.

Comment 1 Mark Goodwin 2016-09-19 04:28:44 UTC
That patch looks good to me and is basically the agreed solution as discussed http://www.pcp.io/pipermail/pcp/2016-May/010545.html i.e. turn off derived metrics in pmlogconf by setting PCP_DERIVED_CONFIG to an empty string, along with suitable man page updates. Not sure if we'd still want to honor PCP_DERIVED_CONFIG if it is already set to something (as opposed to not being set) ??

>
> But really it should be rewritten in python or something.

I don't see how reimplementing pmlogconf in another language will reduce the probe overheads - we'd still have the same number of probes being called, which is surely where most of the time is being spent. But the above patch should help.

Comment 2 Frank Ch. Eigler 2016-09-19 10:59:43 UTC
> > But really it should be rewritten in python or something.
> 
> I don't see how reimplementing pmlogconf in another language will reduce the
> probe overheads - we'd still have the same number of probes being called

I was imagining a self-contained program that implements all of the pmlogconf logic, so without overheads of many pmprobe child processes, retaining a persistent pcp connection to do the individual metric probes, that sort of thing.  That should take only a few dozen pcp wire protocol packets total, and a fraction of a second.

Comment 3 Mark Goodwin 2016-09-19 22:41:42 UTC
Just caching the value of kernel.uname.sysname will probably make a worth while improvement :

# grep -r '^probe.*sysname' /var/lib/pcp/config/pmlogconf | wc -l
24

In any case, if we're going to have a rewrite, there are some usability improvements that should be made too (we shouldn't be getting bugs like #1358972). And also need to expunge the obsolete IRIX config entries.

Comment 4 Nathan Scott 2016-09-20 13:03:24 UTC
 pmlogconf is part of the main pcp package which has no dependency on python, and its highly desirable that it remain that way (some platforms won't necessarily have python installed at all).

| I don't see how reimplementing pmlogconf in another language will reduce the probe [...]

FWIW, with some refactoring all of the metrics could be fetched in a single pmprobe/pminfo invocation - see pcp-summary for an example - there's alot of scope for improving the existing code.

Comment 5 Fedora End Of Life 2017-02-28 10:19:18 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 6 Fedora Update System 2017-06-30 02:13:43 UTC
pcp-3.12.0-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-d29400ff30

Comment 7 Fedora Update System 2017-06-30 02:15:09 UTC
pcp-3.12.0-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-9103ca28d1

Comment 8 Fedora Update System 2017-06-30 23:22:11 UTC
pcp-3.12.0-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-d29400ff30

Comment 9 Fedora Update System 2017-06-30 23:22:50 UTC
pcp-3.12.0-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-9103ca28d1

Comment 10 Fedora Update System 2017-07-26 21:18:27 UTC
pcp-3.12.0-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2017-07-26 22:51:53 UTC
pcp-3.12.0-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.