Journal of Computer Applications ›› 2015, Vol. 35 ›› Issue (1): 99-102.DOI: 10.11772/j.issn.1001-9081.2015.01.0099

Previous Articles     Next Articles

KStore: Linux kernel-based Key-Value store system

XIE Peidong1,2, WU Yanjun1,3   

  1. 1. National Engineering Research Center of Fundamental Software, Institute of Software, Chinese Academy of Sciences, Beijing 100190, China;
    2. University of Chinese Academy of Sciences, Beijing 100190, China;
    3. State Key Laboratory of Computer Science, Institute of Software, Chinese Academy of Sciences, Beijing 100190, China
  • Received:2014-07-16 Revised:2014-08-04 Online:2015-01-01 Published:2015-01-26

基于Linux内核的Key-Value存储系统——KStore

谢沛东1,2, 武延军1,3   

  1. 1. 中国科学院软件研究所 基础软件国家工程研究中心, 北京100190;
    2. 中国科学院大学, 北京100190;
    3. 中国科学院软件研究所 计算机科学国家重点实验室, 北京100190
  • 通讯作者: 谢沛东
  • 作者简介:谢沛东(1988-),男,山东菏泽人,硕士研究生,主要研究方向:分布式存储系统、操作系统;武延军(1979-),男,陕西延安人,高级工程师,博士生导师,主要研究方向:云计算、操作系统.
  • 基金资助:

    中国科学院战略性科技先导专项(XDA06010600);核高基重大专项(2012ZX01039-004).

Abstract:

Nowadays Key-Value store system is widely used in various Internet services. However, the existing Key-Value store systems, mostly run in user-mode, can not meet the demands of high-concurrency and low-latency. It is mainly because user-mode usually provides inefficient access interfaces and transaction processing due to mode switch or context switch. To solve these problems, an in-kernel implementation of Key-Value store system, called KStore, was proposed in this paper. It had an in-kernel index and an in-kernel memory allocator, which were used to manage Key-Value data efficiently. To guarantee the low-latency response, KStore provided a remote interface based on in-kernel Socket, and a local interface based on file system. In addition, KStore processed concurrent requests with a novel mechanism based on in-kernel multi-thread. The experimental results show that KStore gains a remarkable advantage over Memcached in the characteristics of real-time and concurrency.

Key words: Key-Value store system, Linux kernel, file system, kernel Socket, kernel thread, Slab memory allocation

摘要:

Key-Value存储系统在各种互联网服务中被广泛使用,但现有的Key-Value存储系统通常在用户态空间设计和实现,因为频繁的模式切换和上下文切换,导致访问接口、事务处理效率不高,在高并发、低延迟的数据存储需求中尤为突出.针对该问题,给出了一个内核态Key-Value存储系统的实现——KStore:提供内核空间的索引和内存分配机制,并在此基础上,通过基于内核Socket的远程接口以及基于文件系统的本地接口,保证了KStore的低延迟;同时,通过基于内核多线程的并发处理机制,保证了KStore的并发性.实验结果表明,与Memcached相比,KStore在实时性和并发性方面都取得显著优势.

关键词: Key-Value存储系统, Linux内核, 文件系统, 内核Socket, 内核线程, Slab内存分配

CLC Number: