Hi folks,
I hope you guys can give me a north position. I’m having a latency issue on my Debian VM that I have running on top of my TrueNAS Scale homelab.
I have two machines running TrueNAS Scale 25.10.5, both of them have a single Debian VM that runs my docker workflows.
The problematic host is a Ryzen 5700G with 128GB of RAM, it has a RTX 5060 GPU thats used for compute + decoded and that GPU is passed through to the VM. On the MB 4 SATA ports there are 4 NAS 8TB HDDs divided onto two pools data0 and data1, both are two disk 8TB mirror.
I also have two Samsung 500GB SSDs on the two NVMe ports, those are on a pool called fast1
The Debian VM has 7 pinned cores of the 8 available (with their respective threads) and it has 60GB of dedicated RAM. The other ~60GB are dedicated mostly to ARC with a small percentage to the operation of the TrueNAS host which does snapshotting and a smb host pretty much.
On the TrueNAS host I have zero latency issues, everything is extremely fast, every test i throw at it it just works perfectly.
On the Debian VM if I try to for instance do a sudo docker pull ollama/ollama which is a 3GB image the system “hangs”, what do I mean by hanging is, its still responsive and any open SSH sessions are still responsive, but if i try for instance login into a new SSH session i got hung until the extraction of the image finishes, but its not limited to SSH, any trivial command like a apt search something starts to get hangs of about 10 seconds and sometimes it only finishes the command after the extraction process finishes and anything IO demanding in the system seems to get those hangs. If I try to do a htop or a top there’s a total of zero high demand on the hardware for both the VM or the host, they are breezing awat at their single digit percentage on both RAM and CPU, iostat -dx 1` is weirdly zeroed, like, when docker start the extraction instead of increasing the latency it actually starts to zero it. on cat /proc/meminfo Dirty normally hovers around 100MB, but when it does some of those complex actions, and extracting ollama is just one of those, anything random IO demanding seems to trigger it, the Dirty memory gets to hundreds of bytes. Writeback is 0KB all the time pretty much. I’ve also zpool iostat -v 1 on the host while the VM is hung and there’s no obvious spike of latency and the transfer rate is about 80MB/s.
hdparm -Tt shows about 1.3GB/s on the NVMe SSDs and at minimum 215MB/s on the HDDs, so no sequential issues. Smart shows zero issues similar to zpool status, no scrub issues.
Load average is 1.99 for the host and 0.47 for the VM. The VM is using 7.3GB of 63GB and the host is 12.2GB of 128GB. Those stats are from htop and free -m
If someone has any idea of what may be causing this issue, be any VM setting, the hypervisor, truenas, zfs, hardware, for now I have no clue of what may be causing this issue bc nothing is reporting a problem and I cannot reproduce with synthetics.