[kata-dev] [Announce] virtio-fs released with Kata Containers support

jiangyiwen jiangyiwen at huawei.com
Wed Dec 26 02:32:06 UTC 2018

On 2018/12/11 3:25, Stefan Hajnoczi wrote:
> Dear Kata Containers Community,
> I'm delighted to announce the first release of virtio-fs, a new shared
> file system for virtual machines that is designed for container use
> cases, including shared volumes.
> Unlike virtio-9p and NFS over AF_VSOCK, virtio-fs aims to take advantage
> of the co-location between the virtual machine and the hypervisor in
> order to achieve local file system semantics and improve performance.
> For example, it can use Linux Direct Access (DAX) to access file
> contents directly from the host page cache.  This reduces communication
> with the file server and avoids duplicating data into each sandbox VM.
> It also means that mmap MAP_SHARED on a shared volume is coherent
> between sandbox VMs.
> The Linux kernel code (including performance numbers) has been posted
> here:
> https://marc.info/?l=linux-fsdevel&m=154446243324255&w=2
> Kata Containers integration is already available so you can benchmark
> and test virtio-fs.  The project is under active development and we
> still expect to make significant changes based on feedback and
> collaboration.
> We hope virtio-fs is interesting as a next step in overcoming
> virtio-9p's performance and limitations.  Let us know how it performs!
> You can read more about virtio-fs here:
> https://virtio-fs.gitlab.io/
> The Kata HowTo is here:
> https://virtio-fs.gitlab.io/howto-kata.html
> The Kata runtime and agent changes are fairly straightforward and
> comparable to virtio-9p.  There are several other code changes due to
> using a Fedora initramfs, systemd, and modular kernel.  These are not
> essential to virtio-fs but are simply how I preferred to develop and
> test.
> The FAQ on the virtio-fs website explains the main technical features.
> Please let me know if you have any questions or need help getting it
> running!  I'm also on #kata-dev IRC if you need a hand.
> Stefan
> _______________________________________________
> kata-dev mailing list
> kata-dev at lists.katacontainers.io
> http://lists.katacontainers.io/cgi-bin/mailman/listinfo/kata-dev

Hi Stefan,

It is amazing to see such a great job. I setup a virtio-fs environment
using qemu, virtio-fs using "cache=none, dax" mode, and I found some
problems as follows:

1. Now it don't support write file with direct_io, then I filter
O_DIRECT flag in libfuse-daemon when opening file, and success. So I
think it may be related to dio alignment and mmap(). Like 9p also filter
the O_DIRECT flag in qemu.

2. Cache-size can't be hot increased, I mean after the memory layout
is like "Data cache->Metadata Cache->Journal Cache, once data cache size
is changed, the metadata cache and journal cache offset will be changed,
this memory data need to be moved. I don't know if there are any plans
to support the dynamic increase. Because I understand user can have the
demand of hot increase cache.

3. Why real mmap operation is executed in qemu process instead of libfuse
daemon? I hope the data plane doesn't not need to pass through qemu again.

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.


More information about the kata-dev mailing list