摘要
主存键值(key-value,KV)数据库具有高效性、易用性和可扩展性。由于主存容量有限,一些数据量较大的应用必须使用磁盘进行数据交换。而固态硬盘(solid state disk,SSD)有高速的随机读特点,使用固态硬盘作为主存KV数据库的虚拟内存会提高对不在主存中的数据的读性能。但是固态硬盘的随机写性能较差,于是提出了针对固态硬盘的写缓冲区优化算法,将多个随机写转化为一个连续写,并设计了固态硬盘虚拟内存的垃圾回收机制,将多个随机写转化为一个连续读和一个连续写,从而提高主存KV数据库的性能。通过改写源代码,将该虚拟内存管理应用于Redis中,并进行了实验测试,结果表明该虚拟内存管理的性能比原有性能最大提升了40%。
Key-value in-memory databases have the characteristics of efficiency, usability and scalability. Because of the limits of the capacity of main memory, the applications dealing with large amount of data have to swap data between main memory and disks. While solid state disks (SSDs) have the high performance of random reads as a new storage medium, they can speed up random reads on virtual memory. To remedy the lower performance of random writes on SSDs, this paper proposes an optimization method of write buffer of SSD, which transforms several random writes to a sequential write, and designs a garbage collection policy of SSD, which transforms several random writes to a sequential read and a sequential write, to improve the spatial utilization of key-value in-memory database. Finally, an SSD-based virtual memory implementation is proposed to realize high performance of key-value main memory databases, and the improvement which is at most 40%, is confirmed by changing the source code of Redis in experiment.
出处
《计算机科学与探索》
CSCD
2011年第8期686-694,共9页
Journal of Frontiers of Computer Science and Technology
基金
国家自然科学基金No.60833005
91024032
61070055
国家科技重大专项"核高基"项目No.2010ZX01042-002-003
中国人民大学科学研究基金No.10XNI018~~
关键词
键值
固态硬盘
虚拟内存
缓冲区
key-value
solid state disk (SSD)
virtual memory
buffer