We explore the design of scalable synchronization primitives for disaggregated shared memory. Porting existing synchronization primitives to disaggregated shared memory results in poor scalability with the number of application threads because they layer synchronization primitives atop cache-coherence substrates, which engenders redundant inter-core communications. Substantially higher cache-coherence latency ($\mu$s) with substantially lower bandwidths in state-of-the-art disaggregated shared memory designs amplifies the impact of such redundant communications and precludes scalability. In this work, we argue for a co-design for the cache-coherence and synchronization layers for better performance scaling of multi-threaded applications on disaggregated memory. This is driven by our observation that synchronization primitives are essentially a generalization of cache-coherence protocols in time and space. We present GCS as an implementation of this co-design. GCS employs wait queues and arbitrarily-sized cache lines directly at the cache-coherence protocol layer for temporal and spatial generalization. We evaluate GCS against the layered approach for synchronization primitives: the pthread implementation of reader-writer lock, and show that GCS improves in-memory key-value store performance at scale by 1 - 2 orders of magnitude.
翻译:我们探索了针对解聚合共享内存的可扩展同步原语设计。将现有同步原语移植到解聚合共享内存会导致其与应用程序线程数量的可扩展性较差,原因在于这些同步原语被构建在缓存一致性协议之上,从而引发了冗余的核间通信。在现有最优解聚合共享内存设计中,缓存一致性延迟显著增加(微秒级)且带宽显著降低,这放大了此类冗余通信的影响,阻碍了可扩展性。本工作中,我们主张通过缓存一致性与同步层的协同设计,以提升多线程应用程序在解聚合内存上的性能可扩展性。这一观点源于我们的观察:同步原语本质上是缓存一致性协议在时间与空间维度上的泛化。我们提出GCS作为该协同设计的实现方案。GCS直接在缓存一致性协议层引入等待队列与任意大小的缓存行,以实现时间与空间维度的泛化。我们将GCS与采用分层方法的同步原语(pthread实现的读写锁)进行对比评估,结果表明GCS可将大规模内存键值存储的性能提升1-2个数量级。