Validate OCI Instance Block Volume Performance

Problem Statement

We need to migrate our production workload in Oracle Cloud Infrastructure.
Based on image shape, CPU and memory can be determined but IOPS needs to be endorsed.

Trailing specifics will cover up couple of methods to legalize IO performance using Open source tools.

OCI Documentation summary

The OCI Block Volume service lets you dynamically provision and manage block storage volumes. You can create, attach, connect and move volumes as needed to meet your storage and application requirements.

The Block Volume service supports creating volumes sized from 50 GB to a maximum size of 32 TB, in 1 GB increments. You can attach up to 32 volumes to an instance, with a maximum of 1 PB of attached volumes per instance.

For additional details, refer Oracle Documentation

Following are simple and easy steps to validate the performance of a Block Volume.

Create OCI instance

Detailed steps to create virtual machine (VM) Compute instance

Selecting Instance shape

Instance created

Create Block Volume

Steps to create block volume from OCI console

Volume Performance

While creating block volume, i have selected 50GB volume size with Lower Cost volume performance.

Attach Block Volume to an instance

Attaching the Block Volume (OCIBlockVolumeTest) created in above step to an instance where it is intended to be used.

Block Volume Attached

On server we can see new block device as highlighted

Block Volume performance SLA based on OCI documentation

As mentioned in previous steps, we have selected Lower Cost Volume performance while creating block volume.
The following table lists the Block Volume service throughput and IOPS performance numbers based on volume size for this option.

Validate Block Volume Performance using FIO

Using FIO commands we can practice to run performance tests for the Oracle Cloud Infrastructure Block Volume service on instances created from Linux-based images.

Install FIO

sudo yum install fio -y

Perform Test

Run below command to begin performance test using FIO

sudo fio –filename=/dev/sdb –direct=1 –rw=randrw –bs=4k –ioengine=libaio –iodepth=256 –runtime=120 –numjobs=4 –time_based –group_reporting –name=iops-test-job –eta-newline=1

As highlighted, we can see a total 3024 IOPS out of which read IOPS=1512 and write IOPS=1512 as mentioned in Oracle Documentation.

Warning: This should not be performed on existing used devices as this may overwrite data.

Validate Block Volume Performance using Cloud Harmony

Cloud Harmony test suite is another tool which can be used to validate block volume performance.
Unlike FIO, this tool represents IO performance graphically and hence has better readability.

Install Cloud Harmony

Cloud harmony can be installed using git clone.
To initiate git clone, we need to install git packages using below command.

sudo yum install git -y

Once git is installed, clone cloud harmony test suite using below command

git clone

Dependent Packages

Cloud Harmony suite uses fio scripts for automation and graph/PDF generators for reporting to replicate the SNIA Solid State Storage (SSS) Performance Test Specification (PTS) Enterprise v1.1.

It uses following packages

  fio         Performs actual testing - version 2.1+ required
  gnuplot     Generates graphs per the SNIA test specification. These graphs  
              are used in the PDF report
  hdparm      Used for ATA secure erase (when supported)
  php-cli     Test automation scripts (/usr/bin/php)
  timeout     Used to limit fio runtime when applicable to avoid stuck fio
  util-linux  For TRIM operations using `blkdiscard` and `fstrim` (when
              supported). Not required if test targets are rotational
  wkhtmltopdf Generates PDF version of report - download from
  xvfb-run    Allows wkhtmltopdf to be run in headless mode (required if
              --nopdfreport is not set and --wkhtml_xvfb is set)
  zip         Archives HTML test report into a single zip file

We need to install it separately using below commands.

 sudo yum install php-cli
 sudo yum install gnuplot
 sudo yum install wkhtmltopdf  

Run Cloud Harmony test Suite

Use below command to initiate IOPS test

sudo /home/opc/block-storage/ –nopurge –noprecondition –fio_direct=1 –fio_size=10g –target /dev/sdb –test iops –skip_blocksize 512b

Based on image shape, it took 4+ hours to complete the execution in my environment.
It generated HTML report comprising of all statistics.

Tabular format

Graphical illustration

Both results clearly indicates 3000+ IOPS for Read/Write operations while using 4K/8K block size as mentioned in Oracle documentation.
Download complete Report for reference.



1 thought on “Validate OCI Instance Block Volume Performance”

  1. Very nicely explained and additionally covers the steps to attach block volume to compute instance.

Leave a Reply

Your email address will not be published. Required fields are marked *