VMware

This Question is Possibly Answered

1 "correct" answer available (10 pts) 2 "helpful" answers available (6 pts)
4 Replies Last post: Jul 3, 2009 12:18 PM by dmitrif  

Gathering performance metrics efficiently posted: Jun 19, 2009 6:10 AM

Click to view ikrolo's profile Lurker 1 posts since
Jun 18, 2009

Hi,

I'm querying a Virtual Center for a set of Performance Metrics for multiple MORs through Java. I'm trying to determine what are the most efficient ways.

The MORs are all the Virtual Machines belonging to one host. I'm probing for the most recent sample of 20 seconds, which I understand goes to the host directly since the time interval is less than the past 30 minutes (though I can't understand why that'd be more efficient than getting the stats from the VC database).

I have done it in 2 ways:

1. Calling service.queryPerf() multiple times, with a unique PerfQuerySpec each time which has a list of metrics and a MOR I'm interested in.

2. Calling service.queryPerf() one time, passing it a list of unique PerfQuerySpecs - one for each MOR with the same list of metrics in each PerfQuerySpec.

The strange thing is that doing it either way resulted in the same speed. I would have thought that option 2 would have been faster, but I'm starting to think providing it an array of PerfQuerySpecs is just a convenience, and it just loops through them and does the same thing as option 1....

Also, to speed up performance metrics gathering, I have seen in the Best Practices webinar that it's a good idea to split the requests into multiple threads. Would it be best to split all metrics gatherings into separate batches by hosts and items lower in the hierarchy (like the VMs that belong to a host), since probing the VC for a time interval of less than 30 minutes probes the hosts?

Re: Gathering performance metrics efficiently

1. Jun 22, 2009 9:55 PM in response to: ikrolo
Click to view Chandrashekhar's profile Enthusiast 53 posts since
Mar 19, 2009

hi buddy,

Even i also want to get performance counter information of esx hosts and its virtual machines by connecting to vCenter server only. Can u give me ur sample code?

Re: Gathering performance metrics efficiently

2. Jun 22, 2009 9:57 PM in response to: ikrolo
Click to view Chandrashekhar's profile Enthusiast 53 posts since
Mar 19, 2009

Hi buddy,

even i also want to get performance counter information from esx servers and its corrosponding vm's. Can u give me ur sample code? Or atleast idea behind it?

Re: Gathering performance metrics efficiently

3. Jul 2, 2009 10:04 AM in response to: Chandrashekhar
Click to view heyitspablo's profile Hot Shot 163 posts since
Feb 26, 2007
We have been collecting a lot of info around Performance Monitoring.. Check out latest sample code and video Sessions can be found here..

http://www.vmware.com/communities/content/developer/webinars/performance.html

This will also be a hot session in upcoming Developer Day @ VMworld 2009

Re: Gathering performance metrics efficiently

4. Jul 3, 2009 12:19 PM in response to: ikrolo
Click to view dmitrif's profile Enthusiast 71 posts since
May 13, 2008
From my measurements looks like the second method is up to 40% faster, but when processing large sets it might timeout.

Developer Social Media

Communities