skip to main content
research-article

Sorting on Byte-Addressable Storage: The Resurgence of Tree Structure

Published: 03 May 2024 Publication History

Abstract

The tree structure is notably popular for storage and indexing; however, tree-based sorting such as tree sort is rarely used in practice. Nevertheless, with the advent of byte-addressable storage (BAS), the tree structure captures our attention with its write-once property. This property aligns well with BAS's asymmetric read-write characteristics. In this paper, we seek to answer the question: Can tree-based sorting algorithms outperform existing algorithms in the hybrid DRAM-BAS system? To address this, first, we conduct a comprehensive study to assess the compatibility of existing sorting algorithms with such hybrid memory systems and explore the challenges. We then delve into various design dimensions of tree-sort algorithms which leads to an optimized variant, TSort. Finally, a comparative analysis is conducted among three different sets of sorting algorithms, including in-place sorts, external sorts, and tree-based sorts. The results indicate that TSort not only challenges the traditional negative perceptions of the tree structure in sorting but also exhibits excellent performance. It outperforms all other counterparts across diverse datasets, whether uniformly distributed or skewed, in most cases.

References

[1]
2022. Samsung Shows Off CXL Server Memory Expander. https://www.nextplatform.com/2022/08/23/samsung-shows-off-cxl-server-memory-expander/ [Last accessed on June 24, 2023].
[2]
2023. Sort Benchmark. http://sortbenchmark.org/ [Last accessed on June 24, 2023].
[3]
Diego Arroyuelo, Aidan Hogan, Gonzalo Navarro, Juan L. Reutter, Javiel Rojas-Ledesma, and Adrián Soto. 2021. Worst-Case Optimal Graph Joins in Almost No Space. In Proceedings of the 2021 International Conference on Management of Data. 102--114.
[4]
Michael Axtmann, Sascha Witt, Daniel Ferizovic, and Peter Sanders. 2017. InPlace Parallel Super Scalar Samplesort (IPSSSSo). In 25th Annual European Symposium on Algorithms, Vol. 87. 9:1--9:14.
[5]
Michael Axtmann, Sascha Witt, Daniel Ferizovic, and Peter Sanders. 2022. Engineering In-Place (Shared-Memory) Sorting Algorithms. ACM Trans. Parallel Comput. 9, 1, Article 2 (2022), 62 pages.
[6]
Vinay Banakar, Kan Wu, Yuvraj Patel, Kimberly Keeton, Andrea C. Arpaci-Dusseau, and Remzi H. Arpaci-Dusseau. 2023. WiscSort: External Sorting for Byte-Addressable Storage. In Proceedings of the VLDB Endowment, Vol. 16. 2103--2116.
[7]
Rudolf Bayer and Edward M. McCreight. 1972. Organization and Maintenance of Large Ordered Indices. Acta Informatica 1 (1972), 173--189.
[8]
E. Chen, D. Lottis, A. Driskill-Smith, D. Druist, V. Nikitin, S. Watts, X. Tang, and D. Apalkov. 2010. Non-volatile spin-transfer torque RAM (STT-RAM). In 68th Device Research Conference. 249--252.
[9]
Hao Chen, Chaoyi Ruan, Cheng Li, Xiaosong Ma, and Yinlong Xu. 2021. SpanDB: A Fast, Cost-Effective LSM-tree Based KV Store on Hybrid Storage. In 19th USENIX Conference on File and Storage Technologies. 17--32.
[10]
Li Chen, Rupesh Choubey, and Elke A Rundensteiner. 2002. Merging R-trees: Efficient strategies for local bulk insertion. GeoInformatica 6 (2002), 7--34.
[11]
Zhaole Chu, Yongping Luo, Peiquan Jin, and Shouhong Wan. 2021. NVMSorting: Efficient Sorting on Non-Volatile Memory. In The 33rd International Conference on Software Engineering & Knowledge Engineering.
[12]
Björn Daase, Lars Jonas Bollmeier, Lawrence Benson, and Tilmann Rabl. 2021. Maximizing Persistent Memory Bandwidth Utilization for OLAP Workloads. In Proceedings of the 2021 International Conference on Management of Data. Virtual Event China, 339--351.
[13]
David J. DeWitt, Jeffrey F. Naughton, and Donovan A. Schneider. 1991. Parallel Sorting on a Shared-Nothing Architecture using Probabilistic Splitting. In Proceedings of the First International Conference on Parallel and Distributed Information Systems. 280--291.
[14]
Sahin Cem Geyik, Stuart Ambler, and Krishnaram Kenthapadi. 2019. Fairness-Aware Ranking in Search & Recommendation Systems with Application to LinkedIn Talent Search. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining. 2221--2231.
[15]
Frank T. Hady, Annie Foong, Bryan Veal, and Dan Williams. 2017. Platform Storage Performance With 3D XPoint Technology. Proc. IEEE 105, 9 (2017), 1822--1833.
[16]
Yifan Hua, Kaixin Huang, Shengan Zheng, and Linpeng Huang. 2021. PMSort: An adaptive sorting engine for persistent memory. Journal of Systems Architecture 120 (2021).
[17]
Kaixin Huang, Yijie Mei, and Linpeng Huang. 2020. Quail: Using NVM write monitor to enable transparent wear-leveling. Journal of Systems Architecture 102 (2020), 101658.
[18]
Wentao Huang, Yunhong Ji, Xuan Zhou, Bingsheng He, and Kian-Lee Tan. 2023. A Design Space Exploration and Evaluation for Main-Memory Hash Joins in Storage Class Memory. In Proceedings of the VLDB Endowment, Vol. 16. 1249--1263.
[19]
Intel. 2023. Persistent memory development kit. (2023). https://pmem.io/pmdk/ [Last accessed on June 24, 2023].
[20]
Joseph Izraelevitz, Jian Yang, Lu Zhang, Juno Kim, Xiao Liu, Amirsaman Memaripour, Yun Joon Soh, Zixuan Wang, Yi Xu, Subramanya R Dulloor, et al. 2019. Basic performance measurements of the intel optane DC persistent memory module. arXiv preprint arXiv:1903.05714 (2019).
[21]
Raj Jain. 1991. The art of computer systems performance analysis: techniques for experimental design, measurement, simulation, and modeling. Vol. 1.
[22]
Saeed Kargar and Faisal Nawab. 2023. Hamming Tree: The Case for Energy-Aware Indexing for NVMs. Proceedings of the 2023 international conference on Management of data 1, 2, Article 182, 27 pages.
[23]
Krishna M Kavi, Ben Lee, and Ali R Hirson. 1998. Multithreaded systems. In Advances in Computers. Vol. 46. 287--328.
[24]
Mohammed Bey Ahmed Khernache, Arezki Laga, and Jalil Boukhobza. 2018. MONTRES-NVM: An external sorting algorithm for hybrid memory. In 2018 IEEE 7th Non-Volatile Memory Systems and Applications Symposium (NVMSA). 49--54.
[25]
Donald E Knuth. 1998. The art of computer programming, Volume 3: Sorting and Searching. Addison-Westley (1998).
[26]
Dimitrios Koutsoukos, Raghav Bhartia, Michal Friedman, Ana Klimovic, and Gustavo Alonso. 2023. NVM: Is it Not Very Meaningful for Databases?. In Proceedings of the VLDB Endowment, Vol. 16. 2444--2457.
[27]
Arezki Laga, Jalil Boukhobza, Frank Singhoff, and Michel Koskas. 2017. Montres: merge on-the-run external sorting algorithm for large data volumes on ssd based storage systems. IEEE Trans. Comput. 66, 10 (2017), 1689--1702.
[28]
Jing Li, Hung-Wei Tseng, Chunbin Lin, Yannis Papakonstantinou, and Steven Swanson. 2016. HippogriffDB: Balancing I/O and GPU Bandwidth in Big Data Analytics. Proceedings of the VLDB Endowment 9, 14, 1647--1658.
[29]
Yong Li, Lingfang Zeng, Guang Chen, Chunhua Gu, Fei Luo, Weichao Ding, Zhan Shi, and Joel Fuentes. 2022. A Multi-hashing Index for hybrid DRAM-NVM memory systems. Journal of Systems Architecture 128 (2022), 102547.
[30]
Yu-Pei Liang, Tseng-Yi Chen, Yuan-Hao Chang, Shuo-Han Chen, Hsin-Wen Wei, and Wei-Kuan Shih. 2020. B*-Sort: Enabling write-once sorting for nonvolatile memory. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems 39, 12 (2020), 4549--4562.
[31]
Xuchuan Luo, Pengfei Zuo, Jiacheng Shen, Jiazhen Gu, Xin Wang, Michael R. Lyu, and Yangfan Zhou. 2023. SMART: A High-Performance Adaptive Radix Tree for Disaggregated Memory. In 17th USENIX Symposium on Operating Systems Design and Implementation (OSDI 23). 553--571.
[32]
Yongping Luo, Zhaole Chu, Peiquan Jin, and Shouhong Wan. 2020. Efficient sorting and join on NVM-based hybrid memory. In International Conference on Algorithms and Architectures for Parallel Processing. 15--30.
[33]
Yongping Luo, Peiquan Jin, Qinglin Zhang, and Bin Cheng. 2021. TLBtree: A Read/Write-Optimized Tree Index for Non-Volatile Memory. In 2021 IEEE 37th International Conference on Data Engineering (ICDE). 1889--1894.
[34]
Yannis Manolopoulos, Yannis Theodoridis, and Vassilis J Tsotras. 2000. Parallel External Sorting. Advanced Database Indexing (2000), 209--218.
[35]
W. A. Martin and D. N. Ness. 1972. Optimizing Binary Trees Grown with a Sorting Algorithm. Commun. ACM 15, 2 (1972), 88--93.
[36]
Keith McLuckie and Angus Barber. 1986. Binary Tree Sort. Sorting Routines for Microcomputers (1986), 58--67.
[37]
Jinyoung Oh and Youngjin Kwon. 2021. Persistent memory aware performance isolation with dicio. In Proceedings of the 12th ACM SIGOPS Asia-Pacific Workshop on Systems. 97--105.
[38]
Evaggelia Pitoura, Kostas Stefanidis, and Georgia Koutrika. 2022. Fairness in rankings and recommendations: an overview. The VLDB Journal 31 (2022), 431--458.
[39]
K. Pollari-Malmi, E. Soisalon-Soininen, and T. Ylonen. 1996. Concurrency control in B-trees with batch updates. IEEE Transactions on Knowledge and Data Engineering 8, 6 (1996), 975--984.
[40]
Yifan Qiao, Xubin Chen, Ning Zheng, Jiangpeng Li, Yang Liu, and Tong Zhang. 2022. Closing the B+-tree vs. LSM-tree Write Amplification Gap on Modern Storage Hardware with Built-in Transparent Compression. In 20th USENIX Conference on File and Storage Technologies. 69--82.
[41]
Mark Raasveldt and Hannes Mühleisen. 2019. DuckDB: an Embeddable Analytical Database. In Proceedings of the 2019 International Conference on Management of Data. 1981--1984.
[42]
Stratis D Viglas. 2014. Write-limited sorts and joins for persistent memory. Proceedings of the VLDB Endowment 7, 5 (2014), 413--424.
[43]
Ke Wang, Guanqun Yang, Yiwei Li, Huanchen Zhang, and Mingyu Gao. 2023. When Tree Meets Hash: Reducing Random Reads for Index Structures on Persistent Memories. Proceedings of the 2023 international conference on Management of data 1, 1, Article 105, 26 pages.
[44]
Zixuan Wang, Xiao Liu, Jian Yang, Theodore Michailidis, Steven Swanson, and Jishen Zhao. 2020. Characterizing and modeling non-volatile memory systems. In 2020 53rd Annual IEEE/ACM International Symposium on Microarchitecture (MICRO). 496--508.
[45]
Cathrin Weiss, Panagiotis Karras, and Abraham Bernstein. 2008. Hexastore: sextuple indexing for semantic web data management. In Proceedings of the VLDB Endowment, Vol. 1. 1008--1019.
[46]
H.-S. Philip Wong, Simone Raoux, SangBum Kim, Jiale Liang, John P. Reifenberg, Bipin Rajendran, Mehdi Asheghi, and Kenneth E. Goodson. 2010. Phase Change Memory. Proc. IEEE 98, 12 (2010), 2201--2227.
[47]
Fei Xia, Dejun Jiang, Jin Xiong, and Ninghui Sun. 2017. HiKV: A Hybrid Index Key-Value Store for DRAM-NVM Memory Systems. In USENIX Annual Technical Conference. 349--362.
[48]
Minhui Xie, Youyou Lu, Qing Wang, Yangyang Feng, Jiaqiang Liu, Kai Ren, and Jiwu Shu. 2023. PetPS: Supporting Huge Embedding Models with Persistent Memory. In Proceedings of the VLDB Endowment, Vol. 16. 1013--1022.
[49]
Jian Yang, Juno Kim, Morteza Hoseinzadeh, Joseph Izraelevitz, and Steve Swanson. 2020. An empirical guide to the behavior and use of scalable persistent memory. In 18th USENIX Conference on File and Storage Technologies. 169--182.
[50]
Geoffrey X. Yu, Markos Markakis, Andreas Kipf, Per-Åke Larson, Umar Farooq Minhas, and Tim Kraska. 2022. TreeLine: An Update-in-Place Key-Value Store for Modern Storage. Proceedings of the VLDB Endowment 16, 1, 99--112.
[51]
Furqan Zahoor, Tun Zainal Azni Zulkifli, and Farooq Ahmad Khanday. 2020. Resistive Random Access Memory (RRAM): an Overview of Materials, Switching Mechanism, Performance, Multilevel Cell (mlc) Storage, Modeling, and Applications. Nanoscale Research Letters 15, 1 (2020), 90.
[52]
Bowen Zhang, Shengan Zheng, Zhenlin Qi, and Linpeng Huang. 2022. NBTree: A Lock-Free PM-Friendly Persistent B+-Tree for EADR-Enabled PM Systems. Proceedings of the VLDB Endowment 15, 6, 1187--1200.
[53]
Chun Zhang, Jeffrey Naughton, David DeWitt, Qiong Luo, and Guy Lohman. 2001. On supporting containment queries in relational database management systems. In Proceedings of the 2001 international conference on Management of data. 425--436.
[54]
Diyu Zhou, Yuchen Qian, Vishal Gupta, Zhifei Yang, Changwoo Min, and Sanidhya Kashyap. 2022. ODINFS: Scaling PM Performance with Opportunistic Delegation. In 16th USENIX Symposium on Operating Systems Design and Implementation (OSDI). 179--193.

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Proceedings of the VLDB Endowment
Proceedings of the VLDB Endowment  Volume 17, Issue 6
February 2024
369 pages
Issue’s Table of Contents

Publisher

VLDB Endowment

Publication History

Published: 03 May 2024
Published in PVLDB Volume 17, Issue 6

Check for updates

Badges

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 94
    Total Downloads
  • Downloads (Last 12 months)94
  • Downloads (Last 6 weeks)13
Reflects downloads up to 15 Jan 2025

Other Metrics

Citations

View Options

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media