You can estimate the amount of time required for a migration job based on the migration phases. These migration phases are pre-migration, migration, and post-migration. The migration time is proportional to the number of servers that you want to migrate and the actual data volume. We recommend that you perform a test migration to estimate the amount of time required for a migration job. This topic describes how to estimate the time required for migration and how to test the data transfer speed.
Background information
If you need to migrate a server, Server Migration Center (SMC) first creates an intermediate instance for your account. Then, the system transfers data from the source server to the cloud disk of the intermediate instance and creates an Elastic Compute Service (ECS) image from the disk data of the intermediate instance. If you migrate the source server to an ECS instance, the destination instance is used as an intermediate instance. For more information, see Migration principles. Therefore, the migration time is the sum of the data transfer time and the time required to create an image. For more information, see the Estimate the time required for migration section of this topic.
During a migration process, the speed of data transfer from the source server to the intermediate instance is the primary factor that determines the migration time. For more information, see the Test the data transfer speed section of this topic.
The following table describes the possible causes and solutions if the data transfer speed is lower than the measured speed.
Possible cause | Solution |
The source server and the intermediate instance are in different regions or countries. Data transfer across regions and countries is sometimes slower than that in the same region. | Check whether the network for the source server is the same as that for the intermediate instance in the destination Alibaba Cloud region. If the problem is caused by cross-region transfer, you can perform the following steps:
|
The outbound bandwidth of the source server and the inbound bandwidth of the intermediate instance are used for migration. The bandwidth of the intermediate instance is limited. By default, the maximum inbound public bandwidth is 100 Mbit/s. Therefore, the maximum transfer speed over the Internet is 100 Mbit/s by default. Important During the migration, if the destination instance uses an EIP (Elastic IP), the inbound public bandwidth of the destination instance will be constrained by the inbound public bandwidth of the EIP. The specific rules are as follows:
| To resolve this error, you can use one of the following methods:
Important If the public IP address of an instance is converted to a pay-as-you-go EIP, the IP address cannot be restored to its initial state. When the instance is released, the EIP is not released. Therefore, you must manually release the pay-as-you-go EIP after the migration to prevent additional charges. For more information, see Release a pay-as-you-go EIP. |
The source server has performance bottlenecks. For example, limited CPU, memory, and disk performance result in poor SMC transfer efficiency. |
|
Dynamically changing large files, such as data files or log files of databases exist in the disk partitions of the source server. |
|
A large number of small files, such as large amounts of data in distributed file systems and file servers exist in the disk partitions of the source server. | Exclude the related directories by specifying parameters in the filtering configuration file and retry the migration job. For more information, see the "How do I exclude files or directories from a migration job?" section of the FAQ topic. You can migrate the excluded files or directories later by using other solutions. |
The outbound bandwidth of the source server is low. |
|
The examples in this topic are for reference only.
Estimate the time required for migration
The following figure describes how to estimate the time required for migration. Take note of the following information:
A snapshot is created at a speed of about 100 MB/s.
For information about how to test the network speed, see the Test the data transfer speed section of this topic.
If the actual disk usage of a server is 10 GB and the outbound bandwidth of the server of 10 Mbit/s, you can use the following method to estimate the migration time:
Convert units.
Actual data volume: 10 GB = 10 × 1,024 = 10,240 MB
Actual network speed: 10 Mbit/s = 10/8 = 1.25 MB/s
Calculate the data transfer time.
Data transfer time: 10,240/1.25 = 8,192 seconds = 2.27 hours
Calculate the image creation time.
Image creation time: 10,240/100 = 102 seconds = 0.03 hours
Calculate the migration time.
Migration time: 2.27 + 0.03 = 2.3 hours
Test the data transfer speed
The speed of data transfer from the source server to the intermediate instance is determined by the outbound bandwidth of the source server and the inbound bandwidth of the intermediate instance. By default, the inbound bandwidth of the intermediate instance is 100 Mbit/s.
Examples:
The outbound bandwidth of the source server is 50 Mbit/s and the inbound bandwidth of the intermediate instance is 100 Mbit/s. The actual transfer speed is limited by the source server and does not exceed 50 Mbit/s.
The outbound bandwidth of the source server is 150 Mbit/s and the inbound bandwidth of the intermediate instance is 100 Mbit/s. The actual transfer speed is limited by the intermediate instance and does not exceed 100 Mbit/s.
The instance bandwidth of 1 Mbit/s displayed in the ECS console is the outbound bandwidth of the intermediate instance. The 1 Mbit/s bandwidth does not affect the actual migration speed because the inbound bandwidth of the intermediate instance is used during migration.
To test the transfer speed by using iPerf, perform the following steps:
Create a pay-as-you-go ECS instance in the destination Alibaba Cloud region.
On the ECS instance, perform the following steps:
Install iPerf.
Run iPerf in server mode.
Add a rule to the security group of the instance to allow traffic on the ports required by iPerf.
On the source server, perform the following steps:
Install iPerf.
Run iPerf in client mode. Set the IP address of the destination server to the public IP address of the pay-as-you-go instance created in Step 1.
Example of how to perform a transfer speed test on a Linux instance
A CentOS 7 instance is used in the following example. The operations may vary with the version of your operating system.
Create a pay-as-you-go ECS instance that runs CentOS 7 in the destination Alibaba Cloud region.
Add an inbound rule to the security group of the instance to allow traffic on the ports required by iPerf.
The default port for iPerf, TCP 5001, is used in this example.
Connect to the CentOS 7 instance.
On the CentOS 7 instance, perform the following steps:
Run the following command to install iPerf:
yum -y install iperf3
Run the following command to run iPerf in server mode:
iperf3 -s
On the source server, perform the following steps:
Download and install iPerf.
Run the following command to run iPerf in client mode:
Replace
<Instance IP address>
in the command with the public IP address of the CentOS 7 instance created in Step 1.iperf3 -c <Instance IP address> -i 1 -d
Wait until the test is complete, and then record the test results.
Example of how to perform a transfer speed test on a Windows instance
A Windows Server 2008 instance is used in the following example. The operations may vary with the version of your operating system.
Create a pay-as-you-go ECS instance that runs Windows Server 2008 in the destination Alibaba Cloud region.
Add an inbound rule to the security group of the instance to allow traffic on the ports required by iPerf.
The default port for iPerf, TCP 5001, is used in this example.
Connect to the Windows Server 2008 instance.
On the Windows Server 2008 instance, perform the following steps:
Download and install iPerf.
Open the Command Prompt.
Run the
cd <Directory of iPerf>
command to go to the directory of iPerf.Run the
iperf3.exe -s
command to run iPerf in server mode.
On the source server, perform the following steps:
Download and install iPerf.
Run the following command to run iPerf in client mode:
Replace
<Instance IP address>
in the command with the public IP address of the Windows Server 2008 instance created in Step 1.iperf3.exe -c <Instance IP address> -i 1 -d
Wait until the test is complete, and then record the test results.