VMware vSphere

 View Only
  • 1.  How to get CPU Percentage vs Limit in the VIC?

    Posted Sep 29, 2008 10:47 PM

    I've got an ESX Server which has two 1.994 GHz processors that I'm using for testing. There are 4 guest machines on the server, all running Linux. One guest is shut down. Two guests are on, but are essentially idle. Guest 4 is also on. It has its 1 virtual CPU limited to 850 MHz. I have maximized the CPU on guest 4 by running several repeated gpg encryption processes, and a repeated rpm --verify. The VIC's Performance Chart for CPU for guest 4 shows it using just about 850 MHz.

    Here's my problem: the Performance Chart also shows that guest 4 is using about 42% of the CPU, with an average of 42.60%. Since I have limited that guest to 850 MHz, and the guest is using about 850 MHz of CPU, shouldn't I see about 100% CPU usage in the Performance Chart?

    Why is it only reporting about 42%? As nearly as I can tell, the 42.60% is what the guest would get if I had not limited it. That is:

    42.60% * x = 850 MHz

    .4260 * x = 850 MHz

    x = 850 MHz/.4260

    x = 1995.305164319 Mhz ~ 1995 MHz

    That is, ESX would give the guest one of the CPU's of the ESX host, and each of those CPU's is 1.994 GHz or 1994 MHz. (I'm not worried about the 1 MHz difference versus the above calculation.)

    The shut down guest has a 1 "share" of CPU. The 3 other CPU's have equal number of "shares".

    Is there a way to get the VIC to report CPU usage versus the limit of 850 MHz, and not the maximum ESX would give the guest if it was unlimited?

    Yes, I know, since I have 4 guests and only 1 is doing anything, why limit it? That's because this is a test system. On my production system, I would like to similarly limit some of the guests. I also want to know when those guests are using up all of their allocated CPU. Maybe then I might give them a bigger allocation. Or I might decide to check to see that there if there is some sort of runaway process on that guest. One thing I'd like to do is have someone come in over the weekend and occasionally run the VIC and see if a guest is using up all 100% of its CPU. It's much easier for the weekend person to look at the percentage than to have to worry about whether each guest is using up their allocation. I don't want to have the weekend person having to think, "OK, there's machine A and it is using 1250 MHz but it is allocated 2000 MHz, and so it is OK. Machine B, though is allocated 850 MHz and is using 850 Mhz so maybe there's something wrong."

    Thanks,

    --Seth



  • 2.  RE: How to get CPU Percentage vs Limit in the VIC?

    Posted Sep 30, 2008 01:14 PM

    Hello,

    Moved to VirtualCenter forum.


    Best regards,

    Edward L. Haletky

    VMware Communities User Moderator

    ====

    Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.

    CIO Virtualization Blog: http://www.cio.com/blog/index/topic/168354

    As well as the Virtualization Wiki at http://www.astroarch.com/wiki/index.php/Virtualization