Linux云服务器硬盘、内存性能测试

2021-07-05

测试内容

小文件写入硬盘
dd if=/dev/zero of=/tmp/benchmark bs=1 count=$((2*1024)) oflag=dsync

每次写入1字节,写入2×1024次。

大文件写入硬盘
dd if=/dev/zero of=/tmp/benchmark bs=256M count=1 oflag=dsync

一次写入256MiB。

小文件写入内存
dd if=/dev/zero of=/dev/shm/benchmark bs=1 count=$((2*1024*1024)) oflag=dsync

每次写入1字节,写入2×1024×1024次。

厂商 型号 CPU 内存 硬盘 IOPS 小文件硬盘 大文件硬盘 小文件内存
阿里云 ecs.t5-lc1m1.small 1 vCPU 1 GiB 高效云盘 1960 3.99505 2.59817 2.32931
阿里云 ecs.t1.small 1 vCPU 1 GiB 普通云盘 200 ~ 500 7.56844 3.33942 3.28275
Azure Standard B1s 1 vCPU 1 GiB Premium SSD LRS P6 240 ~ 3500 8.96153 6.08307 2.90616
Google e2-micro 2 vCPU 1 GB Standard persistent disk 5.01582 0.549051 3.14037
Google f1-micro 1 vCPU 0.6 GB Standard persistent disk 8.5119 0.914937 3.10327
Oracle VM.Standard.E2.1.Micro 2 vCPU 1 GB 2820 3.04772 4.59162 3.69599
AWS Lightsail 1 vCPU 1 GB SSD 4.36714 3.33385 3.27697
DigitalOcean Basic 1 vCPU 1 GB SSD 0.953875 0.694678 2.76112