Linux 下 RAID1 的 SSD 會有讀取不平均問題

在「Unbalanced reads from SSDs in software RAID mirrors in Linux」這邊看到作者看 S.M.A.R.T. 數據時發現兩顆 SSD 硬碟組成的 RAID1 有很明顯的讀取不平均的問題:

242 Total_LBAs_Read [...] 16838224623
242 Total_LBAs_Read [...] 1698394290

原因是因為 Linux 對 RAID1 的 SSD 有不一樣的演算法:

The current state of RAID1 read balancing is kind of complex, but the important thing here in all kernels since 2012 is that if you have SSDs and at least one disk is idle, the first idle disk will be chosen.

2016 時演算法就更激進了,變成非 SSD 會:

In kernels with the late 2016 change, this widens to if at least one disk is idle, the first idle disk will be chosen, even if all mirrors are HDs.

加上 SSD 很快,這造成 loading 幾乎都在第一顆上... 這對 SSD 應該是還好啦 (理論上 SSD 的讀取不傷壽命),不過還是有點怪就是了。

手機上用 FPGA 的想法...

在「Apps with hardware: enabling run-time architectural customization in smart phones」這邊看到去年就有論文在討論在手機上使用 FPGA 的想法...

的確現在 FPGA 的價錢其實是蠻平價的了... 除了透過 GPU 加速外,FPGA 聽起來也是個不錯的方向 @_@

最直接的例子就是 AES 運算來看,可以看到比現在最快的實做快了半個數量級,大約三倍?(跟支援硬體加速的 OpenSSL 比,看格子大約是半格,也就是 100.5,約 3.16 倍)。

而如果是純軟體的應用,有些會差到四個數量級... (萬?)

在手機裡面放木馬後故意讓手機被偷走的紀錄片...

在手機裡面裝木馬後故意讓別人偷走,然後觀察小偷的行為並且拍成紀錄片:「Student Lets Thief Steal His Phone, Spies On Him For Weeks To Make This Documentary」。

影片已經有人翻譯完,有中文字幕可以開起來看:

裡面用的木馬 (防盜軟體) 是 Cerberus

Etsy 用 SSD 的故事

EtsyLaurie Denness 對於 Etsy 使用各種品牌 SSD 的情況給出了他的經歷:「SSDs: A gift and a curse」。

重點在於開頭說的:

SSD firmware is buggy

可以看到當 SSD 配上 RAID controller 的時候,常常會需要找問題... (而且很難找)

Intel 的評價很不錯:

Okay, bad start, we’ve actually had no issues with Intel. This seems to be common across other companies we’ve spoken to.

OCZ 倒了,被 Toshiba 收購,而且 S.M.A.R.T. 資訊很差,很難預測什麼時候會掛掉 (有助於提前替換):

However, they had poor SMART info (none) so predicting failures was hard.

HP 是個大黑盒:

Unfortunately, HP have proprietary RAID controllers, and they don’t support SMART. Or rather, they refuse to talk to non-HP drives using off the shelf technology, they have their own methods.

Samsung 的評價不錯,C/P 值很高,而且有 S.M.A.R.T.:

Samsung saved the day and picked up from OCZ with a ludicrously cheap 960GB offering, the 840 EVO. A consumer drive, so very limited warranty, but for the price (~$400-500) you got great IOPS and they were reliable. They had better SMART info, and seemed to play nicely with our hardware.

不過 BB6Q 版的韌體搞爆了效能,雖然最後修好了:「Samsung Releases Firmware Update to Fix the SSD 840 EVO Read Performance Bug」。

LiteOn 則是掛在 GC 上 (RAID 裡同時掛掉兩顆以上):

The SSDs were having extended garbage collection periods, exacerbated by a smaller amount of SSDs with higher IO, in RAID6. This caused the controller to kick the drive out of the array… and unfortunately due to the write levelling across the drives, at least two of them were garbage collecting at the same time, destroying the array integrity.

不過後來 Dell 與 LiteOn 分別就 RAID controller 與 SSD 本身都跳下去修正,最後還是解決了:

Dell and LiteOn together identified and fixed weaknesses in their RAID controller, the backplane and the SSD firmware.

算是經驗分享,在 SSD 硬碟成熟的過程中間必經的道路 XD

用 Raspberry Pi 自幹一台 3G 手機...

在「DIY Smartphone」這邊看到用 Raspberry Pi 做出一台手機:

DIY Smartphone using Raspberry Pi A+ Pi, Camera, PiTFT, and Adafruit FONA with custom mobile OS.

然後 FAQ 的部份 XDDD

The thing is a inch thick! Why would you build something so useless when you can buy a cheap phone for less that can do much much more?

No reason.

可以看到超大隻超陽春:

Backblaze 用 SMART 的資料推算硬碟故障可能性

Backblaze 的「Hard Drive SMART Stats」這篇文章裡面提到了用 S.M.A.R.T. 的資料交叉分析硬碟存活的比率。

比較有趣的是對 Power_Cycle_Count 這個數據的解讀:

We’re not sure whether this is because cycling the power is bad for the drive, or because working on the pods is bad for the drives, or because “new” drives have flaws that are exposed during the first few dozen power cycles and then things settle down.

再對照其他幾張與 Power_Cycle_Count 相關的圖,通電次數看不出跟存活率有絕對關係 :p

avast 的人從網路上買了二十台智慧型手機...

然後從裡面拉出四萬張照片:「Tens of thousands of Americans sell themselves online every day」。

We purchased 20 used Android phones off eBay and used simple and easily available recovery software to restore deleted files.

雖然文章是在推銷 avastAndroid 清除軟體,但還是顯示出一般人對資安上的熟悉度不足。

加州的手機防竊提案...

由於手機的行竊與搶劫案件已經是美國目前遇到的重大問題,所以有幾位法界人士提案,要立法強制對手機業者實作行動電話的防竊機制:「Proposed California Law Would Mandate Smartphone Kill Switch」,報導在「Proposed California law would mandate smartphone kill switch」。

希望藉由這套防竊機制,讓銷贓變得困難,希望藉此降低手機行竊與搶劫的案件數量...

Kill Switch 的機制並沒有詳細說明,不過應該就是類似目前 Apple 的方式?可以遠端強制對手機下鎖上甚至銷毀的命令...