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 namedtest
bs=64k
: Block size of 64 kilobytescount=16k
: Writes 16,384 blocksconv=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 earlierof=/dev/null
: Discards the read databs=1M
: Reads in 1 MB blockscount=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 Type | Speed (MB/s) | Performance Assessment |
---|---|---|
HDD | > 50 MB/s | Acceptable baseline for spinning disks |
HDD | < 50 MB/s | Poor β could impact server performance |
SSD | β₯ 100 MB/s | Acceptable for SSD-based systems |
SSD | 300β500+ MB/s | Good performance for SATA SSDs |
NVMe SSD | 1000β3000+ MB/s | Expected for high-performance NVMe drives |
NVMe SSD | < 1000 MB/s | Underperforming β 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.