Wednesday, March 18, 2026

Best Practices for Data Storage Configuration for SQL Server (On-Prem, Azure, AWS, GCP)


Best Practices for Data Storage Configuration for SQL Server (On-Prem, Azure, AWS, GCP)

Introduction

Data storage is the most critical component of SQL Server performance. Even with a powerful CPU and large memory, a poorly configured storage system can make SQL Server slow, unstable, and unreliable.

This essay explains everything step by step using:

👉 WHAT the concept is
👉 WHY it matters
👉 HOW to fix or configure it


1. Disk I/O Performance (Top Priority)

WHAT

Disk I/O (Input/Output) is how fast SQL Server can read and write data to storage.

WHY

SQL Server depends heavily on disk speed. If disk I/O is slow:

  • Queries take longer

  • Transactions delay

  • Users experience timeouts

Even the best server cannot perform well with slow disks.

HOW TO RESOLVE

On-Prem

  • Use NVMe SSD or Enterprise SSD

  • Avoid traditional spinning disks (HDD) for production

  • Monitor:

    • Read latency (< 10 ms)

    • Write latency (< 5 ms)

Azure

  • Use:

    • Premium SSD v2

    • Ultra Disk (for high IOPS workloads)

AWS

  • Use:

    • io2 or io1 EBS volumes

    • Provision required IOPS

GCP

  • Use:

    • SSD Persistent Disk

    • Or Local SSD for ultra-fast workloads


2. Separate Data, Log, and TempDB Files

WHAT

SQL Server uses different file types:

  • Data files (.mdf)

  • Log files (.ldf)

  • TempDB files

WHY

Each file type has different I/O patterns:

  • Data = random reads/writes

  • Log = sequential writes

  • TempDB = heavy temporary usage

Mixing them causes contention and slows performance.

HOW TO RESOLVE

Best Practice

Always separate into different disks:

  • Disk 1 → OS

  • Disk 2 → Data files

  • Disk 3 → Log files

  • Disk 4 → TempDB

Cloud Equivalent

Azure

  • Use multiple managed disks

AWS

  • Use multiple EBS volumes

GCP

  • Use separate persistent disks


3. IOPS and Throughput Configuration

WHAT

  • IOPS = number of read/write operations per second

  • Throughput = data transfer rate (MB/s)

WHY

Low IOPS causes:

  • Slow queries

  • Blocking

  • High wait times

HOW TO RESOLVE

On-Prem

  • Use RAID 10 for high IOPS

  • Use storage arrays with high throughput

Azure

  • Choose disk size carefully (larger disks = more IOPS)

  • Use Ultra Disk for adjustable IOPS

AWS

  • Configure IOPS manually for io2 volumes

GCP

  • Increase disk size to increase performance


4. RAID Configuration (On-Prem Only)

WHAT

RAID combines multiple disks for performance and redundancy.

WHY

Improves:

  • Speed

  • Fault tolerance

HOW TO RESOLVE

Best RAID Types

  • RAID 10 → Best for SQL Server (recommended)

  • RAID 1 → Good for log files

  • Avoid RAID 5 for heavy write workloads


5. TempDB Storage Optimization

WHAT

TempDB is a system database used for temporary operations.

WHY

TempDB is one of the most used databases and often becomes a bottleneck.

HOW TO RESOLVE

  • Place TempDB on fastest storage

  • Use SSD or Local SSD

  • Use multiple TempDB files (equal size)

Cloud

  • Azure → TempDB on local SSD (D:)

  • AWS → Instance store (if available)

  • GCP → Local SSD


6. Disk Queue Length Monitoring

WHAT

Disk queue length shows how many requests are waiting.

WHY

High queue length means disk is overloaded.

HOW TO RESOLVE

  • Keep queue length low (< 2 per disk)

  • Add more disks

  • Increase IOPS


7. Storage Tier Selection

WHAT

Different storage tiers exist:

  • Standard (cheap, slow)

  • Premium (fast, expensive)

WHY

Choosing wrong tier causes poor performance or high cost.

HOW TO RESOLVE

