[Virtio-fs] [PATCH v4 0/2] virtiofsd: Improve io bandwidth by replacing pwrite with pwritev

Stefan Hajnoczi stefanha at redhat.com
Wed Aug 14 12:41:17 UTC 2019


On Sun, Aug 11, 2019 at 09:55:17PM +0800, piaojun wrote:
> 
> 
> On 2019/8/11 19:15, Eric Ren wrote:
> > Hi,
> > 
> > On Sun, Aug 11, 2019 at 10:46:02AM +0800, piaojun wrote:
> >>
> >>
> >> On 2019/8/11 10:06, Eric Ren wrote:
> >>> Hi jun,
> >>>
> >>> On Fri, Aug 09, 2019 at 08:50:12AM +0800, piaojun wrote:
> >>>> >From my test, write bandwidth will be improved greatly by replacing
> >>>> pwrite with pwritev, and the test result as below:
> >>>
> >>> Could you share more information about this testing?
> >>>
> >>> - args for qemu: cache size?
> >>> - args for virtiofsd: which cache mode?
> >>> - DAX is used, right?
> >>
> >> DAX is disabled, as this optimization only works on Host side.
> > 
> > 
> > OK, thanks for the info.
> > 
> > The test runs in KATA container, which use DAX as its default mount
> > option.
> > 
> >>
> >>>
> >>> - which kind of disk are you using, what's then IOPS/BW limit?
> >>>
> >>> I tried this patch with HDD disk - IOPS:5000, BW: 140MB/s.
> >>
> >> I used EXT4 and ramdisk as backend device.
> >>
> >>>
> >>> - VM: 4 vcpus, 8G mem
> >>> - cache=always, cache-size=8G, DAX
> >>> - fio job
> >>>
> >>> ```
> >>> [global]
> >>> fsync=0
> >>> name=virtiofs-test
> >>> filename=fio-test
> >>> directory=$mntdir   # share dir for test sitting on the disk
> >>> rw=randwrite
> >>> bs=4K
> >>
> >> *bs* should be 1M for bandwidth test which makes writev works well.
> > 
> > Yes, but seq write "rw=write" is also good fr BW test, right?
> 
> Right.

The purpose of piaojun's patch is to accelerate cases where the guest
submits multiple pages.  If bs is 4KB then there is only one page and
writev will not speed things up.

You need a larger blocksize if you want to see the effects of this
optimization.

Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virtio-fs/attachments/20190814/454e9791/attachment.sig>


More information about the Virtio-fs mailing list