Large-Scale Performance Data Retrieval
The example described in the previous sections shows how to retrieve performance data for a single entity. When you design your application to retrieve performance data on a large scale, take the following information into consideration for more efficient processing.
- Use CSV formatted output. CSV format provides a more compact representation of the output data which can save on meta-data overhead.
- Create query specifications to reference a set
of vSphere entities.
- Using one QueryPerf method call per entity is not efficient.
- Using a single call to QueryPerf to retrieve all of the performance data is not efficient.
- As a general rule, specify between 10 and 50 entities in a single call to the QueryPerf method. This is a general recommendation because your system configuration may impose different constraints.
- Do not retrieve statistics more frequently than they are refreshed. For example, when you retrieve 20-second interval data, the data will not change until the next 20-second data collection event.
- Use
QueryAvailablePerfMetric only
when you intend to send a query for a specific counter using a specific
performance interval. The method will return
PerfMetricId objects that you
can use for the query.
In all other cases, create the PerfMetricId objects for the query.
- For the counterId property, use the counter IDs from the PerformanceManager counter list (PerformanceManager.perfCounter[].key).
- For the instance property, specify an asterisk (“*”) to retrieve instance and aggregate data or a zero-length string (““) to retrieve aggregate data only.