On Fri, Sep 09, 2011 at 05:44:36PM +0800, Zhi Yong Wu wrote: > Today, i did some basical I/O testing, and suddenly found that qemu write and > rw speed is so low now, my qemu binary is built on commit > 344eecf6995f4a0ad1d887cec922f6806f91a3f8. > > Do qemu have regression? > > The testing data is shown as below: > > 1.) write > > test: (g=0): rw=write, bs=512-512/512-512, ioengine=libaio, iodepth=1
Please post your QEMU command-line. If your -drive is using cache=writethrough then small writes are slow because they require the physical disk to write and then synchronize its write cache. Typically cache=none is a good setting to use for local disks. The block size of 512 bytes is too small. Ext4 uses a 4 KB block size, so I think a 512 byte write from the guest could cause a 4 KB read-modify-write operation on the host filesystem. You can check this by running btrace(8) on the host during the benchmark. The blktrace output and the summary statistics will show what I/O pattern the host is issuing. I suggest changing your fio block size to 8 KB if you want to try a small block size. If you want a large block size, try 64 KB or 128 KB. Stefan