计算机科学 ›› 2026, Vol. 53 ›› Issue (6): 203-213.doi: 10.11896/jsjkx.251000115
刘中一1,2,3, 肖巍1, 张磊1,2, 阎松柏1,2, 黄向平1,3, 李梦箫1,3
LIU Zhongyi1,2,3, XIAO Wei1, ZHANG Lei1,2, YAN Songbai1,2, HUANG Xiangping1,3, LI Mengxiao1,3
摘要: 分布式系统在高性能场景下的应用日趋广泛,但其依赖的传统缓存框架面临复杂对象传输开销大、跨节点同步延迟高、数据存取效率不足等瓶颈。为此,提出一种高性能集群缓存框架 MMCache,核心创新包括:基于内存映射镜像的数据传输读写机制,通过虚拟地址固化实现跨进程零拷贝访问与结构级高效读取;使用冷却池驱动的缓存单元无锁更新机制,在不阻塞业务访问的前提下实现运行时状态的原子可见性与快速回收;面向内存地址空间的泛型分配管理框架,融合 TCMalloc 与泛型适配器以实现镜像内存的高效分配、回收与碎片抑制。测试结果表明,在300万key的多场景负载下,MMCache冷却池占比可控,事务成功率保持在99%以上且响应时间稳定;相比Redis和Memcached,在高频读写、复杂对象存储及集群同步性能方面均表现出显著优势。该技术已在民航运价交易后台系统中应用,展现了高性能、低延迟、强一致性等特性,并在电子商务、大数据处理等高性能数据处理场景中具有广阔的推广价值。
中图分类号:
| [1]CARLSON J.Redis in Action [M].New York:Simon & Schus-ter,2013:126-134. [2]FITZPATRICK B.Distributed caching with Memcached [J].Linux Journal,2004,2004(124):5. [3]CHENG W,REN F,JIANG W,et al.Modeling and Analyzing Latency in the Memcached System [C]//Proceedings of 2017 IEEE 37th International Conference on Distributed Computing Systems(ICDCS).IEEE,2017:538-548. [4]CHIDAMBARAM V,RAMAMURTHI D.Performance analysis of Memcached [EB/OL].http://citeseerx.ist.psu.edu/viewdoc/download. [5]MERTZ J,NUNES I,DELLA TOFFOLA L,et al.Satisfying increasing performance requirements with caching at the application level [J].IEEE Software,2020,38(3):87-95. [6]MERTZ J,NUNES I.A Qualitative Study of Application-Level Caching [J].IEEE Transactions on Software Engineering,2017,43(9):798-816. [7]MARATHE V J,SELTZER M,BYAN S,et al.PersistentMemcached:Bringing Legacy Code to Byte-Addressable PersistentMemory [C]//Proceedings of the 9th USENIX Workshop on Hot Topics in Storage and File Systems(HotStorage'17).USENIX Association,2017. [8]QIX C,HU H Q,WEI X,et al.High Performance Design for Redis with Fast Event-Driven RDMA RPCs [C]//Proceedings of the 25th International Conference on Database Systems for Advanced Applications(DASFAA 2020)Springer,2020:195-210. [9]COSTA A J C.FLEEC:A Fast and Lock-Free ApplicationalCache [D].Lisboa:Universidade NOVA de Lisboa(Portugal),2023. [10]COTRONEO D,NATELLA R,ROSIELLO S.Dependabilityevaluation of middleware technology for large-scale distributed caching [C]//2020 IEEE 31st International Symposium on Software Reliability Engineering(ISSRE).IEEE,2020:218-228. [11]OLSON M A,BOSTIC K,SELTZER M I.Berkeley DB [C]//Proceedings of the USENIX Annual Technical Conference,FREENIX Track.USENIX Association,1999:183-191. [12]HENRY G.Howard Chu on Lightning Memory-Mapped Database [J].IEEE Software,2019,36(6):83-87. [13]WRIGHT C P,SPILLANE R,SIVATHANU G,et al.Exten-ding ACID semantics to the file system [J].ACM Transactions on Storage,2007,3(2):4-es. [14]HUANG X P,PENG M T,YANG Y K.High performance inventory caching system based on memory-mapping files [J].Application of Electronic Technique,2020,46(7):113-117,126. [15]LIANG H F,YANG Y,LIU Z Y.MMDB:A complex object-oriented high-performance database based on memory mapping [J].Computer Engineering & Design,2023,44(3):937-944. [16]CUI Y L,PI D C.SQLmmdb:An Embedded Main Memory Database Management System [J].Information Technology Journal,2007,6(6):872-878. [17]FAERBER F,KEMPER A,LARSON P A,et al.Main Memory Database Systems [J].Foundations and Trends in Databases,2017,8(1/2):1-130. [18]HUANG X P,PENG M T,YANG Y K.Fast Reading Method of Complex Objects Based on Memory-Mapped Files [J].Computer Technology and Development,2020,30(3):82-87. [19]LIANG H F,LIU Z Y,YANG Y.Architecture and Key Technologies of High-Performance Airfare Price and Shop System [J/OL].https://kns.cnki.net/kcms/detail/31.1260.tp.20240703.1142.002.html. [20]YANG Y K,PENG M T,WANG W D.Design of Efficient and Reliable Data File Distribution Solution in Cluster [J].Compu-ter Technology and Development,2019,29(11):163-167. [21]LIU Z Y,LI M X,LIN C,et al.Zynco:A distributed service framework supporting runtime state collaborative evolution [J/OL].https://link.cnki.net/urlid/51.1307.TP.20250925.1513.036. [22]GHEMAWAT S,MENAGE P.Tcmalloc:Thread-Caching Malloc [EB/OL].(2009-01-01)[2018-06-14].http://goog-perftools.sourceforge.net/doc/tcmalloc.html. |
|
||