Hi Mario, Eva, Pete,
Thank you for the feedback. To address some points:
1) virtiofs is significantly faster. AFAICT the p9fs FreeBSD driver has no
guest-side caching caching - at least I've found no such option when
mounting. To test the speed I measure from the host the time it takes to
clone and build a simple repo:
cd /mnt
git clone https://github.com/redis/redis.git
cd redis
gmake -j32
cd /mnt
rm -rf redis
virtiofs takes 42 seconds, p9fs takes 7 minutes and 30 seconds. This is
without turning on full writeback caching for virtiofs. I'm not familiar
with p9fs' internals so if I've missed some caching-related option please
let me know, but on the face of it virtiofs is worth it just for the speed
increase.
The current numbers do not even include the optimization in the FAQ (
https://virtio-fs.gitlab.io/) that Pete mentioned above. That is later work
for after the initial driver gets merged.
2) Like Eva said, it's just a matter of feature parity. It's not always the
case that both virtiofs and p9fs are available, and a user may prefer one
over the other for whatever reason. The only counter argument I can think
of is maintainance burden, but virtiofs is pretty maintainable: It's 1/5
the size of p9fs with a simple cloc (795 SLOC vs 4192 SLOC) because it
reuses much of the existing FUSE logic. The existing testbench for FUSE
largely also covers virtiofs.
On Tue, Feb 10, 2026 at 12:45 PM Pete Wright <[email protected]> wrote:
>
>
> On 2/9/26 10:57 PM, Mario Marietto wrote:
> > |Hello Emil,|
> >
> > |Inside a FreeBSD guest OS (15.0-RELEASE) I do :|
> >
> > kldload virtio_p9fs
> >
> > kldload p9fs_load
> >
> > |mount -t p9fs sharename /mnt/host|
> >
> > ||
> >
> > |This works for me,I can share files between FreeBSD 15.0 guest and
> > FreeBSD 14.3 host os. So,what's missing in this case and which features
> > you added ?|
> >
>
>
> i had a similar question since i've been happy with p9fs. the virtiofs
> faq states (https://virtio-fs.gitlab.io/):
>
> "Existing solutions to this problem, such as virtio-9p, are based on
> existing network protocols that are not optimized for virtualization use
> cases. As a result they do not perform as well as local file systems and
> do not provide the semantics that some applications rely on.
>
> Virtiofs takes advantage of the virtual machine’s co-location with the
> hypervisor to avoid overheads associated with network file systems."
>
>
> that seems super reasonable to me. i also think there is windows
> support for virtiofs which is probably another benefit.
>
> -pete
>
> --
> Pete Wright
> [email protected]
>
>