bhyve Sharing folder with virtio-9p: poor performance

Hi,

I'd like to share my experience with folder sharing to a VM via virtio-9p. I've tried to use it on a home server:
  • Host: FreeBSD 14.2 with vm-bhyve
  • Guest: Debian 12.9
The guest runs a Lyrion music server and the music files are on the host in a ZFS dataset. So my idea was to use virtio-9p to share the music to the guest, but performance is poor.

I did not use any synthetic benchmarks, just tries my "workload", which is rescanning the music librabry for changes. I guess therefore the modification times and sizes of all files in the library folder are read. there are several thousand files in the library. As alternative I've tried to mount the folder via Samba and NFSv4.

The results are:

virtio-9p:
mount command: mount -t 9p -o trans=virtio,version=9p2000.L,ro,msize=512000 music /mnt/music
scan time ~170 seconds.

Samba:
mount command: mount -t cifs -o user=lyrion,ro //host/music /mnt/music
scan time ~22 seconds

NFSv4:
mount command: mount -t nfs4 -o ro,noatime host:/music /mnt/music
scan time ~17 seconds

So virtio-9p is 10 times slower for my use case.
 
Back
Top