From: Chuck Lever <cel@kernel.org>
To: <kdevops@lists.linux.dev>
Cc: Chuck Lever <chuck.lever@oracle.com>
Subject: [PATCH v1 09/26] terraform/oci:
Date: Wed, 27 Aug 2025 10:28:04 -0400 [thread overview]
Message-ID: <20250827142832.2629291-10-cel@kernel.org> (raw)
In-Reply-To: <20250827142832.2629291-1-cel@kernel.org>
From: Chuck Lever <chuck.lever@oracle.com>
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 <chuck.lever@oracle.com>
---
.../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
next prev parent reply other threads:[~2025-08-27 14:28 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-27 14:27 [PATCH v1 00/26] Various fixes Chuck Lever
2025-08-27 14:27 ` [PATCH v1 01/26] scripts: Update gen_ssh_key.sh Chuck Lever
2025-08-27 14:27 ` [PATCH v1 02/26] terraform/azure: Fix count of managed disks Chuck Lever
2025-08-27 14:27 ` [PATCH v1 03/26] terraform/azure: Remove tags from terraform configuration Chuck Lever
2025-08-27 14:27 ` [PATCH v1 04/26] terraform/azure: Enable network acceleration Chuck Lever
2025-08-27 14:28 ` [PATCH v1 05/26] terraform/azure: Make the resource group name a variable Chuck Lever
2025-08-27 14:28 ` [PATCH v1 06/26] terraform/azure: Remove the provider version constraint Chuck Lever
2025-08-27 14:28 ` [PATCH v1 07/26] terraform/azure: Update the RHEL publishers Chuck Lever
2025-08-27 14:28 ` [PATCH v1 08/26] terraform/oci: Work around oracle/oci provider bug Chuck Lever
2025-08-27 14:28 ` Chuck Lever [this message]
2025-08-27 14:28 ` [PATCH v1 10/26] terraform/oci: Enable preemptible compute instances Chuck Lever
2025-08-27 14:28 ` [PATCH v1 11/26] terraform/aws: Fix zone selection for us_west1 Chuck Lever
2025-08-27 14:28 ` [PATCH v1 12/26] Revert "terraform/aws: Add Oracle Linux AMI selections" Chuck Lever
2025-08-27 14:28 ` [PATCH v1 13/26] terraform/aws: Remove unused terraform tags Chuck Lever
2025-08-27 14:28 ` [PATCH v1 14/26] terraform/GCE: Fix the default disk throughput values Chuck Lever
2025-08-27 14:28 ` [PATCH v1 15/26] terraform/gce: Remove unused tags Chuck Lever
2025-08-27 14:28 ` [PATCH v1 16/26] terraform/gce: Remove support for Fedora Chuck Lever
2025-08-27 14:28 ` [PATCH v1 17/26] terraform/gce: Update existing machine types and introduce new ones Chuck Lever
2025-08-27 18:13 ` Chuck Lever
2025-08-27 14:28 ` [PATCH v1 18/26] terraform: Create the user's .ssh/config if it does not already exist Chuck Lever
2025-08-27 14:28 ` [PATCH v1 19/26] pynfs: Don't install xdrlib3 on older RHEL Chuck Lever
2025-08-27 14:28 ` [PATCH v1 20/26] guestfs: Update the guestfs playbook description Chuck Lever
2025-08-27 14:28 ` [PATCH v1 21/26] gen_hosts: Add 'localhost' to the [all] group Chuck Lever
2025-08-27 14:28 ` [PATCH v1 22/26] gen_host: Add [service] group to the builder template Chuck Lever
2025-08-27 14:28 ` [PATCH v1 23/26] guestfs: Don't run the 'destroy' tags on the controller Chuck Lever
2025-08-27 14:28 ` [PATCH v1 24/26] base_image: Skip "locales-all" package on Fedora Chuck Lever
2025-08-27 14:28 ` [PATCH v1 25/26] update_etc_hosts: ipaddr Chuck Lever
2025-08-27 14:28 ` [PATCH v1 26/26] Add an Ansible requirements.yml file Chuck Lever
2025-08-27 19:16 ` [PATCH v1 00/26] Various fixes Luis Chamberlain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250827142832.2629291-10-cel@kernel.org \
--to=cel@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=kdevops@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox