去年買的一塊Seagate Backup Plus 4TB, 專門用來備份的, 之前在win7下用過幾次, 但是在Ubuntu下可能只用過一兩次, 今天備份的時候, 感覺寫入速度不太正常, 大概只有12~15MB/s的樣子, 硬盤原來出廠設置的分區是單獨一個NTFS分區, 我懷疑是NTFS分區在Linux下速度有影響, 於是重新分區格式化為ext4. 但是發現速度更慢了, 讀寫都只有1.5MB/s, 慢到極點.
硬盤信息
$ sudo smartctl -x /dev/sdc1 smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.15.0-36-generic] (local build) Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Vendor: Seagate Product: BUP BL Revision: 0304 Compliance: SPC-4 User Capacity: 4,000,787,029,504 bytes [4.00 TB] Logical block size: 512 bytes Physical block size: 4096 bytes Logical Unit id: 0x5000000000000001 Serial number: NA9F8ZJ6 Device type: disk Local Time is: Thu Oct 4 20:01:57 2018 CST SMART support is: Available - device has SMART capability. SMART support is: Disabled Temperature Warning: Disabled or Not Supported Read Cache is: Enabled Writeback Cache is: Enabled === START OF READ SMART DATA SECTION === SMART Health Status: OK Current Drive Temperature: 0 C Drive Trip Temperature: 0 C Error Counter logging not supported Device does not support Self Test logging Device does not support Background scan results logging
在google中搜Seagate Backup Plus Ubuntu slow能查到不少相似的問題記錄, 主要原因一是說Linux對SMR硬盤的支持, 另一是說主板BIOS, 其中有一個提供的解決辦法是用gparted做成GPT分區, 按這個方法處理后, 硬盤速度就恢復正常了. 現在讀寫的benchmark是 66MB/s 和 20MB/s, 在大文件寫入中顯示的寫入速度在25~40MB/s之間. 因為SMR硬盤本身性能的影響, 在連續寫入大概90GB后, 寫入速度會快速下降
installed 'gparted' and then created GPT partition table via "Device-> Create partition table-> GPT". Then i created desired number of partitions with formats such as ntfs, ext4 etc... Now it works fine!
SMR中文叫疊瓦式磁記錄, 關於SMR硬盤的說明, 可以參考知乎的這兩篇 https://www.zhihu.com/question/31941970 和 https://www.zhihu.com/question/278755486 . SMR硬盤的寫入性能非常差, 正常就只有20~30MB/s, 不適合用於大量寫的場景(例如系統盤, 以及陣列), 目前7mm的2.5硬盤基本都是SMR的, 9mm的2T只有這一款 ST2000LM003