How does the latency of a block storage volume compare to a Linode's SSD?
I have a Discourse forum which needs more disk space. How would moving to a block storage volume affect the speed of the Postgres database compared to how it currently runs on the local SSD?
2 Replies
Hey there!
While I haven't personally used a Postgres database via an attached block storage volume, I went ahead and created a volume then attached it to one of my Linodes to run some extremely basic speed tests. I got the following outputs:
When testing against standard Linode disks creating a 1GB file via dd
$ sync; dd if=/dev/zero of=/tmp/test bs=1M count=1024; sync
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.848645 s, 1.3 GB/s
$ sync; dd if=/dev/zero of=/tmp/test2 bs=1M count=1024; sync
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.817243 s, 1.3 GB/s
$ sync; dd if=/dev/zero of=/tmp/test3 bs=1M count=1024; sync
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.788343 s, 1.4 GB/s
When testing against BlockStorage:
sync; dd if=/dev/zero of=/mnt/testvol/test bs=1M count=1024; sync
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 1.55518 s, 690 MB/s
$ sync; dd if=/dev/zero of=/mnt/testvol/test2 bs=1M count=1024; sync
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 1.2483 s, 860 MB/s
$ sync; dd if=/dev/zero of=/mnt/testvol/test3 bs=1M count=1024; sync
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 1.3759 s, 780 MB/s
In regards to hardware, Linodes utilize SSDs, while blockstorage volumes utilize a combination of HDDs and NVMe drives.
Thank you, that is informative.
For a database however, am I right in thinking raw read or write speed usually won't matter as much as a low latency connection? On the other hand, my forum isn't very busy, it's less than 1 pageview/second on average, so a few extra milliseconds for database queries may be tolerable.