In the disk performance test, if the first sector number is not 4-KiB aligned, the disk performance will be greatly affected. Ensure that the first sector number is 4-KiB aligned before you start the test.
To test the performance of a shared disk, the following requirements must be met:
If these ECSs fail to meet the anti-affinity requirement, the shared disk cannot reach the optimal performance.
The testing process for Windows and Linux is different.
The way you test disk performance depends on the server OS. This section uses Windows Server 2019 Standard 64-bit as an example. For other Windows OSs, see the corresponding OS documentations.
Install the performance measurement tool Iometer before the test. You can obtain the tool at http://www.iometer.org/.
The system information window is displayed.
If you delete the partition and select another first sector number for 4-KiB alignment, you will lose all the data on that partition.
When the disk IOPS and throughput are tested, the parameter settings for Iometer and fio are the same. For details, see Table 1.
The following example uses Iometer to test the disk performance.

In this example, the test run time is set to 10 minutes, with 60 seconds ramp up time. Disk performance is tested after the writes are stable.



If you use an old version Linux OS, for example CentOS 6.5, and run fdisk to create partitions, the default first sector number will not be 4-KiB aligned, which will greatly affect the test performance. For this reason, if such an OS is used, you are advised to select a new first sector number, one that is 4-KiB aligned, when creating partitions.
The way you test disk performance depends on the server OS. This section uses CentOS 7.2 64-bit as an example. For other Linux OSs, see the corresponding OS documentations.
yum install fio
fdisk -lu
Information similar to the following is displayed:
[root@ecs-centos sdc]# fdisk -luDisk /dev/xvda: 10.7 GiB, 10737418240 bytes, 20971520 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk label type: dosDisk identifier: 0x7db77aa5Device Boot Start End Blocks Id System/dev/xvda1 * 2048 20968919 10483436 83 LinuxDisk /dev/xvdb: 10.7 GiB, 10737418240 bytes, 20971520 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk /dev/xvdc: 53.7 GiB, 53687091200 bytes, 104857600 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk label type: dosDisk identifier: 0x3cf3265cDevice Boot Start End Blocks Id System/dev/xvdc1 2048 41943039 20970496 83 Linux
If you delete the partition and select another first sector number for 4-KiB alignment, you will lose all the data on that partition.
Table 1 lists the fio test parameters.
Parameter | Description |
|---|---|
direct | Defines whether direct I/O is used.
|
iodepth | Defines the I/O queue depth. This queue depth refers to the queue depth of each thread regardless of whether a single or multiple threads are used in the test. Total concurrent I/Os of fio = iodepth × numjobs Examples:
|
rw | Defines the test read/write policy.
|
ioengine | Defines how fio delivers the I/O request (synchronously or asynchronously).
|
bs | Defines the I/O block size. The unit can be KiB, Kb, MiB, and Mb, and the default value is 4 KiB. |
size | Defines the amount of data processed by the test I/Os. If parameters, such as runtime, are not specified, the test ends when fio has processed all the specified data amount. The value can be a number with a unit or percentage. A number with a unit indicates the read/write data amount, for example size=10G, indicating a 10-GiB read/write data amount. A percentage indicates the ratio of read/write data amount to the total size of files, for example size=20%, indicating the read/write data amount takes 20% of the total file space. |
numjobs | Defines the number of concurrent threads. |
runtime | Defines the test time. If this parameter is not specified, the test ends until the specified data amount is processed by the block size defined using parameter size. |
group_reporting | Defines the test result display mode. The parameter value displays the statistics on a single thread instead of that on all jobs. |
filename | Defines the name of the test file or device.
|
name | Defines the test task name. |