How much bandwidth for offsite VM replication?

One of the hardest parts of planning a virtualization project for a customer is telling them how much bandwidth they are going to need in order to replicate their data from one site to another. Not only is every case different, but because so many factors affect change rates, it is near impossible to give a good recommendation without knowing exactly how the customer’s business works.

For example, let’s say a company has a part-time employee that comes in on Friday to scan all of the invoices from that week. So that means the replication on Friday night will be much larger than most other days, and if it’s not properly planned for then you could run into capacity issues. Obviously, this is just one example, but there are many other things that could be affecting daily change rates.

There is hope though. If you have VMware 4.0 or better, and your virtual machines are HW version 7 compatible, you can utilize change block tracking to track the size of daily changes. This is golden for planning out your off-site replication. The only catch is that if you are currently on all physical machines you can’t track changes until after you P2V all of them. With that, you also have to make sure the customer understands that the project will have to be in two phases…. the first to do the physical to virtual conversion, and then second…. track the CBT data and afterwords setup replication.

So how do you track CBT? Powershell scripts are the best I’ve found so far. But I’ve heard rumors that the next release of Veeam’s Backup and Replication product will include an easy to use CBT tool. But until then, powershell/powercli and some scripting will do the trick without causing too much trouble.

The best resource that I’ve found so far is part of the VMGuru Blog site, he has created a great script that makes CBT Tracking very easy.

After installing VMware PowerCLI, I pasted his script into a file and ran it with the CMD line options that he specifies, the only difference is that I put multiple VM’s into the same CMD script and call the entire thing with a single Windows Scheduled Task.

Here is what my script looks like:
powershell -command "& '.CBT_Tracker.ps1' -VMName VM1 -vimHost -vimuser jpaul -vimpass mypassword"
powershell -command "& '.CBT_Tracker.ps1' -VMName VM2 -vimHost -vimuser jpaul -vimpass mypassword"
powershell -command "& '.CBT_Tracker.ps1' -VMName VM3 -vimHost -vimuser jpaul -vimpass mypassword"
powershell -command "& '.CBT_Tracker.ps1' -VMName VM4 -vimHost -vimuser jpaul -vimpass mypassword"
powershell -command "& '.CBT_Tracker.ps1' -VMName VM5 -vimHost -vimuser jpaul -vimpass mypassword"
powershell -command "& '.CBT_Tracker.ps1' -VMName VM6 -vimHost -vimuser jpaul -vimpass mypassword"
powershell -command "& '.CBT_Tracker.ps1' -VMName 'Virtual machine 7' -vimHost -vimuser jpaul -vimpass mypassword"
powershell -command "& '.CBT_Tracker.ps1' -VMName 'Virtual machine 8' -vimHost -vimuser jpaul -vimpass mypassword"

After scheduling this task and waiting a few days you will get a CSV file for each virtual machine. Now it’s just a matter of breaking out your Excel skills and generating a customer friendly graph that will show how much change.

After a little manipulation you can come up with something like this:

UPDATE: Or Something like this (click to enlarge)

This graph shows the 5 VM’s that I was monitoring, and it stacks the sections on top of one another so that you can easily see the total amount of change data. From this, and the CSV files, you can add up the total amount of data change per day, then use that to calculate how much BW you will need.

Mbps Needed = 8 * ((Total daily change MB / Replication Window in hours) / 3600)

Explanation: The amount of bandwidth you need in Mbps to replicate your data is equal to your total MB of daily change…. divided by the number of hours that you have available to replicate… divided by 3600… multiplied by 8. So if you can only replicate data from 10pm to 6am then your replication window is 8 hours. The reason we divide by 360 is because there are 3600 seconds in an hour. And finally we multiply by 8 because we want to convert MegaBytes to MegaBits. Furthermore if you wanted the number to be in Kilobits per second simply multiply Mbps by 1024.

The number you come up with is pretty safe as well, because it doesn’t factor in compression and deduplication. So after you dedupe and compress with something like Veeam, you should have room for growth.


Share This Post

6 Responses to "How much bandwidth for offsite VM replication?"

  1. Hi,

    Great Post – thanks.

    Do you still have a copy of ‘CBT_Tracker.ps1’? Looked for the download on but can’t find it anywhere?


Post Comment