Currently most of the data retrieved from VMware service (vCenter or Hypervisor) are stored as were received - in XML format. The parsing is done every time a poller requests value.
There are two problems with it:
- the vmware collector is locked while poller parses the required value. It's especially bad for discovery requests where multiple hypervisor/virtual machine data are parsed. However it also adds up when single requests are parsed.
- usually data from vmware services is retrieved with less frequency than pollers are querying it. This causes the same value being parsed mulitple times.
To fix it vmware collector must parse the data upon receiving and store already parsed values. This will speed up the value retrieval process and also reduce the shared memory requirements.
Another places to improve:
- increase lookup speed of performance entity counters (zbx_vmware_perf_entity_t:counters, use vector bsearch instead of search or switch to hashset)
- store performance counters as integer type instead of string