Azure

  • Standard HDD → Not for production

  • Premium SSD → Recommended

  • Ultra Disk → High-performance workloads

AWS

  • gp3 → General use

  • io2 → High performance

GCP

  • Standard → Not recommended

  • SSD → Recommended


8. Disk Caching Settings

WHAT

Caching improves read/write speed.

WHY

Wrong caching can harm performance.

HOW TO RESOLVE

Azure

  • Data disks → Read caching ON

  • Log disks → Caching OFF

AWS / GCP

  • Use default optimized settings


9. File Allocation Unit Size (Cluster Size)

WHAT

File system allocation size.

WHY

Wrong size causes inefficiency.

HOW TO RESOLVE

  • Format disks with:
    👉 64 KB allocation unit size


10. Auto-Growth Configuration

WHAT

Database files grow automatically.

WHY

Poor settings cause fragmentation and slow performance.

HOW TO RESOLVE

  • Use fixed growth (MB, not %)

  • Pre-size files


11. Storage Scalability

WHAT

Ability to increase storage.

WHY

Databases grow over time.

HOW TO RESOLVE

On-Prem

  • Use scalable SAN/NAS

Cloud

  • Increase disk size dynamically

  • Use multiple disks


12. Backup Storage Design

WHAT

Where backups are stored.

WHY

Critical for recovery.

HOW TO RESOLVE

On-Prem

  • Use separate backup storage

Cloud

  • Azure → Blob Storage

  • AWS → S3

  • GCP → Cloud Storage


13. Storage Redundancy

WHAT

Data duplication for safety.

WHY

Prevents data loss.

HOW TO RESOLVE

On-Prem

  • RAID

  • Replication

Cloud

  • Azure → Zone-redundant storage

  • AWS → Multi-AZ

  • GCP → Regional storage


14. Disk Latency Optimization

WHAT

Time taken to read/write data.

WHY

High latency slows SQL Server.

HOW TO RESOLVE

  • Use SSD

  • Monitor latency

  • Upgrade disks if needed


15. Storage Virtualization Best Practices

WHAT

Using virtual disks in VMs.

WHY

Improper virtualization causes bottlenecks.

HOW TO RESOLVE

  • Avoid over-allocating storage

  • Use dedicated disks for SQL Server


16. Network Storage (SAN/NAS)

WHAT

Storage accessed over network.

WHY

Common in enterprises.

HOW TO RESOLVE

  • Use high-speed network (10Gb+)

  • Use low-latency SAN


17. Storage Monitoring Tools

WHAT

Tools to track disk performance.

WHY

Detect problems early.

HOW TO RESOLVE

  • Use:

    • Performance Monitor

    • SQL Server DMVs


18. Data Compression

WHAT

Reducing storage size.

WHY

Saves space and improves I/O.

HOW TO RESOLVE

  • Enable row/page compression

  • Use backup compression


19. Partitioning Large Tables

WHAT

Splitting tables into parts.

WHY

Improves performance and manageability.

HOW TO RESOLVE

  • Use partitioning for large datasets


20. Storage Cost Optimization

WHAT

Managing cost vs performance.

WHY

Cloud storage can be expensive.

HOW TO RESOLVE

  • Use right disk type

  • Avoid over-provisioning

  • Archive old data


Conclusion

Data storage is the foundation of SQL Server performance. Whether running:

  • On-premises

  • Azure VM

  • AWS EC2

  • Google Cloud

the same key principles apply:

✔ Use fast disks (SSD/NVMe)
✔ Separate data, logs, and TempDB
✔ Configure IOPS and throughput correctly
✔ Monitor performance continuously
✔ Plan for growth and backups

By following these WHAT → WHY → HOW best practices, organizations can achieve:

  • Faster query performance

  • Higher reliability

  • Better scalability

  • Lower operational cost

No comments:

Post a Comment

FOUNDATION PHASE FOR MIGRATING OnPrem SQL Server to AWS EC2 With VLDBs

FOUNDATION PHASE FOR MIGRATING OnPrem SQL Server to AWS EC2 With VLDBs This is the most important part. If you rush here, everything later b...