Simon Long has shared with us this <strong>fantastic</strong> article he wrote regarding VMotion performance.  More specifically, fine tuning concurrent VMotions allowed by vCenter.  This one is going in our document repository and tweaks ‘n’ tricks collection.  Thank you Simon and everyone please remember that virtualization is not best enjoyed in moderation!

<!--more-->Simon can be reached via email at contact (at) simonlong.co.uk as well as <a href="http://twitter.com/SimonLong_">@SimonLong_</a> on Twitter.

<hr />I’ll set the scene a little….

I’m working late, I’ve just installed Update Manager and I‘m going to run my first updates. Like all new systems, I’m not always confident so I decided “Out of hours” would be the best time to try.

I hit “Remediate” on my first Host then sat back, cup of tea in hand and watch to see what happens….The Host’s VM’s were slowly migrated off <span style="text-decoration: underline;">2 at a time</span> onto other Hosts.

“It’s gonna be a long night” I thought to myself. So whilst I was going through my Hosts one at time, I also fired up Google and tried to find out if there was anyway I could speed up the VMotion process. There didn’t seem to be any article or blog posts (that I could find) about improving VMotion Performance so I created a new Servicedesk Job for myself to investigate this further.

3 months later whilst at a product review at VMware UK, I was chatting to their Inside Systems Engineer, Chris Dye, and I asked him if there was a way of increasing the amount of simultaneous VMotions from 2 to something more. He was unsure, so did a little digging and managed to find a little info that might be helpful and fired it across for me to test.

After a few hours of basic testing over the quiet Christmas period, I was able to increase the amount of simultaneous VMotions…Happy Days!!

But after some further testing it seemed as though the amount of simultaneous VMotions is actually set per Host. This means if I set my vCenter server to allow 6 VMotions, I then place 2 Hosts into maintenance mode at the same time, there would actually be 12 VMotions running simultaneously. This is certainly something you should consider when deciding how many VMotions you would like running at once.

Here are the steps to increase the amount of Simultaneous VMotion Migrations per Host.

1. RDP to your vCenter Server.
2. Locate the vpdx.cfg (Default location “C:Documents and SettingsAll UsersApplication DataVMwareVMware VirtualCenter”)
3. Make a Backup of the vpdx.cfg before making any changes
4. Edit the file in using WordPad and insert the following lines between the &lt;vpdx&gt;&lt;/vpdx&gt; tags;
<p style="padding-left: 30px;">&lt;ResourceManager&gt;
&lt;maxCostPerHost&gt;12&lt;/maxCostPerHost&gt;
&lt;/ResourceManager&gt;

5. Now you need to decide what value to give “maxCostPerHost”.
<p style="padding-left: 30px;">A Cold Migration has a cost of <strong>1</strong> and a Hot Migration aka VMotion has a cost of <strong>4</strong>. I first set mine to 12 as I wanted to see if it would now allow 3 VMotions at once, I now permanently have mine set to <strong>24</strong> which gives me <strong>6</strong> simultaneous VMotions per Host (6×4 = 24).</p>
<p style="padding-left: 30px;">I am unsure on the maximum value that you can use here, the largest I tested was 24.</p>

6. Save your changes and exit WordPad.
7. Restart “VMware VirtualCenter Server” Service to apply the changes.

Now I know how to change the amount of simultaneous VMotions per Host, I decided to run some tests to see if it actually made any difference to the overall VMotion Performance.

I had 2 Host’s with 16 almost identical VM’s. I created a job to Migrate my 16 VM’s from Host 1 to Host 2.

Both Hosts VMotion vmnic was a single 1Gbit nic connected to a CISCO Switch which also has other network traffic on it.

<img src="http://farm2.static.flickr.com/1056/3171066091_f252343c32_o.jpg" alt="" width="435" height="296" />
The Network Performance graph above was recorded during my testing and is displaying the “Network Data Transmit” measurement on the VMotion vmnic. The 3 sections highlighted represent the following;

<span style="color: #ff0000;"><strong>Section 1</strong></span> - 16 VM’s VMotioned from Host 1 to Host 2 using a maximum of 6 simultaneous VMotions.
<strong>Time taken = 3.30</strong>

<span style="color: #ff0000;"><strong>Section 2</strong></span> - This was not a test, I was simply just migrating the VM’s back onto the Host for the 2nd test (Section 3).

<strong><span style="color: #ff0000;">Section 3</span></strong> - 16 VM’s VMotioned from Host 1 to Host 2 using a maximum of 2 simultaneous VMotions.
<strong>Time taken = 6.36</strong>

<strong>Time Different = 3.06</strong>
3 Mins!! I wasn’t expecting it to be that much. Imagine if you had a 50 Host cluster…how much time would it save you?
I tried the same test again but only migrating 6 VM’s instead of 16.

Migrating off 6 VM’s with only <strong>2</strong> simultaneous VMotions allowed.
<strong>Time taken = 2.24</strong>

Migrating off 6 VM’s with <strong>6</strong> simultaneous VMotions allowed.
<strong>Time taken = 1.54</strong>

<strong>Time Different = 30secs</strong>

It’s still an improvement all be it not so big.

Now don’t get me wrong, these tests are hardly scientific and would never have been deemed as completely fair test but I think you get the general idea of what I was trying to get at.

I’m hoping to explore VMotion Performance further by looking at maybe using multiple physical nics for VMotion and Teaming them using <a href="http://en.wikipedia.org/wiki/EtherChannel">EtherChannel</a> or maybe even using 10Gbit Ethernet. Right now I don’t have the spare Hardware to do that but this is definitely something I will try when the opportunity arises.