A significant impediment to high performance in key-value stores is the high cost of thread switching or stalls. While there are many sources for this, a major one is the contention for resources. And this cost increases with load as conflicting operations more frequently try to access data concurrently. Traditional latch-based approaches usually handle these situations by blocking one or more contending threads. Latch-free techniques can avoid this behavior. But the payoff may be limited if latch-free techniques require executing wasted work. In this paper, we show how latch-free techniques exploit delta record updating and can significantly reduce wasted work by using notices, a new latch-free approach. This paper explains how notices work and can solve B-tree index maintenance problems, while avoiding thread switches or stalls. Other opportunities for avoiding thread switches or stalls are also discussed.
翻译:键值存储实现高性能的一个主要障碍在于线程切换或停滞的高昂开销。尽管存在多种原因,资源争用是其中关键因素之一。随着负载增加,冲突操作更频繁地尝试并发访问数据,这种开销会进一步加剧。传统的基于锁存器的方法通常通过阻塞一个或多个竞争线程来处理这些情况。无锁技术可以避免这种行为。但如果无锁技术需要执行无效工作,其收益可能有限。本文展示了无锁技术如何利用增量记录更新,并通过采用"通知"这一新型无锁方法显著减少无效工作。本文阐释了通知机制的工作原理及其在避免线程切换或停滞的同时解决B树索引维护问题的能力。文中还探讨了避免线程切换或停滞的其他潜在途径。