Skip to content

Attribute querying approach doesn't scale #23

Closed
@rhuss

Description

@rhuss

The approach to first query, read all attributes and finally apply the rule set on each attribute individually doesn't scale at all in the real world.

It is not uncommon that a Java server has hundreds MBean registered, each with five to ten attributes. Reading an attribute is normally cheap if only member variables are stored, but many MBean calculate the attribute value also on the fly so that an average readtime of 1-2ms is a good average for many MBeans. Considering this, a run only for reading all attributes can take e.g. 400 MBeans * 8  attributes * 2ms = 6.4 seconds

On each of this 3200 attributes the whole rule set is applied individually. Assuming that people tend to generate quite generic and large rulesets so that they can have a uniform agent installation everywhere, this multiples to the number above.

Considering a standard scrape interval of 15s, I think its fair to say that performing monitoring that way is intrusive.

I've prepared a demo project to demonstrate this. It is only about reading attributes, not applying rule sets. The sample project consist of an MBean which mimics the algorithm of jmx_exporter. Time measurement is done with metrics and exported also via MBeans. See the README for details.

The result for an vanilla JBoss Wildfly 8.2.0 with only this test war deployed is:

  • MBeans: 880
  • Attributes total: 4137
  • Average attribute read time: 1.97 ms
  • Reading all MBeans and attributes: 11 s

And again, all that without any rule applied, only reading of the attribute. And believe me, Wildfly is not the most populated server I've seen. Also it is not uncommon in integration scenarios to have many application specific MBeans, e.g one for each Camel Route which will add to this basic number.

My suggestion is to apply the rule before and use it for the query instead of this sledge hammer approach.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions