On 2019/1/16 3:16, Vivek Goyal wrote:
On Thu, Dec 27, 2018 at 10:57:21AM +0800, jiangyiwen wrote:
[..]
4. When I use fio with psync, write/read only 20% improve than 9p, I think psync can be more used than mmap. This user-case may need to improved.
Can you send me your fio job. I want to try it out.
fio -filename=/mnt/virtio_fs/file -rw=read -bs=4k -size=6G -iodepth=1 -ioengine=psync -numjobs=1 -group_reporting -name=xxx -time_based -runtime=120
Ok, finally I tried this in bunch of configurations. without dax and cache=none, I see roughly 100% improvement.
cache=none ========== virtio-9p: 28MB/s virtio-fs: 59MB/s
Above is without dax enabled and libfuse daemon filters O_DIRECT flag on host so that file will be cached in host (despite the fact guest opened it with O_DIRECT).
I then tried "cache=always" and did direct I/O from guest. This will avoid page cache in guest but will use page cache on host.
cache=always =========== virtio-fs: 52MB/s virtio-fs (dax): 175MB/s
Notice that with dax performance is alsmost 5x times better as compared to virtio-9p.
Following is my fio job for testing.
======================================= [global] name=fio-psync rw=read direct=1 numjobs=1 runtime=60 bs=4k
[file1] size=6G ioengine=psync iodepth=1 filename=fio-psync-file ========================================
So I think even without dax, performance improvement is significant and enabling dax speeds it up very significantly.
Thanks Vivek
.
Hi Vivek, Thank your very much, this is great. Yiwen.