ganglia / ganglia-web

Ganglia Web Frontend
BSD 3-Clause "New" or "Revised" License
316 stars 170 forks source link

Provide the option to remove unnecessary XML data #240

Closed cddude229 closed 10 years ago

cddude229 commented 10 years ago

The EXTRA_DATA and EXTRA_ELEMENT data returned by Ganglia is unused in many code paths, so by stripping it we can see XML parsing performance gains of about 50% for large data sets.

In production, gmetad was returning 26MB of XML data for the everything path. By filtering this subset of data out, it took parsing time from an average of 2.1s to 1.1s, a nearly 50% improvement.

By looking at the start_* functions, we can see if they use the EXTRA_DATA information at all. Since most of them don't, we can safely strip out the information.