redhat
+
+
+
+
hack
echo
+
>=
arch
mxnet
py
+
travis
+
protobuf
+
rubymine
kotlin
ts
r
+
netlify
+
+
solid
gulp
surrealdb
+
=>
torch
=>
+
+
hapi
+
pinecone
+
tcl
surrealdb
kotlin
+
+
dask
eslint
php
symfony
rider
+
fedora
wasm
cobol
vercel
+
+
abap
composer
raspbian
gh
{}
+
ionic
+
+
couchdb
+
^
+
+
+
+
aws
+
++
fedora
mongo
+
jest
scheme
phoenix
+
+
neo4j
+
+
+
[]
+
+
yaml
Back to Blog
๐Ÿ’พ I/O Performance Tuning: Complete AlmaLinux Disk Speed Optimization Guide
I/O Optimization Disk Performance AlmaLinux

๐Ÿ’พ I/O Performance Tuning: Complete AlmaLinux Disk Speed Optimization Guide

Published Sep 14, 2025

Boost disk I/O performance on AlmaLinux with proven optimization techniques. Learn to configure I/O schedulers, tune file systems, and maximize storage speed for better system performance.

10 min read
0 views
Table of Contents

๐Ÿ’พ I/O Performance Tuning: Complete AlmaLinux Disk Speed Optimization Guide

Ready to make your AlmaLinux systemโ€™s storage lightning fast? โšก Today weโ€™ll learn how to optimize I/O performance, configure disk schedulers, and tune your storage system for maximum speed! Perfect for databases, file servers, and high-performance applications! ๐Ÿš€

๐Ÿค” Why is I/O Performance Important?

Optimizing disk I/O brings massive improvements:

  • ๐Ÿ“Œ Faster file operations - Read/write operations complete quicker
  • ๐Ÿ”ง Better database performance - Queries run faster with optimized storage
  • ๐Ÿš€ Reduced application latency - Programs wait less for disk operations
  • ๐Ÿ” Higher throughput - Process more data in less time
  • โญ Better user experience - System feels more responsive overall

๐ŸŽฏ What You Need

Before we optimize I/O performance:

  • โœ… AlmaLinux 9 system with root privileges
  • โœ… Understanding of basic file system concepts
  • โœ… Storage devices (SSD recommended for best results)
  • โœ… Backup of important data (always backup before tuning!)

๐Ÿ“ Step 1: Analyze Current I/O Performance

Letโ€™s see how your storage performs right now! ๐Ÿ“Š

Check I/O Statistics

# Install I/O monitoring tools
sudo dnf install -y iotop sysstat hdparm

# View real-time I/O usage
sudo iotop -o

# Check disk I/O statistics
iostat -x 1 5

Example output:

Device            r/s     w/s     rMB/s     wMB/s   %util
sda              2.45   15.30      0.05      0.61    1.23
nvme0n1         12.18    8.67      0.48      0.34    0.89

What this shows: ๐Ÿ“–

  • r/s, w/s = Reads and writes per second
  • rMB/s, wMB/s = Megabytes read/written per second
  • %util = Percentage of time device was busy

Test Raw Disk Performance

# Test sequential read performance
sudo hdparm -t /dev/sda

# Test cached read performance  
sudo hdparm -T /dev/sda

# Comprehensive disk benchmark
sudo dd if=/dev/zero of=/tmp/testfile bs=1G count=1 oflag=direct

๐Ÿ”ง Step 2: Configure I/O Schedulers

I/O schedulers control how disk requests are ordered:

Check Current Scheduler

# View current I/O scheduler for each device
cat /sys/block/sda/queue/scheduler

# List all available schedulers
ls /sys/block/sda/queue/

# Check all storage devices
lsblk -d -o name,rota,sched

Optimize Scheduler for Your Storage Type

# For SSDs - use 'none' or 'mq-deadline'
echo none | sudo tee /sys/block/nvme0n1/queue/scheduler

# For traditional HDDs - use 'mq-deadline'
echo mq-deadline | sudo tee /sys/block/sda/queue/scheduler

# For databases - use 'noop' (if available) or 'none'
echo none | sudo tee /sys/block/sdb/queue/scheduler

Pro tip: ๐Ÿ’ก SSDs perform best with โ€˜noneโ€™ scheduler, while HDDs benefit from โ€˜mq-deadlineโ€™!

๐ŸŒŸ Step 3: Optimize File System Parameters

Tune file system settings for better I/O:

Ext4 Optimization

# Mount with performance-optimized options
sudo mount -o remount,noatime,commit=60 /

# Check current mount options
mount | grep "on / "

# Add optimization to fstab
sudo cp /etc/fstab /etc/fstab.backup
sudo sed -i 's/defaults/defaults,noatime,commit=60/' /etc/fstab

XFS Optimization

# For XFS file systems
sudo mount -o remount,noatime,logbsize=256k,largeio /home

# Check XFS performance parameters
xfs_info /home

What happens: ๐Ÿ”„

  • noatime stops updating access timestamps (faster)
  • commit=60 reduces journal commits (better for writes)
  • logbsize=256k optimizes XFS log performance
  • Overall I/O operations become much faster

โœ… Step 4: Configure Kernel I/O Parameters

Optimize kernel settings for better I/O performance:

# Increase read-ahead for better sequential performance
echo 4096 | sudo tee /sys/block/sda/queue/read_ahead_kb

# Optimize I/O queue depth
echo 32 | sudo tee /sys/block/sda/queue/nr_requests

# Configure dirty page writeback
echo 'vm.dirty_ratio = 15' | sudo tee -a /etc/sysctl.conf
echo 'vm.dirty_background_ratio = 5' | sudo tee -a /etc/sysctl.conf
echo 'vm.dirty_expire_centisecs = 3000' | sudo tee -a /etc/sysctl.conf

# Apply kernel parameter changes
sudo sysctl -p

Good results show: โœจ

vm.dirty_ratio = 15
vm.dirty_background_ratio = 5
vm.dirty_expire_centisecs = 3000

๐ŸŽฎ Quick Examples

Example 1: Complete SSD Optimization ๐ŸŽฏ

# Optimize for SSD storage
echo none | sudo tee /sys/block/nvme0n1/queue/scheduler
echo 1024 | sudo tee /sys/block/nvme0n1/queue/read_ahead_kb
echo 'vm.swappiness=1' | sudo tee -a /etc/sysctl.conf

# Enable TRIM for SSD health
sudo systemctl enable fstrim.timer
sudo systemctl start fstrim.timer

# Verify TRIM is working
sudo fstrim -v /

Example 2: Database Server I/O Optimization ๐Ÿ”„

# Optimize for database workloads
echo none | sudo tee /sys/block/sda/queue/scheduler
echo 'vm.dirty_ratio = 5' | sudo tee -a /etc/sysctl.conf
echo 'vm.dirty_background_ratio = 2' | sudo tee -a /etc/sysctl.conf

# Apply changes
sudo sysctl -p

# Test database I/O performance
sudo dd if=/dev/zero of=/tmp/db-test bs=8k count=10000 oflag=direct

Example 3: Real-time I/O Monitoring โšก

# Monitor I/O in real-time
sudo iotop -a -o

# Watch I/O wait times
iostat -x 2

# Check I/O latency
sudo perf record -e block:block_rq_complete sleep 10
sudo perf report

๐Ÿšจ Fix Common Problems

Problem 1: High I/O Wait Times โŒ

Symptoms:

  • System feels slow despite low CPU usage
  • High %iowait in top/htop
  • Applications freeze during file operations

Try this:

# Check which processes are causing I/O wait
sudo iotop -a -o

# Optimize I/O scheduler
echo mq-deadline | sudo tee /sys/block/sda/queue/scheduler

# Reduce dirty page ratio
echo 'vm.dirty_ratio = 10' | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

Problem 2: Slow File System Performance โŒ

Try this:

# Check file system errors
sudo fsck -f /dev/sda1

# Remount with performance options
sudo mount -o remount,noatime,commit=120 /

# Check for fragmentation (ext4)
sudo e4defrag -c /

Problem 3: SSD Performance Degradation โŒ

Check these things:

# Check SSD health
sudo smartctl -a /dev/nvme0n1

# Verify TRIM is enabled
sudo fstrim -v /

# Check for over-provisioning
sudo hdparm -I /dev/nvme0n1 | grep -i trim

๐Ÿ“‹ Simple Commands Summary

TaskCommand
๐Ÿ‘€ View I/O usagesudo iotop -o
๐Ÿ”ง Set I/O schedulerecho none | sudo tee /sys/block/sda/queue/scheduler
๐Ÿš€ Test disk speedsudo hdparm -t /dev/sda
๐Ÿ›‘ Check I/O statsiostat -x 1 5
โ™ป๏ธ Monitor I/O waitiostat -x 2
๐Ÿ“Š Filesystem infodf -h
โœ… TRIM SSDsudo fstrim -v /

๐Ÿ’ก Tips for Success

  1. Know your storage type ๐ŸŒŸ - Different optimizations for SSD vs HDD
  2. Test before and after ๐Ÿ” - Measure performance improvements
  3. Monitor continuously ๐Ÿš€ - Watch I/O patterns during normal use
  4. Backup first ๐Ÿ“ - Always backup before making changes
  5. Optimize for workload ๐Ÿ”„ - Different settings for databases vs file servers

๐Ÿ† What You Learned

Congratulations! Now you can:

  • โœ… Analyze I/O performance and identify bottlenecks
  • โœ… Configure optimal I/O schedulers for different storage types
  • โœ… Tune file system parameters for better performance
  • โœ… Optimize kernel I/O settings effectively
  • โœ… Monitor and troubleshoot I/O performance issues

๐ŸŽฏ Why This Matters

Now your storage system:

  • ๐Ÿš€ Processes data faster with optimized I/O scheduling
  • ๐Ÿ” Responds quicker to application requests
  • ๐Ÿ“Š Handles higher workloads without performance degradation
  • โšก Provides consistent performance across different usage patterns

Remember: I/O optimization is about matching settings to your specific workload and storage hardware! โญ

Youโ€™ve mastered I/O performance tuning! Your AlmaLinux systemโ€™s storage will now deliver significantly better performance for all your applications! ๐Ÿ™Œ