cloudfoundry / bosh-azure-cpi-release

BOSH Azure CPI
Apache License 2.0
63 stars 87 forks source link

Azure ephemeral OS/temp disk #671

Closed ahelal closed 1 year ago

ahelal commented 2 years ago

Hello Folks,

Azure offers ephemeral OS and temp disks for Azure VMs https://learn.microsoft.com/en-us/azure/virtual-machines/ephemeral-os-disks this can help a lot with TCO and performance for a various CF components.

I created a small PoC and I want to discuses some design decision before doing a PR.

In order to configure this feature the cloud config can look like this.

vm_types:
-  name: Standard_DS1_v2_e2
    cloud_properties:
        instance_type: Standard_DS1_v2
        ephemeral_disk:
          use_root_disk: true
          size: 6144
        root_disk:
          size: 30720
          use_instance_local_storage: true

I would add a new flag use_instance_local_storage and if set to true, it will attempt to use Azure ephemeral disk.

As for root_disk size if left empty will use all possible disk space as a SSD for that vm type. if not will fallback on default behaviour.
In case of error it will boil up normally to user

The implantation is quite simple we would need to append diffDiskSettings to the REST API

Thank you, @MSSedusch @happytobi @ahelal

rkoster commented 2 years ago

This looks similar to what was done a while ago for GCP: https://github.com/cloudfoundry/bosh-google-cpi-release/pull/309

Maybe it would be a good idea to keep the interface similar:

ephemeral_disk_type (String, optional) - The name of the [Google Compute Engine Disk Type](https://cloud.google.com/compute/docs/disks/#overview) the CPI will use when creating the instance ephemeral disk. Currently only local-ssd is supported.
MSSedusch commented 2 years ago

@rkoster I think the GCP PR only places the BOSH ephemeral disk on local SSD. Our idea was to use an Azure Ephemeral OS disk which could then be combined with a BOSH ephemeral disk on the root disk. Benefits are:

If we only place the BOSH ephemeral disk on local SSD, we would only have 50% of the benefits compared to using the Azure Ephemeral OS disk :)

ahelal commented 2 years ago

My wording is a bit overloaded. Additionally to what @MSSedusch mentioned. This actually means you can run with local SSD disk only (if needed).

beyhan commented 2 years ago

I think @rkoster suggests to keep the interface similar not to use local SSD disks. Does Azure require the property to be called use_instance_local_storage?

ahelal commented 2 years ago

@beyhan, no it was my choice :), maybe I misunderstood. I am okay with different naming. Is the location in the CC acceptable ?

rkoster commented 2 years ago

We discussed this proposal again during the working group meeting. The properties as proposed make sense and there is no point in trying to make them match the GCP interface (because as explained above GCP works differently).

rkoster commented 2 years ago

We are looking forward to reviewing a PR that implements this proposal.