VM docker performance nfs

lxiosjao

Member
Mar 21, 2021
64
1
13
Hello,

I would like to use docker and I read that it is not recommended to install it on the host, why ?
It could be easier for things like mountpoint between CT and host.

I'd like to use services like radarr, lidarr, and others web services on my CTs.
I also read that VM cant do bind mount, so we need to use NFS, SMB or sshfs.

All my data like movies, music are on the host (zfs pool).
If we assume I'm using docker on VM and nfs sharing (vm<->host), what about network perfomance ?
The network traffic between the VM will it go to the router to return to the host for read/write ?
What kind of network interface am I supposed to use on the VM ?


I'm a bit confused.
Thanks for the help
 
Last edited:
Docker doesn't tidy up its space and grows quite big over time. If you don't have an eye on that it will affect your host and all of the VMs, which is why it's better to install it inside a VM.
Between the host and any VM/CT the traffic is shared directly over vmbr0 and isn't passed to the router. Vmbr already acts like a switch and does all that locally. Usually the throughput reaches 10 GBit easily, so accessing an NFS share on the host is most of the times no real bottleneck.
 
  • Like
Reactions: lxiosjao
Oh nice. Thanks for the answer.
So i am going to share my dataset like this :
zfs set sharenfs=on pool/dataset

I have a question.
I have 2 interfaces on the VM vmbr0 and vmbr1.
I join the vm via ssh from my desktop computer with vmbr0 interface. (Network1)

I created a vmbr1 for the VM without gateway/port. (Network2)
vmbr1 is used for NFS (vm<-> host).
Is it possible on the host to allow NFS connection only from vmbr1 network using zfs command ... ?

Thanks
 
Last edited:
I'm sorry but I have no experience with sharing an NFS via zfs command.
If you do it through /etc/exports you can explicitly define a single host to have access.
 
no problem.
Do you know if it is a good practice to use vm storage instead of host storage for my data like movies/music/container ?
I would like to install zfs (openmediavault) on the vm and not using the host for storage.
What do you think ?
 
ZFS can't play out its advantages if it can't access the disks directly, so besides that it will probably work it's not ideal.
If you have an HBA with the attached disks that you can pass through to the VM it would be more efficient.
 
Yep good idea, I have a SAS/Sata 9750-8i (I have to buy cable sata).
Do you think it is a good choice (model) to passthrough that card to the vm ?
 
Last edited:
I don't have any experience with passed-through HBAs, sorry. But I don't know why this shouldn't work.
 
Same as you, I have no experience with that. Perhaps precautions to take with kvm and some models of HBA.
Thanks a lot