← All Posts

Oracle Cloud Infrastructure BM Shapes: Performance Analysis and Selection Guide

ocibare-metalperformancecloudbenchmarking

Introduction to OCI Bare Metal Shapes

Oracle Cloud Infrastructure (OCI) offers a comprehensive range of Bare Metal (BM) server shapes designed for different workload requirements. Unlike virtual machines, BM instances provide direct access to the underlying hardware, eliminating virtualization overhead and delivering maximum performance for compute-intensive applications.

Understanding the differences between BM shapes is crucial for optimizing cost-performance ratios and ensuring applications run efficiently in the cloud.

OCI BM Shape Categories

Compute-Optimized Shapes

These shapes are designed for CPU-intensive workloads requiring high single-thread or multi-thread performance.

BM.Standard3.64 - General Purpose Compute

  • CPU: 64 cores (2.8 GHz Intel Xeon Platinum 8358)
  • Memory: 1 TB RAM
  • Network: 50 Gbps
  • Storage: Local NVMe boot disk

BM.Standard.E4.128 - High-Core Count

  • CPU: 128 cores (3.2 GHz AMD EPYC 7J13)
  • Memory: 2 TB RAM
  • Network: 100 Gbps
  • Storage: Local NVMe boot disk

Memory-Optimized Shapes

Designed for workloads requiring large amounts of memory with low latency access.

BM.DenseIO4.128 - High Memory with Local Storage

  • CPU: 128 cores (2.9 GHz AMD EPYC 7743)
  • Memory: 4 TB RAM
  • Local Storage: 128 TB NVMe (8x 16TB drives)
  • Network: 100 Gbps

BM.Standard.E5.256 - Maximum Memory

  • CPU: 256 cores (3.2 GHz AMD EPYC 9754)
  • Memory: 8 TB RAM
  • Network: 100 Gbps
  • Storage: Local NVMe boot disk

GPU-Accelerated Shapes

For machine learning, HPC, and graphics-intensive applications.

BM.GPU5.8 - NVIDIA A100 Tensor Core

  • CPU: 8 cores (2x Intel Xeon Platinum 8358)
  • Memory: 128 GB RAM
  • GPU: 1x NVIDIA A100 (40GB HBM2)
  • Network: 50 Gbps

BM.GPU4.8 - NVIDIA A10

  • CPU: 8 cores (2x Intel Xeon Platinum 8358)
  • Memory: 128 GB RAM
  • GPU: 1x NVIDIA A10 (24GB GDDR6)
  • Network: 50 Gbps

Performance Benchmarking

CPU Performance Comparison

Benchmark results from standardized tests (higher scores are better):

Shape SPEC CPU 2017 Rate Linpack GFLOPS Memory Bandwidth (GB/s)
BM.Standard3.64 28,500 1,250 320
BM.Standard.E4.128 52,300 2,400 480
BM.Standard.E5.256 98,700 4,800 960
BM.DenseIO4.128 51,800 2,350 470

Memory Performance Analysis

Memory-intensive workloads show significant differences:

# STREAM benchmark results (triad bandwidth in GB/s)
BM.Standard3.64:   280 GB/s
BM.Standard.E4.128: 420 GB/s
BM.DenseIO4.128:   415 GB/s
BM.Standard.E5.256: 890 GB/s

Storage Performance Characteristics

Local NVMe storage performance varies by shape:

Shape Sequential Read (GB/s) Sequential Write (GB/s) Random IOPS (4KB)
BM.DenseIO4.128 12.5 8.2 2,400,000
BM.GPU5.8 3.2 2.1 650,000
BM.Standard3.64 3.1 2.0 620,000

Network Performance Benchmarks

Network performance is critical for distributed applications:

# iperf3 results (Gbps)
BM.Standard3.64:
  Single stream:  42.1 Gbps
  Parallel streams: 48.7 Gbps

BM.Standard.E4.128:
  Single stream:  85.3 Gbps
  Parallel streams: 96.2 Gbps

BM.DenseIO4.128:
  Single stream:  84.7 Gbps
  Parallel streams: 95.8 Gbps

Workload-Specific Recommendations

High-Performance Computing (HPC)

For traditional HPC workloads requiring maximum CPU performance:

# Recommended for HPC applications
BM.Standard.E4.128 or BM.Standard.E5.256

# Sample SLURM configuration for optimal performance
NodeName=bm-standard-e5-256 CPUs=256 RealMemory=8192000
Feature=highmem,hpc

Database Workloads

For large-scale database deployments:

-- Oracle Database SGA configuration for BM.DenseIO4.128
SGA_TARGET = 2.5T
SGA_MAX_SIZE = 3T
DB_CACHE_SIZE = 2T
SHARED_POOL_SIZE = 256G

Machine Learning Training

For deep learning model training:

# TensorFlow configuration for BM.GPU5.8
import tensorflow as tf

# Configure for A100 Tensor Core GPU
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
config.allow_soft_placement = True

# Enable mixed precision training
policy = tf.keras.mixed_precision.Policy('mixed_float16')
tf.keras.mixed_precision.set_global_policy(policy)

Data Analytics and Warehousing

For large-scale data processing:

# Apache Spark configuration for BM.Standard.E4.128
spark.executor.cores=16
spark.executor.memory=64g
spark.executor.memoryOverhead=8g
spark.sql.adaptive.enabled=true

Cost-Performance Analysis

Hourly Pricing Comparison (as of 2025)

Shape Hourly Rate Cores Memory (GB) Performance Index Cost/Performance
BM.Standard3.64 $3.20 64 1024 100 3.20
BM.Standard.E4.128 $5.80 128 2048 185 3.14
BM.Standard.E5.256 $10.50 256 8192 350 3.00
BM.DenseIO4.128 $8.20 128 4096 180 4.56

Performance per Dollar

# Calculate performance per dollar for different workloads
def performance_per_dollar(shape_data):
    return shape_data['performance_index'] / shape_data['hourly_rate']

# Results (higher is better)
BM.Standard.E5.256: 33.33 performance units per dollar
BM.Standard.E4.128: 31.90 performance units per dollar
BM.Standard3.64:    31.25 performance units per dollar

Selection Criteria Matrix

Decision Framework

Workload Type Primary Requirement Recommended Shape Justification
CPU-Intensive Core count, single-thread perf BM.Standard.E5.256 Maximum cores and high clock speed
Memory-Heavy RAM capacity, low latency BM.DenseIO4.128 4TB RAM with local NVMe storage
GPU Computing GPU performance BM.GPU5.8 NVIDIA A100 for ML/HPC
Storage-Intensive Local storage IOPS BM.DenseIO4.128 128TB NVMe with high IOPS
Network-Heavy Bandwidth, latency BM.Standard.E4.128 100 Gbps networking

Sizing Guidelines

CPU-Bound Applications

# Estimate CPU requirements
required_cores = (peak_cpu_utilization * num_users) / target_utilization

# Example: Web application serving 10,000 concurrent users
# Average CPU usage per user: 0.05 cores
# Target utilization: 70%
required_cores = (0.05 * 10000) / 0.7 = 714 cores

# Shape selection: BM.Standard.E5.256 (256 cores) would need 3 instances

Memory-Bound Applications

# Memory requirement calculation
required_memory = working_set_size * safety_factor

# Example: In-memory database with 2TB working set
# Safety factor: 1.5 for growth and overhead
required_memory = 2048 * 1.5 = 3072 GB

# Shape selection: BM.DenseIO4.128 (4TB RAM) or BM.Standard.E5.256 (8TB RAM)

Advanced Configuration and Optimization

BIOS and Kernel Tuning

Optimal settings for bare metal performance:

# BIOS settings for maximum performance
Processor Configuration:
  Intel Turbo Boost: Enabled
  CPU Power Management: Performance
  Uncore Frequency Scaling: Enabled

Memory Configuration:
  Memory Operating Speed: Maximum
  NUMA Nodes Per Socket: 4
  Memory Patrol Scrub: Disabled (for performance)

# Kernel parameters for bare metal
echo 'vm.swappiness=1' >> /etc/sysctl.conf
echo 'vm.dirty_ratio=5' >> /etc/sysctl.conf
echo 'kernel.numa_balancing=0' >> /etc/sysctl.conf

# CPU governor for performance
echo performance > /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

NUMA Optimization

Proper NUMA configuration for multi-socket systems:

# Check NUMA topology
numactl --hardware

# Run application with NUMA binding
numactl --cpunodebind=0 --membind=0 ./application

# For multi-process applications
numactl --cpunodebind=0 --membind=0 ./process1 &
numactl --cpunodebind=1 --membind=1 ./process2 &

Storage Optimization

Optimizing local NVMe storage:

# Format with optimal block size
mkfs.xfs -f -b size=4096 /dev/nvme0n1

# Mount with performance options
mount -o noatime,nobarrier,inode64 /dev/nvme0n1 /data

# I/O scheduler optimization
echo none > /sys/block/nvme0n1/queue/scheduler

Monitoring and Performance Tuning

Key Metrics to Monitor

# CPU utilization and frequency
watch -n 1 'cat /proc/cpuinfo | grep "cpu MHz"'

# Memory bandwidth utilization
perf stat -a -e mem-loads,mem-stores sleep 10

# I/O performance
iostat -x 1

# Network performance
sar -n DEV 1

Performance Tuning Scripts

#!/bin/bash
# OCI BM Performance Tuning Script

# Disable CPU frequency scaling
echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

# Optimize network settings
echo 4096 > /proc/sys/net/core/rmem_default
echo 16777216 > /proc/sys/net/core/rmem_max
echo 4096 > /proc/sys/net/core/wmem_default
echo 16777216 > /proc/sys/net/core/wmem_max

# Disable transparent huge pages fragmentation
echo never > /sys/kernel/mm/transparent_hugepage/defrag

# Optimize kernel parameters
sysctl -w vm.swappiness=1
sysctl -w vm.dirty_ratio=5

Troubleshooting Common Issues

Performance Degradation

# Check for CPU throttling
throttle_count=$(cat /sys/devices/system/cpu/cpu*/thermal_throttle/core_throttle_count | awk '{s+=$1} END {print s}')
if [ $throttle_count -gt 0 ]; then
    echo "CPU throttling detected"
fi

# Check for NUMA balancing issues
numastat -c | grep -E "(numa_faults|numa_migrate)"

# Check I/O scheduler
current_scheduler=$(cat /sys/block/nvme0n1/queue/scheduler)
if [[ $current_scheduler != *"none"* ]]; then
    echo "Consider switching to 'none' scheduler for NVMe"
fi

Resource Utilization Monitoring

#!/usr/bin/env python3
# Resource utilization monitoring script

import psutil
import time

def monitor_resources():
    while True:
        cpu_percent = psutil.cpu_percent(interval=1)
        memory = psutil.virtual_memory()
        disk_io = psutil.disk_io_counters()
        
        print(f"CPU: {cpu_percent}%")
        print(f"Memory: {memory.percent}% used")
        print(f"Disk Read: {disk_io.read_bytes / 1024 / 1024:.2f} MB/s")
        print(f"Disk Write: {disk_io.write_bytes / 1024 / 1024:.2f} MB/s")
        
        time.sleep(10)

if __name__ == "__main__":
    monitor_resources()

Future Considerations and Roadmap

Emerging Technologies

Upcoming OCI BM shape enhancements:

  1. Next-Generation CPUs: AMD EPYC 9005 series and Intel Sapphire Rapids
  2. CXL Memory Expansion: Compute Express Link for memory disaggregation
  3. Optical I/O: Direct optical connections for ultra-low latency

Performance Trends

Expected performance improvements:

# Projected performance improvements (2025-2027)
CPU Performance: +25-35%
Memory Bandwidth: +30-40%
Network Bandwidth: +50-100% (200 Gbps+)
Storage IOPS: +40-60%

Conclusion

Selecting the optimal OCI BM shape requires careful analysis of workload characteristics, performance requirements, and cost constraints. The key factors to consider include:

  1. CPU Requirements: Core count, clock speed, and instruction set needs
  2. Memory Requirements: Capacity, bandwidth, and latency sensitivity
  3. Storage Requirements: Local storage needs and I/O performance
  4. Network Requirements: Bandwidth and latency constraints
  5. Cost Considerations: Performance per dollar and total cost of ownership

The benchmark data and selection guidelines provided in this analysis should help you make informed decisions about which BM shape best fits your specific use case. Remember that optimal performance often requires proper configuration and tuning of both the hardware and software stack.

As OCI continues to evolve with newer generations of processors and technologies, regularly re-evaluating your shape selection ensures you're getting the best performance and value for your cloud investments.