Ceph with writeback cache is secure?

Sep 14, 2020
57
6
13
47
I am very grateful for all the tips I can get here. I have one more special question

I set up a system with few available hardware resources, set up a small cluster based on seven nodes with only one HDD type disk (spinning disk) on each unique node for use with Ceph as an OSD. Use on each node four 1Gbps (Ethernet) ports with LACP-type link aggregation exclusive for Ceph OSD communication.

In the VM configuration, in the part where the SCSI controller is indicated, I use VirtIO SCSI and in the disk configuration, I use VirtIO Block, with the drivers already installed in the VM.

Everything to meet some virtual machines with little demand.

But I've been having serious disk performance issues when writing files, especially small files (4K). Acceptable reading but horrible writing. Unable to work until VM OS gets lost with delay.

Searching Proxmox, I noticed that the VM's hard drive cache default setting is "(Default) No cache". Then I realized that there are several cache configuration options there. Two caught my eye, one described as "writeback" and the second as "writeback (unsafe)". I tried to change the Cache setting to "Writeback (unsafe)" and it gave me a bit more performance, but when a VM crashed, I lost data. As an option by itself, this option is "unsafe".

So I decided to change in the VM hard disk configuration (Proxmox GUI configuration), the hard disk cache going to "writeback" only. (note that I didn't put the option described as writeback unsafe).

The result was a noticeable improvement in writing speed and even reading performance. So far it seems to me an acceptable performance, reaching 237 MB / s of read, 78 MB / s of sequential write and 5.5 MB / s of 4K random write. To me, it seems like enough. At least for a while.

The question is: Is it really safe to use this "writeback" cache? Are there any risks? What specifically would be the possible risk?

Thank you all!
 

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!