I have a VPS server (WiredTree), running CentOS.
After experiencing some performance issues I created a simple benchmark for disk read/write speed using the following script:
echo Write to disk
dd if=/dev/zero of=test1 bs=1048576 count=2048
echo Read from disk
dd if=test1 of=/dev/null bs=1048576
Here's a sample output:
[bizwayz@host perf]./benchmark
Write to disk
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 11.2601 seconds, 191 MB/s
Read from disk
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 0.789302 seconds, 2.7 GB/s
[bizwayz@host perf]./benchmark
Write to disk
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 3.69129 seconds, 582 MB/s
Read from disk
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 0.789897 seconds, 2.7 GB/s
[bizwayz@host perf]./benchmark
Write to disk
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 9.56615 seconds, 224 MB/s
Read from disk
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 0.882664 seconds, 2.4 GB/s
[bizwayz@host perf]./benchmark
Write to disk
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 3.52512 seconds, 609 MB/s
Read from disk
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 0.784007 seconds, 2.7 GB/s
My question is whether it's normal for the write speed to be so much slower than read.