Poor performance of Containers and VMs

I’ve been using an older system for many years with Debian (Jessie) + Xen + ZFS. It was a file server, but also housed some VMs. It worked well to have Xen VMs sit on top of ZFS zvols. I did everything manually.

I’ve been trying to get TrueNAS rolling on the same hardware, except with new disks.

System info:
TrueNAS 25.04.0
Intel(R) Core™ i5-6500 CPU @ 3.20GHz
32GB RAM
1x 480G SSD
2x 8TB HD

I thought it was a perfect replacement until I asked my son to test the Minecraft server he runs. He said it was very slow loading new (newly generated) chunks. This appears to be CPU bound from what I’ve read.

Apps → Minecraft Server (Java)
was very slow

Instances → Create Instance (container virt method)
was very slow

Instance → Create Instance (VM virt method)
was faster, but not nearly as fast as my ancient Xen VM

I tried allocating 2-3 (out of 4 cores) to the VM. I’ve also given it 12-16 GB RAM. This is how the old Xen was configured. It doesn’t seem to help. I’ve tried specifying (pinning?) it to use 2 of the cores and that didn’t seem to help.

It’s confusing that the VM is much faster than the Container.
Xen VM > KVM VM > Docker Container

I’m looking for ideas on how to troubleshoot what is going on. Also tweaks to configuration. Could it be that some ZFS kernel tuning that TrueNAS (OS) is doing is at the expense of KVM and Docker?

Thanks,
Scott

I’ve created a Debian VM on Proxmox to run the Minecraft server. Proxmox is most recent stable 8.4 and Debian 12.10.

Same computer – CPU, RAM, etc
Same Java, Minecraft, and world.

Evaluation is the speed of the Minecraft (new) chunk loading on Proxmox is much faster than TrueNAS. Both Proxmox and TrueNAS use KVM.

Open to suggestions – as I’d like to use TrueNAS, but want to avoid the performance hit.

I’ve installed different environments on different disks for testing. Here is a subjective speed approximation of loading (new) chunks in Minecraft, where 100% is the baseline:

(old) Xen DomU        100%
TrueNAS /docker      < 40%
TrueNAS KVM            60%
Proxmox KVM            90%
Debian12 bare         110%
Debian12 /docker       90%

Thinking it’s probably kernel related. I tried running Java/Minecraft on the raw TrueNAS Linux OS, but it seem well locked down – permission denied.

Interested in any thought.