Ok, I think I have made some progress.
Current version is here:
https://github.com/ubccr/pcp/tree/dynamic_hotproc
I will be traveling all next week and not have much time to work on this until
I get back.
> On Nov 13, 2014, at 3:01 PM, Martins Innus <minnus@xxxxxxxxxxx> wrote:
>
> Nathan,
>
> On 11/13/14 1:02 AM, Nathan Scott wrote:
>>> Still no progress on this, except that with a dso pmda, the domain
>>> number is correct at this point. Illustrated below in the interrupts case.
>> Looks like a bug - in the cgroups case, the domain# is explicitly
>> stamped into the PMID for the new metric table entry each time, so
>> I suspect we've never seen this before as a result.
> OK. I haven't dug too far to see where this should happen.
I had misinterpreted what was going on here. The domain # in the pmid was ok.
It was the domain of the instance domain that needed to be stamped in. All
should be fine now.
>>
>>>
>>> When running through the initial metric table, the only check that
>>> is done is to see if the cluster matches when doing "mtabupdate" and no
>>> check is done against the item or name. This will cause multiple calls
>>> for the same metric if we have clusters that span multiple trees (since
>> If we take away "clusters spanning trees" this all gets simpler I think?
>> Am I oversimplifying things there? (apologies if so - I'll look at it
>> more closely as soon as I get this cgroup stuff finished).
> That's exactly correct. The existing dynamic code assumes clusters don't
> span trees. This problem goes away if they are distinct.
>
> This assumption is also made in the following methods:
>
> pmdaDynamicLookupPMID
> pmdaDynamicLookupText
>
> These will use the first tree that has the matching cluster.
>
> Actually. Thinking this through. Something like the attached patch could fix
> this issue once we can get the domain # in the source metric. I can't really
> test it until the domain # is there since the search fails currently. Not
> sure of any performance issues with all those searches.
>
I now have a fix for this. I modified dynamic.c significantly to get rid of
the checks against cluster and prefix. They are not used at all, I just left
the prefix in for now since it is used to do the cluster mask. I'm not sure if
that will be needed in the new cgroups anymore.
All the checks are now done just against the pmns. This allows there to be
only one setup call for dynamic proc metrics.
Let me know if you think this is a workable solution or if there is a better
way to do it.
Martins
|