Cloud service providers frequently identify host third parties by allocated resources, but variations in hardware, design, and performance can result in differing capabilities, even between similar configurations. Hence, We will need to use FIO to test the performance.
A significant part of the cloud server's overall performance comes from the read and write speed storage system. Fio, which is an I/O benchmarking and stress testing tool available on a multitude of platforms, is an excellent choice to use for this purpose. Install a file using the commands that refer to your device below.
First, install FIO
Take the operating system CentOS that comes with XRCLOUD Platform as an example:
Enter in the shell's command-line interface: yum install fio to install Fio. It can also be compiled and installed:
yum install libaio-devel
Second, use the FIO to test the performance
Test example 1: FIO Random Read
Type the following commands in the CentOS command-line interface:
fio -filename=/dev/sdb1 -direct=1 -iodepth 1 -thread -rw=randread -ioengine=psync -bs=4k -size=32G -numjobs=32 -runtime=10 -group_reporting -name=mytest
The following are the ioengine types listed below. You can choose according to your preference:
filename=/dev/sdb test file name, usually select the data directory of the disk to be tested. Please note that it can only be a partition, not a directory. Otherwise, it will destroy the data.
direct=1 The test process bypasses the buffer provided by the machine. It makes the test results more realistic.
iodepth 1 Queue depth, which is meaningful only when using libaio. This is a parameter that can affect IOPS, usually 1.
rw=randwrite test random write I/O
rw=randrw test random write and read I/O
ioengine=psync io engine uses pync method
bs=512 The block file size of a single io is 512b
bsrange=512-2048 Same as above, specify the size range of the data block
size=32G The test file size this time is 32g, and the test is performed with 512b io each time. This size cannot exceed the size of the filename. Otherwise, an error will be reported.
numjobs=128 This test thread is 128
runtime=1000 The test time is 1000 seconds. If you do not write, you will keep dividing the 5g file into 4k until you finish writing each time.
rwmixwrite=30 In the mixed read-write mode, write accounts for 30%
group_reporting summarizes the information of each process about the displayed results.
lockmem=1g means to use 1g of memory for testing.
zero_buffers means to initialize the system buffer with 0.
nrfiles=8 indicates the number of files generated by each process.
read sequential read
write sequential write
rw, read-write sequential mixed read and write
randwrite random write
randread random read
randrw random mixed read and write
Test example 2: FIO Sequential Reading
fio -filename=/dev/sdb -direct=1 -iodepth 32 -thread -rw=read -ioengine=psync -bs=512 -size=32G -numjobs=128 -runtime=10 -group_reporting -name=mytest
Test example 3: FIO Random Write
fio -filename=/dev/sdb -direct=1 -iodepth 32 -thread -rw=randwrite -ioengine=psync -bs=512 -size=32G -numjobs=128 -runtime=10 -group_reporting -name=mytest
Test example 4: FIO Sequential Write
fio -filename=/dev/sdb -direct=1 -iodepth 32 -thread -rw=write -ioengine=psync -bs=512 -size=32G -numjobs=128 -runtime=10 -group_reporting -name=mytest
Test example 5: Mixed Random Read and Write:
fio -filename=/dev/sdb -direct=1 -iodepth 32 -thread -rw=randrw -rwmixread=70 -ioengine=psync -bs=512 -size=32G -numjobs=128 -runtime=10 -group_reporting -name=mytest -ioscheduler=noop
The following are the performance test results of XRCLOUD Server :
The tested IOPS of XRCLOUD Server can reach 210122 level, which resulted in a high performance, much higher than the other cloud service provider's performance.