I'm struggling to find a proper article that explains how the caching in Azure VM works. what holds that cache? how it syncs? etc.
Thanks!
Disk caching :
This article will provide complete information :https://learn.microsoft.com/en-us/learn/modules/caching-and-performance-azure-storage-and-disks/
High Scale VMs that leverage Azure Premium Storage have a multi-tier caching technology called BlobCache. BlobCache uses a combination of the Virtual Machine RAM and local SSD for caching. This cache is available for the Premium Storage persistent disks and the VM local disks. By default, this cache setting is set to Read/Write for OS disks and ReadOnly for data disks hosted on Premium Storage. With disk caching enabled on the Premium Storage disks, the high scale VMs can achieve extremely high levels of performance that exceed the underlying disk performance.
Disk Caching is not supported for disks 4 TiB and larger. If multiple disks are attached to your VM, each disk that is smaller than 4 TiB will support caching.
Changing the cache setting of an Azure disk detaches and re-attaches the target disk. If it is the operating system disk, the VM is restarted. Stop all applications/services that might be affected by this disruption before changing the disk cache setting.
For more information, you can refer to this article: https://learn.microsoft.com/en-us/azure/virtual-machines/windows/premium-storage-performance#disk-caching
The maximum disk size that host caching is support is <= 4095 GiB. If you deploy a disk with 4096 GiB as shown below on Portal, host caching will not be supported.
Refer to https://pachehra.blogspot.com/2019/06/azure-vm-disk-caching.html
Additional information : Host Caching applies to both Premium and Standard storage disks. There are some differences in the cache performance between different VM types as documented in the VM specs docs. VM types that support Premium Storage disks use the advanced host features, and come with dedicated performance targets as documented. Whereas the older generations VMs have different targets as documented and generally do not have dedicated high performance targets. Hence, for non-Premium Disk VMs, depending on the workload pattern and other factors, you may not see the same benefit from caching. If you are using Premium Disk-supported VMs, then Host Caching on Standard Disks attached to such VMs will provide the same type of cache performance as the Host Caching on Premium Disks.
Host caching supports Standard HDD, Standard SSD & Premium SSD
In case you would require to add 8 TB disk, host caching will not be enabled as size of disk is more than 4095 GiB