SSD Caching

SSD caching increases disk I/O performance. It uses NVMe or Solid State Disks (SSDs) to cache frequently used data.

There are two basic cache modes of operation:

  • Write-through: improves read I/O performance, no impact on reliability
  • Write-back: improves both read and write I/O performance, small chance of data loss.

On this page:

Be aware that if you have automatic failover of VSs and write-back caching mode configured, then there is a risk of some data loss. In the case of a compute resource failure with write-back mode configured and failover enabled, the cache will be ‘forgotten’ so that the VS can be automatically started up again on another node. You must explicitly accept this constraint when configuring write-back mode. If automatic failover is not enabled, then it is not possible to start a VS with an old cache until either:

a) The compute resource comes back online
or
b) The cache drive is physically moved to a new compute resource and the cache settings are adjusted (requires support assistance)
or
c) The cache is explicitly forgotten from the CLI.

Requirements

  • KVM or Xen4 CloudBoot compute resource only

  • At least one spare fast drive per compute resource

  • Reboot upgrade to OnApp Storage version 4.2.0 is needed

Caching can be configured on two levels: per data store and per disk. 


Enable caching for data store



Make sure that you have the Override Integrated Storage cache settings permission enabled to be able to edit the default data store cache settings per VS.

To configure caching for data store:

  1. Go to your Control Panel > AdminSettings menu.
  2. Click the Data Stores icon. You'll see a list of the data stores on your system.
  3. Click the Actions button next to the store you want to change, then click Edit.
  4. Move the Integrated Storage Cache enabled slider to the right to enable caching. Configure the following parameters:
    • set cache line size (in KB) - the underlying size of I/O used by the cache. Default value is 512 KB.
    • specify migration threshold (in MB) - the amount of memory to use for moving data to and from the cache device. Default value is 128 MB.
    • set cache size (in %) - the size of the cache as a percentage of the vDisk size. Default value is 10%.
  5. Click the Save Data Store button to finish.

    After editing the Cache settings, it is required to reboot your Virtual Server to apply the settings.


    These settings are applied to all vdisks within the configured data store.

Enable caching for disk



To configure caching for disk:

  1. Go to your Control Panel > Admin > Settings > Disks menu.
  2. Click the Actions > Edit button next to the required disk.
  3. Move the Override Integrated Storage Cache settings and Integrated Storage Cache enabled sliders to the right to enable caching.
  4. Specify cache mode: Write-through or Write-back.
  5. Set cache line size (in KB).
  6. Specify migration threshold (in MB).

  7. Set cache size (in %).

  8. Click the Save Disk button. 

After editing the Cache settings, it is required to reboot your Virtual Server to apply the settings.

Also you can assign disk to Cache during CloudBoot compute resource creation. For more information refer to the Create CloudBoot Compute Resource section.


After you assign disks to the cache, it is required to update the configuration by running the SAN controller service.
This can be done from CLI on this compute resource by running the following command:

/etc/init.d/SANController updateconfig