From: Chuck Lever <cel@kernel.org>
To: <kdevops@lists.linux.dev>
Cc: Chuck Lever <chuck.lever@oracle.com>,
Luis Chamberlain <mcgrof@kernel.org>
Subject: [PATCH v2 09/37] terraform/oci: Add Kconfig choices for disk performance provisioning
Date: Tue, 2 Sep 2025 09:53:56 -0400 [thread overview]
Message-ID: <20250902135426.815079-10-cel@kernel.org> (raw)
In-Reply-To: <20250902135426.815079-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.
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
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-09-02 13:54 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-02 13:53 [PATCH v2 00/37] Various fixes Chuck Lever
2025-09-02 13:53 ` [PATCH v2 01/37] scripts: Update gen_ssh_key.sh Chuck Lever
2025-09-02 13:53 ` [PATCH v2 02/37] terraform/azure: Fix count of managed disks Chuck Lever
2025-09-02 13:53 ` [PATCH v2 03/37] terraform/azure: Remove tags from terraform configuration Chuck Lever
2025-09-02 13:53 ` [PATCH v2 04/37] terraform/azure: Enable network acceleration Chuck Lever
2025-09-02 13:53 ` [PATCH v2 05/37] terraform/azure: Make the resource group name a variable Chuck Lever
2025-09-02 13:53 ` [PATCH v2 06/37] terraform/azure: Remove the provider version constraint Chuck Lever
2025-09-02 13:53 ` [PATCH v2 07/37] terraform/azure: Update the RHEL publishers Chuck Lever
2025-09-02 13:53 ` [PATCH v2 08/37] terraform/oci: Work around oracle/oci provider bug Chuck Lever
2025-09-02 13:53 ` Chuck Lever [this message]
2025-09-02 13:53 ` [PATCH v2 10/37] terraform/oci: Enable preemptible compute instances Chuck Lever
2025-09-02 13:53 ` [PATCH v2 11/37] terraform/aws: Fix zone selection for us_west1 Chuck Lever
2025-09-02 13:53 ` [PATCH v2 12/37] Revert "terraform/aws: Add Oracle Linux AMI selections" Chuck Lever
2025-09-02 13:54 ` [PATCH v2 13/37] terraform/aws: Remove unused terraform tags Chuck Lever
2025-09-02 13:54 ` [PATCH v2 14/37] terraform/GCE: Fix the default disk throughput values Chuck Lever
2025-09-02 13:54 ` [PATCH v2 15/37] terraform/gce: Remove unused tags Chuck Lever
2025-09-02 13:54 ` [PATCH v2 16/37] terraform/gce: Remove support for Fedora Chuck Lever
2025-09-02 13:54 ` [PATCH v2 17/37] terraform/gce: Update existing machine types and introduce new ones Chuck Lever
2025-09-02 13:54 ` [PATCH v2 18/37] terraform: Create the user's .ssh/config if it does not already exist Chuck Lever
2025-09-02 13:54 ` [PATCH v2 19/37] pynfs: Don't install xdrlib3 on older RHEL Chuck Lever
2025-09-02 13:54 ` [PATCH v2 20/37] guestfs: Update the guestfs playbook description Chuck Lever
2025-09-02 19:36 ` Daniel Gomez
2025-09-02 13:54 ` [PATCH v2 21/37] gen_hosts: Add 'localhost' to the [all] group Chuck Lever
2025-09-02 19:39 ` Daniel Gomez
2025-09-02 13:54 ` [PATCH v2 22/37] gen_hosts: Add [service] group to the builder host template Chuck Lever
2025-09-02 19:43 ` Daniel Gomez
2025-09-02 19:47 ` Chuck Lever
2025-09-02 20:38 ` Daniel Gomez
2025-09-02 13:54 ` [PATCH v2 23/37] guestfs: Don't run the 'destroy' tags on the controller Chuck Lever
2025-09-02 19:54 ` Daniel Gomez
2025-09-02 19:59 ` Chuck Lever
2025-09-02 20:40 ` Daniel Gomez
2025-09-02 13:54 ` [PATCH v2 24/37] base_image: Skip "locales-all" package on Fedora Chuck Lever
2025-09-02 19:57 ` Daniel Gomez
2025-09-02 13:54 ` [PATCH v2 25/37] update_etc_hosts: ipaddr Chuck Lever
2025-09-02 19:59 ` Daniel Gomez
2025-09-02 13:54 ` [PATCH v2 26/37] Add an Ansible requirements.yml file Chuck Lever
2025-09-02 20:06 ` Daniel Gomez
2025-09-02 20:13 ` Chuck Lever
2025-09-02 13:54 ` [PATCH v2 27/37] terraform/oci: Clean up white space in route table resource Chuck Lever
2025-09-02 20:10 ` Daniel Gomez
2025-09-02 13:54 ` [PATCH v2 28/37] guestfs: Correct the spelling of "drives" Chuck Lever
2025-09-02 20:14 ` Daniel Gomez
2025-09-02 13:54 ` [PATCH v2 29/37] guestfs: Configure how many extra drives to provision Chuck Lever
2025-09-02 20:19 ` Daniel Gomez
2025-09-02 20:23 ` Chuck Lever
2025-09-02 13:54 ` [PATCH v2 30/37] ltp: Replace /opt with a symlink to data partition Chuck Lever
2025-09-02 13:54 ` [PATCH v2 31/37] terraform: Squelch Ansible complaints about missing inventory file Chuck Lever
2025-09-02 13:54 ` [PATCH v2 32/37] terraform: Skip localhost when waiting for targets to reboot Chuck Lever
2025-09-02 13:54 ` [PATCH v2 33/37] devconfig: include the "service" group in the playbooks hosts list Chuck Lever
2025-09-02 20:27 ` Daniel Gomez
2025-09-02 20:30 ` Chuck Lever
2025-09-02 20:45 ` Daniel Gomez
2025-09-02 13:54 ` [PATCH v2 34/37] Makefile: Remove CONFIG_TOPDIR_PATH_HAS_SHA256SUM Chuck Lever
2025-09-02 13:54 ` [PATCH v2 35/37] Makefile: Set TOPDIR_PATH and generate its sha256sum at run time Chuck Lever
2025-09-02 13:54 ` [PATCH v2 36/37] ansible.cfg: generate an ansible.cfg file in TOPDIR Chuck Lever
2025-09-02 13:54 ` [PATCH v2 37/37] inventory: generate the inventory pathname dynamically Chuck Lever
2025-09-02 15:24 ` [PATCH v2 00/37] Various fixes Luis Chamberlain
2025-09-02 20:34 ` Daniel Gomez
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=20250902135426.815079-10-cel@kernel.org \
--to=cel@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=kdevops@lists.linux.dev \
--cc=mcgrof@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.