From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CBA3535A293 for ; Wed, 27 Aug 2025 14:28:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756304918; cv=none; b=bTA7FTaYwWiTKKOWZyx8iU/HQhIgW1zC9r6dkxMw3V6k15LMHU+bJNYoKf+brTutOe0OHR21VqHFGUC9Cm+qOuuRW3pLKkXDCDxC4c9aGlQie5IPjoqVvwxIpib+Nj8DgnZAc8Jz7+liOtHnNddPUhYjEzhPO2ym3s9mpyeLEl8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756304918; c=relaxed/simple; bh=oF0Ij1eE9RC4iz7k167P1/iGgWjavDvVxuESD8sHShU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rXgmdErnmv5RACi99+DWPlVrLR2w4iARni3ZvYFVrR9MJIIgWeUxksByUdcQ439BjTmIPu1Cg4rHWM+sGnza0RVj10l8alu7n2l4g9UZPNqwVgr+6T3eTKnibyf5tYJe/YXD/KzzwmpRfPCxCMDMce68qQDpW/YtfxVe1Ov75kY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=juefqVo+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="juefqVo+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 276AFC4CEEB; Wed, 27 Aug 2025 14:28:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1756304918; bh=oF0Ij1eE9RC4iz7k167P1/iGgWjavDvVxuESD8sHShU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=juefqVo+PTQ8p/a2NmILYOjt0iOuioYXqXRgXQb+phQM97DTq3EfJfxEfh1QyiT6Y aZtMxZkOuq8GLPSuiT3/7MSVaBWCMM9jkvzPBBDMOPASS3cYPi28WNhpQXwVcj08cG L6XGeIA3sT/V6iNHdirnITeyK0SNL+FnxWX/pYuXA793TUhmL80oifFny3f7/MGY51 BAQxpZ/5fcgofkCcdkT0Xag0iF+Xr1z15g+aFHjvyKgm/+8PlVhC6RvL7LNs/+WP6p g6TNnwqQxlJXbr8UuSGNjemiUwrdI7GSu9ZEr//er6kxZ8RkprB1qMMjph+c99doZ5 TUDFFCksGBjIQ== From: Chuck Lever To: Cc: Chuck Lever Subject: [PATCH v1 09/26] terraform/oci: Date: Wed, 27 Aug 2025 10:28:04 -0400 Message-ID: <20250827142832.2629291-10-cel@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250827142832.2629291-1-cel@kernel.org> References: <20250827142832.2629291-1-cel@kernel.org> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Chuck Lever Add the vpus_per_gb argument when provisioning disk drives to control how much performance is available. This is similar to the performance settings available for other providers. Signed-off-by: Chuck Lever --- .../templates/oci/terraform.tfvars.j2 | 1 + terraform/oci/kconfigs/Kconfig.storage | 132 ++++++++++++++++++ terraform/oci/main.tf | 1 + terraform/oci/vars.tf | 5 + terraform/oci/volumes/main.tf | 12 +- terraform/oci/volumes/vars.tf | 5 + 6 files changed, 151 insertions(+), 5 deletions(-) diff --git a/playbooks/roles/gen_tfvars/templates/oci/terraform.tfvars.j2 b/playbooks/roles/gen_tfvars/templates/oci/terraform.tfvars.j2 index 9c32ea5884d4..0839bfacfb24 100644 --- a/playbooks/roles/gen_tfvars/templates/oci/terraform.tfvars.j2 +++ b/playbooks/roles/gen_tfvars/templates/oci/terraform.tfvars.j2 @@ -18,6 +18,7 @@ oci_subnet_ocid = "{{ terraform_oci_subnet_ocid }}" {% endif %} oci_volumes_per_instance = {{ terraform_oci_volumes_per_instance }} oci_volumes_size = {{ terraform_oci_volumes_size }} +oci_vpus_per_gb = {{ terraform_oci_vpus_per_gb }} oci_data_volume_device_file_name = "{{ terraform_oci_data_volume_device_file_name }}" oci_sparse_volume_device_file_name = "{{ terraform_oci_sparse_volume_device_file_name }}" diff --git a/terraform/oci/kconfigs/Kconfig.storage b/terraform/oci/kconfigs/Kconfig.storage index ed872a26834e..15a2a05bb26a 100644 --- a/terraform/oci/kconfigs/Kconfig.storage +++ b/terraform/oci/kconfigs/Kconfig.storage @@ -122,6 +122,138 @@ config TERRAFORM_OCI_VOLUMES_SIZE default 4096 if TERRAFORM_OCI_VOLUMES_SIZE_4096G default 8192 if TERRAFORM_OCI_VOLUMES_SIZE_8192G +choice + prompt "Volume Performance Units for each additional volume" + default TERRAFORM_OCI_VPUS_PER_GB_10 + help + Higher VPUs per GB increases maximum IOPS and throughput, + but costs more. For more information, see: + + https://docs.oracle.com/en-us/iaas/Content/Block/Concepts/blockvolumeperformance.htm#vpus + +config TERRAFORM_OCI_VPUS_PER_GB_0 + bool "0 VPUs" + help + Lowest cost. + + 2 IOPS/GB, 3,000 IOPS maximum/volume. + 480 MBPS maximum/volume. + +config TERRAFORM_OCI_VPUS_PER_GB_10 + bool "10 VPUs" + help + Balanced performance. + + 60 IOPS/GB, 25,000 IOPS maximum/volume. + 480 MBPS maximum/volume. + +config TERRAFORM_OCI_VPUS_PER_GB_20 + bool "20 VPUs" + help + Higher performance. + + 75 IOPS/GB, 50,000 IOPS maximum/volume. + 680 MBPS maximum/volume. + +config TERRAFORM_OCI_VPUS_PER_GB_30 + bool "30 VPUs" + help + Ultra high performance. + + 90 IOPS/GB, 75,000 IOPS maximum/volume. + 880 MBPS/volume. + +config TERRAFORM_OCI_VPUS_PER_GB_40 + bool "40 VPUs" + help + Ultra high performance. + + 105 IOPS/GB, 100,000 IOPS maximum/volume. + 1,080 MBPS maximum/volume. + +config TERRAFORM_OCI_VPUS_PER_GB_50 + bool "50 VPUs" + help + Ultra high performance. + + 120 IOPS/GB, 125,000 IOPS maximum/volume. + 1,280 max MBPS/volume. + +config TERRAFORM_OCI_VPUS_PER_GB_60 + bool "60 VPUs" + help + Ultra high performance. + + 135 IOPS/GB, 150,000 IOPS maximum/volume. + 1,480 max MBPS/volume. + +config TERRAFORM_OCI_VPUS_PER_GB_70 + bool "70 VPUs" + help + Ultra high performance. + + 150 IOPS/GB, 175,000 IOPS maximum/volume. + 1,680 max MBPS/volume. + +config TERRAFORM_OCI_VPUS_PER_GB_80 + bool "80 VPUs" + help + Ultra high performance. + + 165 IOPS/GB, 200,000 IOPS maximum/volume. + 1,880 max MBPS/volume. + +config TERRAFORM_OCI_VPUS_PER_GB_90 + bool "90 VPUs" + help + Ultra high performance. + + 180 IOPS/GB, 225,000 IOPS maximum/volume. + 2,080 max MBPS/volume. + +config TERRAFORM_OCI_VPUS_PER_GB_100 + bool "100 VPUs" + help + Ultra high performance. + + 195 IOPS/GB, 250,000 IOPS maximum/volume. + 2,280 max MBPS/volume. + +config TERRAFORM_OCI_VPUS_PER_GB_110 + bool "110 VPUs" + help + Ultra high performance. + + 210 IOPS/GB, 275,000 IOPS maximum/volume. + 2,480 max MBPS/volume. + +config TERRAFORM_OCI_VPUS_PER_GB_120 + bool "120 VPUs" + help + Ultra high performance. + + 225 IOPS/GB, 300,000 IOPS maximum/volume. + 2,680 max MBPS/volume. + +endchoice + +config TERRAFORM_OCI_VPUS_PER_GB + int + output yaml + default 0 if TERRAFORM_OCI_VPUS_PER_GB_0 + default 10 if TERRAFORM_OCI_VPUS_PER_GB_10 + default 20 if TERRAFORM_OCI_VPUS_PER_GB_20 + default 30 if TERRAFORM_OCI_VPUS_PER_GB_30 + default 40 if TERRAFORM_OCI_VPUS_PER_GB_40 + default 50 if TERRAFORM_OCI_VPUS_PER_GB_50 + default 60 if TERRAFORM_OCI_VPUS_PER_GB_60 + default 70 if TERRAFORM_OCI_VPUS_PER_GB_70 + default 80 if TERRAFORM_OCI_VPUS_PER_GB_80 + default 90 if TERRAFORM_OCI_VPUS_PER_GB_90 + default 100 if TERRAFORM_OCI_VPUS_PER_GB_100 + default 110 if TERRAFORM_OCI_VPUS_PER_GB_110 + default 120 if TERRAFORM_OCI_VPUS_PER_GB_120 + config TERRAFORM_OCI_DATA_VOLUME_DEVICE_FILE_NAME string "Data volume's device file name" output yaml diff --git a/terraform/oci/main.tf b/terraform/oci/main.tf index d231f2225e5d..1d2d0f82e00f 100644 --- a/terraform/oci/main.tf +++ b/terraform/oci/main.tf @@ -50,6 +50,7 @@ module "volumes" { vol_instance_name = element(var.kdevops_nodes, count.index) vol_volume_count = var.oci_volumes_per_instance vol_volume_size = var.oci_volumes_size + vol_vpus_per_gb = var.oci_vpus_per_gb } resource "oci_core_vcn" "kdevops_vcn" { diff --git a/terraform/oci/vars.tf b/terraform/oci/vars.tf index c116829fbc72..401341feb34b 100644 --- a/terraform/oci/vars.tf +++ b/terraform/oci/vars.tf @@ -98,3 +98,8 @@ variable "oci_volumes_size" { description = "The size of additional block volumes, in gibibytes" type = number } + +variable "oci_vpus_per_gb" { + description = "Volume performance units" + type = number +} diff --git a/terraform/oci/volumes/main.tf b/terraform/oci/volumes/main.tf index 56b9a476015a..7483ff72836e 100644 --- a/terraform/oci/volumes/main.tf +++ b/terraform/oci/volumes/main.tf @@ -1,9 +1,11 @@ resource "oci_core_volume" "kdevops_volume_extra" { - count = var.vol_volume_count - availability_domain = var.vol_availability_domain - display_name = format("kdevops_%s_volume%02d", var.vol_instance_name, count.index + 1) - compartment_id = var.vol_compartment_ocid - size_in_gbs = var.vol_volume_size + count = var.vol_volume_count + availability_domain = var.vol_availability_domain + compartment_id = var.vol_compartment_ocid + display_name = format("kdevops_%s_vol%02d", var.vol_instance_name, count.index + 1) + is_auto_tune_enabled = false + size_in_gbs = var.vol_volume_size + vpus_per_gb = var.vol_vpus_per_gb } locals { diff --git a/terraform/oci/volumes/vars.tf b/terraform/oci/volumes/vars.tf index 57c5e2bf646b..ee702c2d713f 100644 --- a/terraform/oci/volumes/vars.tf +++ b/terraform/oci/volumes/vars.tf @@ -27,3 +27,8 @@ variable "vol_volume_size" { description = "Size of each volume, in gibibytes" type = number } + +variable "vol_vpus_per_gb" { + description = "Volume performance units" + type = number +} -- 2.51.0