簡易檢索 / 詳目顯示

研究生: 王聖凱
Wang, Sheng-Kai
論文名稱: 基於分區命名空間固態硬碟I/O緩衝機制以加速檔案讀寫效能
Enhancing File Read/Write Performance Based on Buffing I/O Mechanisms for Zoned Namespace Solid-State Drive
指導教授: 侯廷偉
Hou, Ting-Wei
學位類別: 碩士
Master
系所名稱: 工學院 - 工程科學系
Department of Engineering Science
論文出版年: 2024
畢業學年度: 112
語文別: 中文
論文頁數: 57
中文關鍵詞: 固態硬碟分區命名空間固態硬碟RocksDB緩衝架構
外文關鍵詞: solid-state drive, zoned namespace solid-state drive, RocksDB, buffer architecture
相關次數: 點閱:110下載:0
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 分區命名空間固態硬碟將邏輯空間劃分為等大的分區(Zone),並限制分區內的區塊(Block)只能循序寫入,並配合主機端記憶體管理以及相關的機制,以增進效能以及固態硬碟的壽命。
    本研究使用的ZIOB(Zoned Namespace Input Output Buffer)機制,在分區命名空間固態硬碟與主機的架構中新增了一個緩衝架構且使用了SPDK(Storage Performance Development Kit),在主機欲將資料寫入硬碟前先寫入緩衝區,待分區轉換完畢後再循序地寫回硬碟中的分區,可以減緩寫入速度降級、提升I/O速度與吞吐量、延長硬碟的壽命。為測試ZIOB的效能,本研究修改RocksDB的底層,使其能使用ZIOB。
    本研究提出兩種方法加速檔案的讀寫效能,方法一為在現有RocksDB使用的支援分區命名空間的ZenFS檔案系統中導入ZIOB,方法二為在RocksDB的介面上直接導入ZIOB,在使用者層級就可以透過RocksDB的介面調用ZIOB API,藉此加速RocksDB的整體對檔案讀寫的效能。
    本研究透過QEMU (Quick Emulator)模擬一顆分區命名空間固態硬碟進行實驗,並且透過db_bench進行寫入與讀取的測試實驗。相較於原始RocksDB架構在寫入與讀取的吞吐量上分別提升了1.0%至11.7%和0.6%至14.9%。相較於RocksDB使用 ZenFS檔案系統,在寫入的吞吐量上遜54.7%至280%,但在讀取的吞吐量上提升了4.9%至29.1%。

    Zoned Namespace Solid-State Drive (ZNS SSD) divides the logical block into equally sized zones and restricts the blocks within each zone to sequential writes only. This is complemented by host memory management and related mechanisms to enhance performance and extend the lifespan of the SSD.
    Using SPDK (Storage Performance Development Kit), ZIOB (Zoned Namespace Input Output Buffer) mechanism adds a new buffer between the host and ZNS SSD. The data is temporarily cached in the host memory until a zone state transition occurs, at which point the data is sequentially written back. This strategy aims to enhance the throughput and I/O speed and mitigate the degradation of writing speed. To test the performance of ZIOB, this research modifies the underlying structure of RocksDB to enable its use of ZIOB.
    The research proposed two methods to enhance file read/write performance. Importing ZIOB into the existing ZenFS used by RocksDB, which supports ZNS SSD, is the first method. The second method incorporates ZIOB into RocksDB. Through the RocksDB interface, users can call the ZIOB API, which speeds up RocksDB's file read/write performance.
    In this research, a ZNS SSD was simulated using QEMU (Quick Emulator) to conduct experiments. Writing and reading tests were performed using db_bench. Compared to the original RocksDB, the proposed method achieved a throughput improvement of 1.0% to 11.7% in writing and 0.6% to 14.9% in reading. Compared to RocksDB using the ZenFS, write throughput was lower by 54.7% to 280%, but read throughput was improved by 4.9% to 29.1%.

    摘要 I Extended Abstract II 致謝 X 表目錄 XIII 圖目錄 XIV 第一章 緒論 1 1.1 研究背景 1 1.2 研究貢獻 2 1.3 論文架構 2 第二章 文獻探討 3 2.1 背景資訊 3 2.1.1 固態硬碟 3 2.1.2 分區命名空間固態硬碟 5 2.2 本研究使用之軟體工具 11 2.2.1 Storage Performance Development Kit 11 2.2.2 Zoned Namespace Input Output Buffer 12 2.3 研究應用場景 13 2.3.1 RocksDB 13 2.3.2 ZenFS檔案系統 14 2.4 ZenFS檔案系統改善相關研究 15 第三章 系統設計與實作 18 3.1 系統架構 18 3.2 RocksDB、ZenFS檔案系統與ZIOB的共同編譯 19 3.3 軟體架構與流程 20 3.3.1 ZenFS檔案系統與ZIOB 22 3.3.2 使用者流程 23 3.4 RocksDB直接使用ZIOB 24 3.4.1 Put與Get 25 3.4.2 程式架構與流程 25 第四章 研究結果與討論 27 4.1 實驗環境 27 4.1.1 虛擬機 28 4.1.2 分區命名空間固態硬碟設定 29 4.2 實驗設計 30 4.2.1 寫入測試 30 4.2.2 讀取測試 31 4.3 連續讀寫測試結果 31 4.3.1 連續寫入(Append) 32 4.3.2 連續讀取(Read) 33 4.4 實驗結果探討 34 4.5 問題與討論 35 第五章 結論與未來展望 36 5.1 結論 36 5.2 未來研究方向 37 參考文獻 38

    [1] Meta, "RocksDB," [Online]. Available: https://rocksdb.org/. [Accessed 15 July 2024].
    [2] W. D. Corporation, "ZenFS: RocksDB Storage Backend for ZNS SSDs and SMR HDDs," [Online]. Available: https://github.com/westerndigitalcorporation/zenfs/tree/master?tab=readme-ov-file. [Accessed 15 July 2024].
    [3] W.-S. Huang, An Approach to Buffering I/O in Host Memory for Zoned Namespace Solid-State Drive, M.S. Thesis, Dept. of Engineering Science, National Cheng Kung University, Tainan, Taiwan, 2023.
    [4] I. Corporation, "Storage Performance Development Kit," [Online]. Available: https://spdk.io/. [Accessed 15 July 2024].
    [5] M. R. Neal, R. E. Frickey, I. Kalastirsky, M. Quan, D. Ustinov and V. J. Vasudevan, "Reliability of Solid-State Drives Based on NAND Flash Memory," Proceedings of the IEEE, vol. 105, no. 9, pp. 1725-1750, August 2017, doi: 10.1109/JPROC.2017.2725738.
    [6] R. Bez, E. Camerlenghi, A. Modelli and A. Visconti, "Introduction to Flash Memory," Proceedings of the IEEE, vol. 91, no. 4, pp. 489-502, April 2003, doi: 10.1109/JPROC.2003.811702.
    [7] Y. Li and K. N. Quader, "NAND Flash Memory: Challenges and Opportunities," Computer, vol. 16, no. 8, pp. 23-29, May 2013, doi: 10.1109/MC.2013.190.
    [8] Y. Luo and M. Lin, "Flash translation layer: a review and bibliometric analysis," International Journal of Intelligent Computing and Cybernetics, vol. 14, no. 3, pp. 480-508, May 2021, doi:10.1108/IJICC-02-2021-0034.
    [9] T.-s. Chung, D. Park, S. Park, D.-h. Lee, S.-W. Lee and H.-j. Song, "A Survey of Flash Translation Layer," Journal of Systems Architecture, vol. 55, no. 5, pp. 332-343, May/Jun 2009, doi: 10.1016/j.sysarc.2009.03.005.
    [10] J. Kim, K. Lim, Y. Jung, S. Lee, C. Min and S. H. Noh, "Alleviating garbage collection interference through spatial separation in all flash arrays," in USENIX Annual Technical Conference, July 2019, pp. 799-812.
    [11] N. Express®, "Base Specification Revision 2.0c," 2022. [Online]. Available: https://nvmexpress.org/. [Accessed 15 July 2024].
    [12] M. Bjørling, "From Open-Channel SSDs to Zoned Namespaces," in Proc. Linux Storage and Filesyst. Conf.(Valut), Boston, MA, USA, January 2019, vol. 1, pp. 20.
    [13] M. Bjørling, A. Aghayev, H. Holmberg, A. Ramesh, D. Le Moal, G. R. Ganger and G. Amvrosiadis, "ZNS: Avoiding the Block Interface Tax for Flash-based SSDs," in USENIX Annual Technical Conference, July 2021, pp. 689-703.
    [14] N. Tehrany and A. Trivedi, Understanding NVMe Zoned Namespace (ZNS) Flash SSD Storage Devices, arXiv preprint arXiv:2206.01547, 2022.
    [15] Stavrinos, Theano; Berger, Daniel S.; Katz-Bassett, Ethan; Lloyd, Wyatt;, "Don't Be a Blockhead: Zoned Namespaces Make Work on Conventional SSDs Obsolete," in Proc. of the Workshop on Hot Topics in Operating Systems, Ann Arbor, MI, USA, June 2021, pp. 144-151.
    [16] W. D. Corporation, "Zoned Storage," [Online]. Available: https://zonedstorage.io/. [Accessed 15 July 2024].
    [17] N. Express®, "NVM Command Set Specification Revision 1.0c," 2022. [Online]. Available: https://nvmexpress.org/. [Accessed 15 July 2024].
    [18] N. Express®, "Zoned Namespace Command Set Specification Revision 1.1c," 2022. [Online]. Available: https://nvmexpress.org/. [Accessed 15 July 2024].
    [19] M. Bjørling, "Zone Append: A New Way of Writing to Zoned Storage," in Proc. Linux Storage Filesyst. Conf. (Vault), Santa Clara, CA, USA, February 2020.
    [20] Z. Yang, J. R. Harris, B. Walker, D. Verkamp, C. Liu, C. Chang, G. Cao, J. Stern, V. Verma and L. E. Paul, "SPDK: A Development Kit to Build High Performance Storage Applications," IEEE International Conference on Cloud Computing Technology and Science (CloudCom), pp. 154-161, December 2017, doi: 10.1109/CloudCom.2017.14.
    [21] Z. Cao, S. Dong, S. Vemuri and D. H. Du, "Characterizing, modeling, and benchmarking RocksDB key-value workloads at Facebook," in Proc. USENIX FAST, Santa Clara, CA, 2020, pp. 209-223.
    [22] S. Dong, A. Kryczka, Y. Jin and M. Stumm, "RocksDB: Evolution of development priorities in a key-value store serving large-scale applications," ACM Trans. Storage, vol. 17, no. 4, pp. 1-32, Oct. 2021, doi: 10.1145/3483840..
    [23] D. R. Purandare, P. Wilcox, H. Litz and S. Finkelstein, "Append is Near: Log-based Data Management on ZNS SSDs," in Conference on Innovative Data Systems Research, Chaminade, CA, January 2022.
    [24] L. Long, S. He, J. Shen, R. Liu, Z. Tan, C. Gao, D. Liu, K. Zhong and Y. Jiang, "WA-Zone: Wear-Aware Zone Management Optimization for LSM-Tree on ZNS SSDs," ACM Transactions on Architecture and Code Optimization, vol. 21, no. 1, pp. 1-23, January 2024, doi:10.1145/3637488.
    [25] H. Kim, J.-H. Park, S. H. Jung and S.-W. Lee, "Optimizing RocksDB for Better Read Throughput in Blockchain Systems," 23rd International Computer Science and Engineering Conference (ICSEC), pp. 305-309, Phuket, Thailand, October/November 2019, doi: 10.1109/ICSEC47112.2019.8974829.
    [26] B. Liu, Y. Xia, X. Wei and W. Tong, "LifetimeKV: Narrowing the Lifetime Gap of SSTs in LSMT-based KV Stores for ZNS SSDs," IEEE 41st International Conference on Computer Design (ICCD), pp. 300-307, Washington, DC, USA, November 2023, doi: 10.1109/ICCD58817.2023.00053.
    [27] M. Lu, P. Jin, X. Wang, Y. Luo and K. Guo, "ZoneKV: A Space-Efficient Key-Value Store for ZNS SSDs," 60th ACM/IEEE Design Automation Conference (DAC), pp. 1-6, San Francisco, CA, USA, July 2023, doi: 10.1109/DAC56929.2023.10247926.
    [28] Y. Xu, P. Jin, M. Lu and X. Wang, "LeanKV: Efficient Garbage Collection for LSM-Based Key-Value Stores on ZNS SSDs through Lifetime-Based SSTable Clustering," IEEE 29th International Conference on Parallel and Distributed Systems (ICPADS), pp. 1895-1902, Ocean Flower Island, China, December 2023, doi: 10.1109/ICPADS60453.2023.00260.
    [29] M. Oh, S. Yoo, J. Choi, J. Park and C.-E. Choi, "ZenFS+: Nurturing Performance and Isolation to ZenFS," IEEE Access, vol. 11, pp. 26344 - 26357, March 2023, doi: 10.1109/ACCESS.2023.3257354.
    [30] F. Bellard, "QEMU," Software Freedom Conservancy, [Online]. Available: https://www.qemu.org/. [Accessed 15 July 2024].
    [31] Meta, "Benchmarking tools - db_bench," [Online]. Available: https://github.com/facebook/rocksdb/wiki/Benchmarking-tools#db_bench. [Accessed 15 July 2024].

    下載圖示
    2026-08-21公開
    QR CODE