This paper presents DLHT, a concurrent in-memory hashtable. Despite efforts to optimize hashtables, that go as far as sacrificing core functionality, state-of-the-art designs still incur multiple memory accesses per request and block request processing in three cases. First, most hashtables block while waiting for data to be retrieved from memory. Second, open-addressing designs, which represent the current state-of-the-art, either cannot free index slots on deletes or must block all requests to do so. Third, index resizes block every request until all objects are copied to the new index. Defying folklore wisdom, DLHT forgoes open-addressing and adopts a fully-featured and memory-aware closed-addressing design based on bounded cache-line-chaining. This design offers lock-free index operations and deletes that free slots instantly, (2) completes most requests with a single memory access, (3) utilizes software prefetching to hide memory latencies, and (4) employs a novel non-blocking and parallel resizing. In a commodity server and a memory-resident workload, DLHT surpasses 1.6B requests per second and provides 3.5x (12x) the throughput of the state-of-the-art closed-addressing (open-addressing) resizable hashtable on Gets (Deletes).
翻译:本文提出了DLHT,一种并发内存哈希表。尽管已有研究对哈希表进行了优化,甚至不惜牺牲核心功能,但最先进的设计仍存在每次请求需要多次内存访问,并在三种情况下阻塞请求处理的问题。首先,大多数哈希表在等待从内存检索数据时会阻塞。其次,代表当前最先进技术的开放寻址设计要么无法在删除时释放索引槽,要么必须阻塞所有请求才能实现。第三,索引调整大小会阻塞所有请求,直到所有对象都被复制到新索引中。DLHT打破了传统认知,放弃了开放寻址,采用了一种功能完备且具有内存感知能力的封闭寻址设计,该设计基于有界缓存行链式结构。这种设计实现了(1)无锁索引操作和可即时释放槽位的删除,(2)大多数请求仅需单次内存访问即可完成,(3)利用软件预取隐藏内存延迟,以及(4)采用了一种新颖的非阻塞并行调整大小机制。在商用服务器和内存驻留工作负载下,DLHT每秒处理请求数超过16亿,在读取(删除)操作上,其吞吐量分别达到最先进的可调整大小封闭寻址(开放寻址)哈希表的3.5倍(12倍)。