ZFS and Disk Caching

Amadea

New Member
Feb 22, 2021
5
0
1
34
While benchmarking a Win10 VM in PVE 6.3-4 with CrystalDiskMark I got kernel panics (Out of Memory). This happend every time I tried the benchmark. Looking at htop it was surely a RAM memory related issue. I first thought it was an over-assigning problem with my memory to VM's or a ballooning issue. But after I found this thread on Reddit it had to do with Disk Write Cache instead if VM memory.

I had all my VM's already set to cache=none, but this wasn't doing the trick. Setting cache=writethrough or cache=directsync did however solve my host crashing memory problems. Looking at this nice table, I thought 'Disk Write Cache' was the actual cache hardware of my HDD's. Is my (renewed) understanding correct that 'Disk Write Cache' here is actually the software (RAM) cache of ZFS? Since the Proxmox host is not directly in charge of the raw HDD's, because of the ZFS-layer in between.

'Host Page Cache' works fine, but ZFS 'Disk Write Cache' is just consuming RAM without limit, until an unavoidable crash. Is there any way to limit ZFS Disk Write Caching on RAM memory to a certain GB limit? It could certainly contribute to the speed of small writing processes. Otherwise this feature seems useless to me.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!