How beneficial is L1 write-through cache?

Software-based VM-centric and flash-friendly VM storage + free version

Moderators: anton (staff), art (staff), Max (staff), Anatoly (staff)

Post Reply
wallewek
Posts: 114
Joined: Wed Sep 20, 2017 9:13 pm

Thu Nov 26, 2020 6:19 pm

I'm just curious about performance and recommendations for L1 write-through cache. I looked through the documents and white papers and don't really see what I'm looking for. They're great for how to do it, but is it worth it?

Say I have a StarWind VSAN implemented with no L1 or L2 cache, no hardware RAID or BBWC cache, no hardware caching other than what is built into hard drives, only whatever cache the OS provides. There may be UPS, but let's ignore that.

Say I want to add L1 (RAM) cache in write-through only mode. In practice, is it even worth the bother? Does L1 cache in write-through mode, by itself without any other cache, make much difference? If so, is there any info on what improvement might be expected?

Just curious.
------------------------
"In theory, theory and practice are the same, but in practice they're not." -- Yogi Berra
yaroslav (staff)
Staff
Posts: 2278
Joined: Mon Nov 18, 2019 11:11 am

Fri Nov 27, 2020 3:16 am

Hi,

Nice to meet you again :)
L2 cache, as well as L1 in write-through mode, improves only reads. L1 in write-back mode improves both reads and writes but may be the reason for full syncs to be too often (that is why we recommend disabling it if possible).
Please note that write-back cache may be the reason for full sync not only in case of a power outage but also in case of a StarWindService crash, StarWindService termination during OS reboot (timeout), PSOD, or even just a slightest mishandle of StarWindService stop (e.g, service was in the middle of flushing cache and was manually terminated by an end-user as it was taking too long to stop OR automatic service termination during while cache (rarely happened with old build+huge WB cache)); in other words, full sync happens every time StarWindService is terminated on one server. That is why having a good UPS is not enough here. See more about reasons for full sync here https://knowledgebase.starwindsoftware. ... may-start/. See more about caching in StarWind VSAN https://knowledgebase.starwindsoftware. ... rinciples/.
Write-through cache does not imply such a risk. But, it boosts only reads (which even without the cache are normally fine).

L1 write-back cache can be enabled for spindle drives, but I'd rather think good of it because of a good risk of full synchronization. For SSDs, write-back cache normally provides a modest performance boost.

P.S. Did you see any performance drops since our intervention?
wallewek
Posts: 114
Joined: Wed Sep 20, 2017 9:13 pm

Fri Nov 27, 2020 10:09 pm

Thank you Yaroslav, you too! :D

Note, I was only asking -- very carefully -- about L1 write THROUGH cache.

It sounds like you are saying that implementing L1 write-through cache, without any other cache, is basically not likely to be worth the bother. Oh well, it sounded like a safe and easy thing to do, but I wasn't expecting much really.

Actually, as regards the performance of this cluster after disabling all L1 and L2 cache, I'm not having major performance problems. But then, it's not a very busy server environment. I do think it's noticeably a bit slower with things that cause intensive I/O, like creating a new VM, but I can't quantify it, and it's not a problem for me, so I want to be safe and not play performance games. I am well aware of the limitations of UPSes. And come to think of it, there's no BBWC for software cache, is there?

As to performance after removing cache, I did notice that a full sync ran nearly twice as fast after disabling L2 and L1 cache -- fascinating. But since we resolved that license issue, I haven't had a full sync, so that's not a concern either.

Thanks for that feedback!

--- Ken
------------------------
"In theory, theory and practice are the same, but in practice they're not." -- Yogi Berra
yaroslav (staff)
Staff
Posts: 2278
Joined: Mon Nov 18, 2019 11:11 am

Mon Nov 30, 2020 4:19 am

Hi,

Yes, there's nothing bad about write-through cache.
There is no BBWC for software.

You are always welcome. Please let us know if you have any additional questions!
Post Reply