VM write performance slow

jhonnytay

Member
Aug 24, 2020
23
0
21
42
Hi Sir,

Would like to know why VM write performance are very slow:

dd if=/dev/zero of=/tmp/test2.img bs=512 count=1000 oflag=dsync
1000+0 records in
1000+0 records out
512000 bytes (512 kB, 500 KiB) copied, 2.22336 s, 230 kB/s



The VM is provisioned under iscsi-lvm storage. With 10G NIC for end to end connection.

Best Regards,
Jhonny
 
dd if=/dev/zero is really not a good way to benchmark. (because it's sequential, and it's writing zero).
alors bs=512 seem quite low to simulate real workload. (maybe try with 4k block for iops bench, and bigger block like 1M for throughput bench)

what is your physical storage ? (local? network ? hdd ? sdd ? how many disk ?)

can you try to bench with fio
(add a second disk for benchmark)


Code:
sequential write with big 4M block (throughput)
fio --filename=/dev/sdb --ioengine=libaio --direct=1 --rw=write --blocksize=4M --iodepth=128 --name=benchmark 


random write with small 4k block (iops)
fio --filename=/dev/sdb --ioengine=libaio --direct=1 --rw=randwrite --blocksize=4k --iodepth=128 --name=benchmark 


random read with small 4k block (iops)
fio --filename=/dev/sdb --ioengine=libaio --direct=1 --rw=randread --blocksize=4k --iodepth=128 --name=benchmark 


sequential write with bug 4M block (throuhput)

fio --filename=/dev/sdb --ioengine=libaio --direct=1 --rw=read --blocksize=4M --iodepth=128 --name=benchmark