5. EXPERIMENT
5.6 Exploration of Firmware/Hardware Combination
5.6.3 FW/HW Combination Principle
最後本篇在本小節討論 SSD 各種韌體演算法與硬體架構的搭配原則,首先 結合前述表現較好的架構做測試,採用 16-Ind-Channel 4-Interleave 的架構與各種 FTL 做綜合比較,如圖 52 所示,以 Windows、IOmeter 和 Multimedia 的存取行 為呈現,圖 52a 為 MLC,而圖 52b 為 SLC,其中比較需要注意的是 BAST 在 MLC 的 Multimedia 下輸給 FAST,BAST 之所以會在循序存取贏 FAST 是因為其 GC 可以有做 switch merge 的機會,但隨著 Chip 數量越多或 block 越大,循序資 料被截斷的情況也會越嚴重,因此越不容易有機會做 switch merge,而又因為 BAST 的單一 log block 使得 GC 的觸發可能很頻繁,因此就略輸於 FAST。但在
WinXP IOmeter Media
IOPS
BAST BC N8K16 FAST PL a、MLC
WinXP IOmeter Media
IOPS
BAST BC N8K16 FAST PL b、SLC
圖 52、各種 FTL 在 16-Independent Channel 4-Interleave 中的表現
綜合而言,韌體演算法的設計主要 SSD 的用途有關,也就是會受到不同存 取行為影響,而硬體架構的主要目的是透過增加平行度來提升 SSD 效能,本篇 發現不管在 Syn-Channel、Ind-Channel 還是 Interleave 架構下各種 FTL 的比較都 是類似的,且不同的硬體架構對於各種 FTL 的影響是差不多的,表示 FTL 和硬 體架構的選擇是可以分開來考量的,但某些組合下會有如同前述 FAST 等的特例
- 58 -
產生,因此在這種情況下就必須額外搭配適當的韌體機制。
綜觀韌體演算法和硬體架構,由 5.3 到 5.6 的討論可以得到幾點結論,第一 點,韌體演算法的設計取決於 SSD 的用途,不同的用途會有不同的資料存取行 為,其中 Page level 是表現最好的 FTL,但其所消耗的 RAM 較大,而 Log-based FTL 可以經由 data block 的 N 值和 log block 的 K 值分別處理不同空間區域性和 時間區域性的 workload。第二點,硬體架構的設計決定 SSD 的效能,其中可獨 立存取的架構表現較優異,其中 Ind-Channel 具有高彈性和高平行度,是最佳的 架構設計。第三點,SSD 的硬體架構設計需要考量到的韌體機制包含 Buffer 和 Data placement,而越高平行度的架構在越好的韌體環境例如 Spare 和 FTL 下可 以發揮出越好的效能。最後,FTL 與各種硬體架構的關係是互相獨立的,舉例而 言,若 SSD 的用途是要處理隨機資料則採用 PL 或 FAST 會比較好,相反的處理 循序資料則應該採用 BAST 或 BC,硬體架構只是用來優化各種 FTL 的效能,並 不容易影響 FTL 的表現,但也需要考慮到少數的例外,所以簡而言之,有最好 的硬體架構,需要相對應的機制搭配,但沒有最好的韌體演算法,只有最適合某 種用途或某個硬體架構的演算法。
- 59 - 6. CONCLUSION AND FUTURE WORK
SSD 不論在設計或測試上都包含很多困難,過長的產品開發週期也使得這些 困難更加巨大化,因此軟體模擬的輔助是必要的。現今的 SSD 模擬軟體都注重 硬體元件的分類與參數的制定,但沒有搭配足夠的韌體支援,往往使得本來應該 增加便利度的工具難以上手。
為了改善這個問題,本篇建立一個韌體演算法和硬體架構的標準制定工具
(RAPT)。由韌體支援著手,提出 Index、Association 和 Prioritization 三個韌體 設計模型,使用者可以透過三者快速抽象出 FTL 的架構並制定 Address Mapping 和 Garbage Collection 等機制,建立好的 FTL 架構同樣可以透過三個模型輕易的 修改。在硬體支援方面,RAPT 將 SSD 硬體元件簡分為 Controller、Bus、Chip enable line 和 Flash chip,透過彼此的溝通可以模擬 Inter-chip 如 Synchronized 和 Independent-Channel、Interleave 架構以及 Intra-chip 如 Multi-Plane 和 Copy-Back 指令。RAPT 也規劃一套富彈性的軟體介面允許同步的 Buffer 機制與自行設計的 輸入輸出檔,以物件導向的方式撰寫,然後以 API 的形式呈現,並且經過驗證 這些 API 可以有效的模擬真實 SSD,讓 RAPT 成為一個真正便捷的 SSD 開發測 試平台。
本篇以 RAPT 為基礎對各種 SSD 韌硬體組合做探討,並且呈現有力的實驗 數據作為參考,在 SSD 的設計上得出四點結論,首先,FTL 的設計根據不同用 途的不同存取行為而定,而硬體架構的設計主要用來提升 SSD 效能,獨立位址 存取的架構是最好的設計,此外硬體架構的設計也需要考量 Buffer 和 Data placement 等機制,而韌體和硬體的搭配上,兩者的選擇可以是互相獨立的,可 以根據不同需求和資源限制分別選擇適合的韌體演算法和硬體架構,但也需要注 意兩者之間的溝通機制,舉例而言怎樣實現平行演算法就很重要。因此若綜合考 量以上數點,要在怎樣的環境開發適合什麼用途的 SSD 就不是難事。
雖然 RAPT 提供的支援可以模擬大部分已知的 SSD 演算法或架構,但許多 API 的使用上像是 Association 和 Multi-Plane 等仍然還有改善的空間,同時因為 模擬效率的問題,RAPT 省略許多硬體溝通的細節考量諸如位元傳輸(Byte Transfer)以及指令傳輸時間(Command Time)等,這些都還有再做修正的空間。
RAPT 也預期將目前採用的 C++語言以更容易代表 SSD 設計的少量描述性語言 呈現,希望讓 SSD 的設計之路更加順暢。
- 60 - REFERENCE
[1] SystemC library, http://www.systemc.org/home/.
[2] Samsung, K9XXG08UXA and K9XXG08UXM NAND Flash Specification.
[3] Fast Just Got Faster: SATA 6Gb/s, SATA-IO, 2009.
[4] PCI Express 3.0, PCI-SIG, http://www.pcisig.com/.
[5] Kang, J., Jo, H., Kim, J., and Lee, J. 2006. A superblock-based flash translation layer for NAND flash memory. In Proceedings of the 6th ACM &Amp; IEEE international Conference on Embedded Software (Seoul, Korea, October 22 - 25, 2006). EMSOFT '06. ACM, New York, NY, 161-170. DOI=
http://doi.acm.org/10.1145/1176887.1176911.
[6] Kim, J., Kim, J, M., Noh, S, H., Min, S, L., and Cho, Y. 2002. A Space-Efficient Flash Translation Layer for Compact Flash Systems, IEEE Transactions on Consumer Electronics. (May. 2002), DATE '02, IEEE. 366-375.
[7] Lee, S., Park, D., Chung, T., Lee, D., Park, S., and Song, H. 2007. A log buffer-based flash translation layer using fully-associative sector translation. ACM Trans. Embed. Comput. Syst. 6, 3 (Jul. 2007), 18. DOI=
http://doi.acm.org/10.1145/1275986.1275990.
[8] Park, C., Cheon, W., Kang, J., Roh, K., Cho, W., and Kim, J. 2008. A reconfigurable FTL (flash translation layer) architecture for NAND flash-based applications. ACM Trans. Embed. Comput. Syst. 7, 4 (Jul. 2008), 1-23. DOI=
http://doi.acm.org/10.1145/1376804.1376806.
[9] DiskSim, http://www.pdl.cmu.edu/DiskSim/.
[10] Agrawal, N., Prabhakaran, V., Wobber, T., Davis, J. D., Manasse, M., and Panigrahy, R. 2008. Design tradeoffs for SSD performance. In USENIX 2008 Annual Technical Conference on Annual Technical Conference (Boston, Massachusetts, June 22 - 27, 2008). USENIX Association, Berkeley, CA, 57-70.
[11] Shin, J., Xia, Z., Xu, N., Gao, R., Cai, X., Maeng, S., and Hsu, F. 2009. FTL design exploration in reconfigurable high-performance SSD for server applications. In Proceedings of the 23rd international Conference on Supercomputing (Yorktown Heights, NY, USA, June 08 - 12, 2009). ICS '09.
ACM, New York, NY, 338-349. DOI=
http://doi.acm.org/10.1145/1542275.1542324.
[12] Lee, J., Byun, E., Park, H., Choi, J., Lee, D., and Noh, S. H. 2009. CPS-SIM:
configurable and accurate clock precision solid state drive simulator. In Proceedings of the 2009 ACM Symposium on Applied Computing (Honolulu, Hawaii). SAC '09. ACM, New York, NY, 318-325. DOI=
http://doi.acm.org/10.1145/1529282.1529351.
- 61 -
[13] Kim, Y., Tauras, B., Gupta, A., and Urgaonkar, B. 2009. FlashSim: A Simulator for NAND Flash-Based Solid-State Drives. In Proceedings of the 2009 First international Conference on Advances in System Simulation (September 20 - 25, 2009). SIMUL. IEEE Computer Society, Washington, DC, 125-131. DOI=
http://dx.doi.org/10.1109/SIMUL.2009.17.
[14] Cho, H., Shin, D., Eom, Y. I. 2009. KAST: K-associative sector translation for NAND flash memory in real-time systems. In Proceedings of Design, Automation
& Test in Europe Conference & Exhibition. (April 20 - 24, 2009), DATE '09, IEEE.
507-512.
[15] Chang, L. and Kuo, T. 2005. Efficient management for large-scale flash-memory storage systems with resource conservation. Trans. Storage 1, 4 (Nov. 2005), 381-418. DOI= http://doi.acm.org/10.1145/1111609.1111610.
[16] Kim, Y., Kim J. 2008. DAC: A Device-Aware Cache Management Algorithm for Heterogeneous Mobile Storage Systems, IEICE Transactions on Information and Systems (December. 2008), DATE’08, IEICE 2818-2833.
[17] Chang, L. 2008. Hybrid solid-state disks: combining heterogeneous NAND flash in large SSDs. In Proceedings of the 2008 Asia and South Pacific Design Automation Conference (Seoul, Korea, January 21 - 24, 2008). Asia and South Pacific Design Automation Conference. IEEE Computer Society Press, Los Alamitos, CA, 428-433.
[18] Park, J., Bahn, H., and Koh, K. 2009. Buffer Cache Management for Combined MLC and SLC Flash Memories Using both Volatile and Nonvolatile RAMs. In Proceedings of the 2009 15th IEEE international Conference on Embedded and Real-Time Computing Systems and Applications (August 24 - 26, 2009). RTCSA.
IEEE Computer Society, Washington, DC, 228-235. DOI=
http://dx.doi.org/10.1109/RTCSA.2009.32.
[19] DiskMon, http://technet.microsoft.com/en-us/sysinternals/bb896646.aspx.
[20] Blktrace,
http://manpages.ubuntu.com/manpages/intrepid/en/man8/blktrace.8.html.
[21] IOmeter Project, http://www.iometer.org/.
[22] Gupta, A., Kim, Y., and Urgaonkar, B. 2009. DFTL: a flash translation layer employing demand-based selective caching of page-level address mappings. In Proceeding of the 14th international Conference on Architectural Support For Programming Languages and Operating Systems (Washington, DC, USA, March 07 - 11, 2009). ASPLOS '09. ACM, New York, NY, 229-240. DOI=
http://doi.acm.org/10.1145/1508244.1508271.
[23] Lee, S., Shin, D., Kim, Y., and Kim, J. 2008. LAST: locality-aware sector translation for NAND flash memory-based storage systems. SIGOPS Oper. Syst.
- 62 -
Rev. 42, 6 (Oct. 2008), 36-42. DOI=
http://doi.acm.org/10.1145/1453775.1453783.
[24] Jiang, S. and Zhang, X. 2002. LIRS: an efficient low inter-reference recency set replacement policy to improve buffer cache performance. SIGMETRICS Perform.
Eval. Rev. 30, 1 (Jun. 2002), 31-42. DOI=
http://doi.acm.org/10.1145/511399.511340.
[25] Megiddo, N. and Modha, D. S. 2003. ARC: A Self-Tuning, Low Overhead Replacement Cache. In Proceedings of the 2nd USENIX Conference on File and Storage Technologies (San Francisco, CA, March 31 - 31, 2003). Conference On File And Storage Technologies. USENIX Association, Berkeley, CA, 115-130.
[26] HD tune, http://www.hdtune.com/