{'fraction_non_alphanumeric': 0.029736618521665252, 'fraction_numerical': 0.004248088360237893, 'mean_word_length': 5.135416666666667, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
NVHT: An Efficient Key-Value Storage Library for Non-Volatile Memory

Modern Non-Volatile Memory (NVM) promises persistence, byte-addressability and DRAM-like read and write latency, which offers great opportunities for big data storage architecture. These excellent properties indicate that NVM has the potential to be incorporated with key-value stores to achieve high performance and durability simultaneously. In this paper, we propose an efficient key-value storage library named NVHT for NVM. NVHT provides APIs to facilitate the development of NVM-based key-value stores where data can be stored and processed in NVM inherently. The core structure of NVHT is a hash table with NVM-optimized metadata design. In NVHT, we introduce non-volatile pointer to solve the dynamic address mapping problem and develop a simple yet efficient memory allocator called pointer-free buddy allocator. NVHT guarantees consistency using a log-based mechanism. The experimental results show that NVHT achieves 1.3x-4x speedup for insert operation and 4x-5x speedup for search operation, compared with two advanced key-value stores, LevelDB and BerkeleyDB running on DRAM-based file system.