Page 1 of 1

How does write-back cache work?

Posted: Mon Nov 25, 2019 4:57 pm
by danswartz
I'm curious about this. If a write comes in from an iSCSI client, is it acked right away? If so, what happens if the synch link goes down before it gets written, and this is the node that is demoted (e.g. no long visible to vsphere?) Wouldn't that expose you to lost write(s)? Or is the write not acked until it has been sent over the synch link to the other node, and has been acknowledged as received there, even if the other node hasn't written it yet?

Re: How does write-back cache work?

Posted: Wed Nov 27, 2019 11:37 am
by yaroslav (staff)
Data is acked to be written only if written to the underlying storage.
Should the Sync link go down, both servers are to decide which one is to stop serving client writes; writing to the node that has lower synchronization priority will be stopped afterward. That's how VSAN helps to avoid split-brain with Heartbeat.
If there's no sync link, no acknowledgment comes from the partner node. Small note: If both nodes are active and synchonized, clients cannot get an acknowledge package until data is confirmed to be safely written to the partner host.
If you demote the node from vCenter (without shutting it down) everything you have in server's RAM should stay there. Once you unplug or reboot that host, data is lost. That's how non-persistent memory works.
Here’s how L1 cache works in StarWind VSAN: https://knowledgebase.starwindsoftware. ... rinciples/

Re: How does write-back cache work?

Posted: Mon Aug 24, 2020 9:45 am
by asherxo
Thanks for the detailed explanation yaroslav

Re: How does write-back cache work?

Posted: Mon Aug 24, 2020 10:15 am
by yaroslav (staff)
You are always welcome :)

Re: How does write-back cache work?

Posted: Wed Sep 23, 2020 6:22 am
by richardcharles
Hi all,

I have a standalone win2018 with a parity accelerated volume.

As I can understand, in the faster ssd storage tiers we have the most frequent accessed files.

But what about the write back cache? What kind of data will go through the WBC? Block or files?

Thanks in advance

Re: How does write-back cache work?

Posted: Wed Sep 23, 2020 7:06 am
by yaroslav (staff)
Greetings,

Win2018, there is no such a WS :) Is it 2019?
Blocks are cached. Learn more about Write-Back Cache implementation at https://knowledgebase.starwindsoftware. ... principles.

Re: How does write-back cache work?

Posted: Sun Sep 27, 2020 11:37 am
by boby
Hi,

I have a question about what cache type everyone is using on their VMs in production. We are using standalone hardware nodes all SSD disks with hardware (Perc) RAID RAID-5. The chosen cache type for both Windows VMs and Linux VMs is write back for optimal performance.

We've found a lot of mixed opinions on the safety of using write back cache. It's said to be potentially dangerous in a power failure. Are the dangers of power failure / unclean shutdown only at hardware level or is write-back dangerous in unclean shutdowns / poweroffs at VM level too?

What is the ideal caching in our scenario to achieve an ideal performance vs safety trade off?

Thanks

Re: How does write-back cache work?

Posted: Mon Sep 28, 2020 2:06 am
by batiati
boby wrote:Are the dangers of power failure / unclean shutdown only at hardware level or is write-back dangerous in unclean shutdowns / poweroffs at VM level too
Write-back cache is dangerous when all hosts are unexpectedly shut down at the same time. At the VM level, unexpected shutdowns always have potentially hazardous effects over the file system.
boby wrote: What is the ideal caching in our scenario to achieve an ideal performance vs safety trade off?
Best safety option: write-through cache, only reads are cached;
Good safety option: write-back with redundant power supply and independent UPS system for each vSAN host.

Re: How does write-back cache work?

Posted: Mon Sep 28, 2020 7:50 am
by yaroslav (staff)
Hey batiati,

You are right. Thanks for helping.

Re: How does write-back cache work?

Posted: Tue Sep 29, 2020 7:34 am
by jamesjohn
Hi there,

I’m going to put a more RAM soon to my servers, I was thinking to use a few GB of RAM to creade ramdisk as writeback cashe for my SN (8TB snr disc). Yes I do have very reliable backup power supply and RAM memory is ECC.

Does any one of you have any experience with writeback cache as a ramdisk? Any recommendation?

Re: How does write-back cache work?

Posted: Tue Sep 29, 2020 4:18 pm
by yaroslav (staff)
Greetings,

StarWind enables to create a RAM disk device that can be used as a superfast device for testing purposes. Learn more at https://www.starwindsoftware.com/help/R ... evice.html