Linode Block Storage 速度測試

不測還好一測驚呆了

Ian Wu
2 min readMar 8, 2019

故事是這樣的,因為 Linode 主硬碟快滿了,但是如果要提升 Plan 會增加費用,但是這台主機主要是備份資料庫用,如果提升 Plan 多的 CPU、RAM 不會用到感覺有點浪費,所以就想說加一個 Block Storage 把備份資料庫移到 Block Storage 看看

結果,DB 的 Replication 一直斷掉,看了一下 Log 發現是 Slave DB 跟不上 Master 的進度,想了想可能是硬碟速度不夠快,就用 dd 測一下,結果大出意料之外啊

這是 Block Storage 的速度

time dd if=/dev/zero of=test_file bs=4M count=4000 
4000+0 records in
4000+0 records out
16777216000 bytes (17 GB) copied, 444.557 s, 37.7 MB/s
dd if=/dev/zero of=test_file bs=4M count=4000 0.04s user 22.37s system 5% cpu 7:24.56 total

這是內建硬碟的速度

time dd if=/dev/zero of=test_file bs=4M count=4000 
4000+0 records in 4000+0 records out
16777216000 bytes (17 GB) copied, 31.3549 s, 535 MB/s
dd if=/dev/zero of=test_file bs=4M count=4000 0.02s user 20.24s system 64% cpu 31.358 total

差了快 20 倍,難怪會跟不上 Master

後來查了一下相關的文件,Block Storage 不是拿來取代主硬碟用的,而是存一些圖檔或是影音檔之類的,像是網站上傳的圖檔

拿來當 DB 當然會死掉囉

如果有要用 Block Storage 的朋友可要注意一下喔

相關資料

如果喜歡我的文章,歡迎 LIKE 喔

--

--

Ian Wu
Ian Wu

Written by Ian Wu

住在加拿大溫哥華的生活觀察家

Responses (1)