-
Notifications
You must be signed in to change notification settings - Fork 1.8k
OSDOCS-15304#Performance plus for Azure Disk #96181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
// | ||
// Module included in the following assemblies: | ||
// | ||
// * storage/container_storage_interface/persistent-storage-csi-azure.adoc | ||
// | ||
|
||
:_mod-docs-content-type: PROCEDURE | ||
[id="persistent-storage-csi-azure-disk-perf-plus-create-new-disk_{context}"] | ||
= Enabling performance plus by creating new disks | ||
|
||
To enable performance plus, you need to create a new disk. | ||
|
||
The following procedure shows how to create a disk with performance plus enabled and, if desired, attach it to a virtual machine (VM). | ||
lpettyjo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
.Prerequisites | ||
|
||
* Access to Azure CLI with an Azure account | ||
|
||
.Procedure | ||
|
||
To enable performance plus when creating a new disk: | ||
|
||
. Create a resource group by running the following commands in the Azure CLI: | ||
+ | ||
[resource,terminal] | ||
---- | ||
export RANDOM_SUFFIX=$(openssl rand -hex 3) | ||
export MY_RG="PerfPlusRG$RANDOM_SUFFIX" | ||
export REGION="WestUS2" | ||
az group create -g $MY_RG -l $REGION | ||
---- | ||
+ | ||
.Example output | ||
[source,terminal] | ||
---- | ||
{ | ||
"id": "/subscriptions/xxxxx/resourceGroups/PerfPlusRGxxx", | ||
"location": "WestUS2", | ||
"name": "PerfPlusRGxxx", | ||
"properties": { | ||
"provisioningState": "Succeeded" | ||
} | ||
} | ||
---- | ||
|
||
. Create a new disk with performance plus enabled by running the following commands in the Azure CLI: | ||
+ | ||
[source,terminal] | ||
---- | ||
export MY_DISK="PerfPlusDisk$RANDOM_SUFFIX" | ||
export SKU="Premium_LRS" <1> | ||
export DISK_SIZE=513 <2> | ||
az disk create -g $MY_RG -n $MY_DISK --size-gb $DISK_SIZE --sku $SKU -l $REGION --performance-plus true | ||
---- | ||
<1> In this example, `SKU` is set to `Premium LRS`. Set this to the appropriate SKU for your situation. | ||
<2> In this example, `DISK_SIZE` is set to `513 GiB`. For performance plus, 513 GiB is the minimum required size. | ||
+ | ||
This creates a new disk 513 GiB, or larger, with performance plus enabled using a valid SKU value. | ||
+ | ||
.Example output | ||
[source,terminal] | ||
---- | ||
{ | ||
"id": "/subscriptions/xxxxx/resourceGroups/PerfPlusRGxxx/providers/Microsoft.Compute/disks/PerfPlusDiskxxx", | ||
"location": "WestUS2", | ||
"name": "PerfPlusDiskxxx", | ||
"properties": { | ||
"provisioningState": "Succeeded", | ||
"diskSizeGb": 513, | ||
"sku": "Premium_LRS", | ||
"performancePlus": true <1> | ||
}, | ||
"type": "Microsoft.Compute/disks" | ||
} | ||
---- | ||
<1> `performancePlus = true` indicates that performance plus has been successfully enabled. | ||
|
||
. Attempt to attach the disk to a VM by running the following commands in the Azure CLI: | ||
+ | ||
[source,terminal] | ||
---- | ||
export MY_VM="NonExistentVM" | ||
if az vm show -g $MY_RG -n $MY_VM --query "name" --output tsv >/dev/null 2>&1; then | ||
az vm disk attach --vm-name $MY_VM --name $MY_DISK --resource-group $MY_RG | ||
else | ||
echo "VM $MY_VM not found. Skipping disk attachment." | ||
fi | ||
---- | ||
+ | ||
.Example output | ||
[source,terminal] | ||
---- | ||
VM NonExistentVM not found. Skipping disk attachment. | ||
---- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
// | ||
// Module included in the following assemblies: | ||
// | ||
// * storage/container_storage_interface/persistent-storage-csi-azure.adoc | ||
// | ||
|
||
:_mod-docs-content-type: PROCEDURE | ||
[id="persistent-storage-csi-azure-disk-perf-plus-from-snapshots_{context}"] | ||
= Creating new disks from existing disks or snapshots with performance plus enabled | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That won't work with OCP, this is for users who directly interact with Azure There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 |
||
|
||
This procedure shows how to create a new disk from an existing disk or snapshot that has performance plus enabled on it. | ||
|
||
.Prerequisites | ||
|
||
* Access to Azure CLI with an Azure account | ||
|
||
* Access to an existing disk with performance plus enabled on it. | ||
|
||
.Procedure | ||
|
||
To enable performance plus when creating a new disk from an existing disk or snapshot: | ||
|
||
. Create a resource group for migration by running the following commands in the Azure CLI: | ||
+ | ||
[resource,terminal] | ||
---- | ||
export RANDOM_SUFFIX=$(openssl rand -hex 3) | ||
export MY_MIG_RG="PerfPlusMigrRG$RANDOM_SUFFIX" | ||
export REGION="WestUS2" | ||
az group create -g $MY_MIG_RG -l $REGION | ||
---- | ||
+ | ||
.Example output | ||
[source,terminal] | ||
---- | ||
{ | ||
"id": "/subscriptions/xxxxx/resourceGroups/PerfPlusMigrRGxxx", | ||
"location": "WestUS2", | ||
"name": "PerfPlusMigrRGxxx", | ||
"properties": { | ||
"provisioningState": "Succeeded" | ||
} | ||
} | ||
---- | ||
|
||
. Create a snapshot of a disk that has performance plus enabled on it by running the following commands in the Azure CLI: | ||
+ | ||
[source,terminal] | ||
---- | ||
export MY_SNAPSHOT_NAME="PerfPlusSnapshot$RANDOM_SUFFIX" | ||
echo "Creating snapshot from original disk..." | ||
az snapshot create \ | ||
--name $MY_SNAPSHOT_NAME \ | ||
--resource-group $MY_RG \ | ||
--source $MY_DISK | ||
---- | ||
|
||
. Obtain the snapshot ID for use as a source.by running the following commands in the Azure CLI: | ||
+ | ||
[source,terminal] | ||
---- | ||
SNAPSHOT_ID=$(az snapshot show \ | ||
--name $MY_SNAPSHOT_NAME \ | ||
--resource-group $MY_RG \ | ||
--query id \ | ||
--output tsv) | ||
|
||
echo "Using snapshot ID: $SNAPSHOT_ID" | ||
---- | ||
|
||
. Create the new disk using the snapshot as the source by running the following commands in the Azure CLI: | ||
+ | ||
[source,terminal] | ||
---- | ||
export MY_MIG_DISK="PerfPlusMigrDisk$RANDOM_SUFFIX" | ||
export SKU="Premium_LRS" | ||
export DISK_SIZE=513 | ||
|
||
az disk create \ | ||
--name $MY_MIG_DISK \ | ||
--resource-group $MY_MIG_RG \ | ||
--size-gb $DISK_SIZE \ | ||
--performance-plus true \ | ||
--sku $SKU \ | ||
--source $SNAPSHOT_ID \ | ||
--location $REGION | ||
---- | ||
+ | ||
.Example output | ||
[source,terminal] | ||
---- | ||
{ | ||
"id": "/subscriptions/xxxxx/resourceGroups/PerfPlusMigrRGxxx/providers/Microsoft.Compute/disks/PerfPlusMigrDiskxxx", | ||
"location": "WestUS2", | ||
"name": "PerfPlusMigrDiskxxx", | ||
"properties": { | ||
"provisioningState": "Succeeded", | ||
"diskSizeGb": 513, | ||
"sku": "Premium_LRS", | ||
"performancePlus": true, | ||
"source": "https://examplestorageaccount.blob.core.windows.net/snapshots/sample-westus2.vhd" | ||
}, | ||
"type": "Microsoft.Compute/disks" | ||
} | ||
---- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// | ||
// Module included in the following assemblies: | ||
// | ||
// * storage/container_storage_interface/persistent-storage-csi-azure.adoc | ||
// | ||
|
||
:_mod-docs-content-type: CONCEPT | ||
[id="persistent-storage-csi-azure-disk-perf-plus-limits_{context}"] | ||
= Limitations | ||
|
||
Performance plus for Azure Disk has the following limitations: | ||
|
||
* Can be enabled only on Standard HDD, Standard SSD, and Premium SSD managed disks that are 513 GiB or larger. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note that if a user asks for a smaller value the disk size will be rounded up to 513GiB There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1, let's announce loudly in case the customers are surprised by the disk size. |
||
|
||
* Can be enabled only on new disks. | ||
+ | ||
*Workaround:* Create a snapshot of a disk that has performance plus enabled on it, and then create a new disk from the snapshot. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we tested this @duanwei33 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, actually we tested the following scenarios:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh excellent thanks! We should document both options then! |
||
|
||
* Not supported for disks recovered with Azure Site Recovery. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, should we mention this? I don't think we need to cover "Azure Site Recovery". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeh i think it's because it's mentioned as a limitation by microsoft |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// Module included in the following assemblies: | ||
// | ||
// * storage/container_storage_interface/persistent-storage-csi-azure.adoc | ||
// | ||
|
||
:_mod-docs-content-type: CONCEPT | ||
[id="persistent-storage-csi-azure-disk-perf-plus-overview_{context}"] | ||
= Performance plus for Azure Disk | ||
|
||
By enabling performance plus, the Input/Output Operations Per Second (IOPS) and throughput limits can be increased for the following types of disks that are 513 GiB, and larger: | ||
|
||
* Azure Premium solid-state drives (SSD) | ||
|
||
* Standard SSDs | ||
|
||
* Standard hard disk drives (HDD) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
// | ||
// Module included in the following assemblies: | ||
// | ||
// * storage/container_storage_interface/persistent-storage-csi-azure.adoc | ||
// | ||
|
||
:_mod-docs-content-type: PROCEDURE | ||
[id="persistent-storage-csi-azure-disk-perf-plus-sc_{context}"] | ||
= Creating or editing a storage class to use performance plus enhanced disks | ||
|
||
The following procedure explains how to create a storage class, or edit an existing one, to use performance plus enhanced Azure disks. | ||
|
||
.Prerequisites | ||
|
||
* Access to a Microsoft Azure cluster with cluster-admin privileges. | ||
|
||
* Access to an Azure disk with performance plus enabled | ||
|
||
.Procedure | ||
|
||
To create a storage class, or edit an existing one, to use performance plus enhanced disks: | ||
|
||
. Create a storage class, or edit an existing one, using the following example YAML file: | ||
+ | ||
.Example storage class YAML file | ||
[resource,yaml] | ||
---- | ||
apiVersion: storage.k8s.io/v1 | ||
kind: StorageClass | ||
metadata: | ||
name: <azure-disk-performance-plus-sc> <1> | ||
provisioner: disk.csi.azure.com <2> | ||
parameters: | ||
skuName: Premium_LRS <3> | ||
cachingMode: ReadOnly | ||
enablePerformancePlus: "true" <4> | ||
reclaimPolicy: Delete | ||
volumeBindingMode: WaitForFirstConsumer | ||
allowVolumeExpansion: true | ||
---- | ||
<1> Name of the storage class. | ||
<2> Specifies the Azure Disk Container Storage Interface (CSI) driver provisioner. | ||
<3> Specifies the Azure disk type SKU. In this example, `Premium_LRS` for Premium SSD Locally Redundant Storage. | ||
<4> Enables Azure Disk performance plus. | ||
|
||
. Create a persistent volume claim (PVC) that uses this storage class by using the following example YAML file: | ||
+ | ||
.Example PVC YAML file | ||
[source,yaml] | ||
---- | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: <my-azure-pvc> <1> | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
storageClassName: <azure-disk-performance-plus-sc> <2> | ||
resources: | ||
requests: | ||
storage: 513Gi <3> | ||
---- | ||
<1> PVC name. | ||
<2> Reference the performance plus storage class. | ||
<3> Ensure that the disk size requested is 513 GiB, or larger, for performance plus to take effect. | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed with OCP
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1