πŸ“˜How to Test Disk Speed (I/O) on a VPS or Dedicated Server

Environment:
Any Linux-based VPS or Dedicated Server
Access Required:
SSH root or sudo access


Step 1: Test Write Speed

Run the following command to measure write speed:

dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync

Explanation:

  • if=/dev/zero: Reads from a stream of zeroes (empty data)
  • of=test: Writes to a file named test
  • bs=64k: Block size of 64 kilobytes
  • count=16k: Writes 16,384 blocks
  • conv=fdatasync: Ensures data is flushed to disk before reporting

Step 2: Test Read Speed

After the write test, check read speed with:

dd if=test of=/dev/null bs=1M count=1024

Explanation:

  • if=test: Reads from the file created earlier
  • of=/dev/null: Discards the read data
  • bs=1M: Reads in 1 MB blocks
  • count=1024: Reads 1024 MB total

Step 3: Evaluate Performance

Compare the final speeds shown at the end of each command using the table below:

Drive TypeSpeed (MB/s)Performance Assessment
HDD> 50 MB/sAcceptable baseline for spinning disks
HDD< 50 MB/sPoor β€” could impact server performance
SSDβ‰₯ 100 MB/sAcceptable for SSD-based systems
SSD300–500+ MB/sGood performance for SATA SSDs
NVMe SSD1000–3000+ MB/sExpected for high-performance NVMe drives
NVMe SSD< 1000 MB/sUnderperforming β€” may indicate an issue

πŸ’‘ Note: NVMe disks should perform significantly faster than traditional SSDs. If your NVMe disk is under 1000 MB/s, verify your hosting provider’s specifications or check for I/O limitations (especially on VPS plans).


Optional: Advanced Benchmarking

For a more detailed performance test (including IOPS and latency), see:
πŸ‘‰ ShellHacks: Disk Speed Test (Read/Write Performance)


Step 4: Clean Up

Remove the test file to free space:

rm -f test

Let me know if you want this as a downloadable PDF, HTML guide, or in Markdown format for documentation or blogging.

Scroll to Top