Skip to content

Commit e4c5ce5

Browse files
Merge pull request #92182 from Vaishali-gif-rh/CNV-47262
CNV#47262
2 parents 80f8353 + bf1f52b commit e4c5ce5

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * virt/virtual_machines/creating_vms_custom/virt-creating-vms-by-cloning-pvcs.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="virt-optimizing-clone-performance-at-scale-in-openshift-data-foundation_{context}"]
7+
= Optimizing clone Performance at scale in {rh-storage}
8+
9+
When you use {rh-storage}, the storage profile configures the default cloning strategy as `csi-clone`. However, this method has limitations, as shown in the following link. After a certain number of clones are created from a persistent volume claim (PVC), a background flattening process begins, which can significantly reduce clone creation performance at scale.
10+
11+
To improve performance when creating hundreds of clones from a single source PVC, use the `VolumeSnapshot` cloning method instead of the default `csi-clone` strategy.
12+
13+
.Procedure
14+
Create a `VolumeSnapshot` custom resource (CR) of the source image by using the following content:
15+
[source,yaml]
16+
----
17+
apiVersion: snapshot.storage.k8s.io/v1
18+
kind: VolumeSnapshot
19+
metadata:
20+
name: golden-volumesnapshot
21+
namespace: golden-ns
22+
spec:
23+
volumeSnapshotClassName: ocs-storagecluster-rbdplugin-snapclass
24+
source:
25+
persistentVolumeClaimName: golden-snap-source
26+
----
27+
28+
. Add the `spec.source.snapshot` stanza to reference the `VolumeSnapshot` as the source for the `DataVolume clone`:
29+
30+
[source,yaml]
31+
----
32+
spec:
33+
source:
34+
snapshot:
35+
namespace: golden-ns
36+
name: golden-volumesnapshot
37+
----

virt/creating_vms_advanced/creating_vms_cli/virt-creating-vms-by-cloning-pvcs.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ This method creates a data volume whose lifecycle is independent of the original
3131
+
3232
This method creates a data volume whose lifecycle is dependent on the original VM. Deleting the original VM deletes the cloned data volume and its associated PVC.
3333

34+
include::modules/virt-optimizing-clone-performance-at-scale-in-openshift-data-foundation.adoc[leveloffset=+2]
35+
36+
[role="_additional-resources"]
37+
.Additional resources
38+
* xref:../../../virt/storage/virt-configuring-storage-profile.adoc#virt-customizing-storage-profile-default-cloning-strategy_virt-configuring-storage-profile[Setting a default cloning strategy using a storage profile]
39+
* link:https://docs.redhat.com/en/documentation/red_hat_openshift_data_foundation/4.18/html/managing_and_allocating_storage_resources/volume-cloning_rhodf#volume-cloning_rhodf[Volume cloning]
40+
* link:https://docs.redhat.com/en/documentation/openshift_container_platform/4.18/html/storage/using-container-storage-interface-csi#persistent-storage-csi-snapshots[CSI volume snapshots]
41+
3442
include::modules/virt-cloning-pvc-to-dv-cli.adoc[leveloffset=+2]
3543

3644
include::modules/virt-creating-vm-cloned-pvc-data-volume-template.adoc[leveloffset=+2]

0 commit comments

Comments
 (0)