I just launched a new instance ec2 instance of type i3en.3xlarge. Operating system is Ubuntu. I mounted the NVMe Instance store but every speed test I run is incredible low at around 7k iops. What am I doing wrong?
Here are the steps I did:
1) Check available ssds with nvme -list:
---------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- --------
/dev/nvme0n1 vol012301587a8724842 Amazon Elastic Block Store 1 8.59 GB / 8.59 GB 512 B + 0 B 1.0
/dev/nvme1n1 AWS16AAAC6C7BFAC4972 Amazon EC2 NVMe Instance Storage 1 7.50 TB / 7.50 TB 512 B + 0 B 0
2) create a new xfs file system for nvme1n1:
sudo mkfs -t xfs /dev/nvme1n1
3) mount it to /home
sudo mount /dev/nvme1n1 /home
4) check df -h:
ubuntu@ip-172-31-35-146:/home$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 7.7G 2.8G 4.9G 37% /
devtmpfs 47G 0 47G 0% /dev
tmpfs 47G 0 47G 0% /dev/shm
tmpfs 9.4G 852K 9.4G 1% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 47G 0 47G 0% /sys/fs/cgroup
/dev/loop0 25M 25M 0 100% /snap/amazon-ssm-agent/4046
/dev/loop3 43M 43M 0 100% /snap/snapd/14066
/dev/loop2 68M 68M 0 100% /snap/lxd/21835
/dev/loop1 56M 56M 0 100% /snap/core18/2284
/dev/loop4 62M 62M 0 100% /snap/core20/1242
/dev/loop6 56M 56M 0 100% /snap/core18/2253
/dev/loop5 44M 44M 0 100% /snap/snapd/14549
/dev/loop7 62M 62M 0 100% /snap/core20/1328
tmpfs 9.4G 0 9.4G 0% /run/user/1000
/dev/nvme1n1 6.9T 49G 6.8T 1% /home
5)run test with fio:
fio -direct=1 -iodepth=1 -rw=randread -ioengine=libaio -bs=4k -size=1G -numjobs=1 -runtime=1000 -group_reporting -filename=iotest -name=Rand_Read_Testing
Fio Results:
fio-3.16
Starting 1 process
Rand_Read_Testing: Laying out IO file (1 file / 1024MiB)
Jobs: 1 (f=1): [r(1)][100.0%][r=28.5MiB/s][r=7297 IOPS][eta 00m:00s]
Rand_Read_Testing: (groupid=0, jobs=1): err= 0: pid=1701: Sat Jan 29 22:28:17 2022
read: IOPS=7139, BW=27.9MiB/s (29.2MB/s)(1024MiB/36717msec)
slat (nsec): min=2301, max=39139, avg=2448.98, stdev=311.68
clat (usec): min=32, max=677, avg=137.06, stdev=26.98
lat (usec): min=35, max=680, avg=139.59, stdev=26.99
clat percentiles (usec):
| 1.00th=[ 35], 5.00th=[ 99], 10.00th=[ 100], 20.00th=[ 124],
| 30.00th=[ 125], 40.00th=[ 126], 50.00th=[ 139], 60.00th=[ 141],
| 70.00th=[ 165], 80.00th=[ 167], 90.00th=[ 169], 95.00th=[ 169],
| 99.00th=[ 172], 99.50th=[ 174], 99.90th=[ 212], 99.95th=[ 281],
| 99.99th=[ 453]
bw ( KiB/s): min=28040, max=31152, per=99.82%, avg=28506.48, stdev=367.13, samples=73
iops : min= 7010, max= 7788, avg=7126.59, stdev=91.80, samples=73
lat (usec) : 50=1.29%, 100=9.46%, 250=89.19%, 500=0.06%, 750=0.01%
cpu : usr=1.43%, sys=2.94%, ctx=262144, majf=0, minf=12
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
issued rwts: total=262144,0,0,0 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=1
Run status group 0 (all jobs):
READ: bw=27.9MiB/s (29.2MB/s), 27.9MiB/s-27.9MiB/s (29.2MB/s-29.2MB/s), io=1024MiB (1074MB), run=36717-36717msec
Disk stats (read/write):
nvme1n1: ios=259894/5, merge=0/3, ticks=35404/0, in_queue=35404, util=99.77%
According to benchmarks like here the iops performance should be way better.
So am I missing something here?
Thanks in advance