😱 Today I Almost Threw My Entire Rack into the Trash…
So, today I had one of those classic homelab panic moments. 😅 I was copying a huge dataset back onto my NAS VM, and the transfer was painfully slow, with occasional timeouts and hiccups. My personal, important files were even affected! At one point, I seriously considered just tossing my entire rack and servers into the trash…
Yesterday, everything was running smoothly, and I had some big learnings about my Proxmox cluster and ZFS setup. But today, out of nowhere, this massive slowdown hit. 🤯
After some deep thinking (and consulting ChatGPT, my trusty homelab oracle 🤓), it turned out that the culprit wasn’t the network, the VM configuration, or even ZFS compression. Nope — it was a small but critical ZFS setting controlling how writes are cached: the Sync Mode 🧠.
⚙️ The Culprit: ZFS Sync Mode
ZFS is amazing, but it can be brutally conservative when it comes to writes. By default, the Sync Mode is set to standard:
- standard: Every write waits until the data hits the physical disk. Very safe, very slow. 🐢
- disabled: Writes are cached and flushed asynchronously. ⚡ Fast, but risky if your power decides to quit mid-transfer.
In my case, standard caused massive slowdowns — like watching paint dry while copying 50GB of files. I initially suspected LZ4 compression (classic rookie move 😅), but it was really the sync setting all along.
🔍 How to Check Your Sync Mode
On your Proxmox host (or any ZFS system), you can check the sync mode with:
zfs get sync <DatasetName>
For example, my NAS VM dataset:
zfs get sync vmdata
Output might look like this:
NAME PROPERTY VALUE SOURCE
vmdata sync standard default
Here, standard = slow turtle 🐢, disabled = lightning-fast ⚡.
🔧 How to Fix It (and Gain Superpowers)
To boost your write performance, simply set sync to disabled on your dataset:
zfs set sync=disabled vmdata
Then verify:
zfs get sync vmdata
Expected output:
NAME PROPERTY VALUE SOURCE
vmdata sync disabled local
After this change, I went from ~100 MB/s to 3.2 GB/s 🚀 on my NAS VM. Yes… that’s thirty times faster. 😎
💡 Tip: This change is persistent across reboots. No need to worry about losing the setting when you restart the server. Just remember: with great power comes great responsibility — consider using a UPS if your data is critical!
After adjusting the ZFS cache, I ran a first test copying large files again — and everything worked beautifully. ✅ My NAS VM was back in full speed mode, no hiccups, no timeouts.
😂 Lessons Learned
- ZFS is awesome, but check the cache settings before blaming your hardware. 🖥️
- LZ4 compression is NOT always the culprit (rookie mistake!). 😅
- Sometimes the tiniest tweak makes your NAS feel like it’s on rocket fuel. 🚀
So yes, today I survived a potential homelab disaster thanks to understanding the ZFS sync cache. And yes, I will sleep a little better knowing my 50GB copy didn’t just crawl at 100 MB/s forever. 😎
