使用具有监视和恢复的较弱一致性模型来提高键值存储的性能
Using Weaker Consistency Models with Monitoring and Recovery for Improving Performance of Key-Value Stores
摘要:
大多数键值存储提供的一致性属性可以分为顺序一致性和最终一致性。前者更容易编程,但性能较低,而后者在提供更高性能的同时存在潜在的异常。我们专注于设计师应该做什么的问题,如果他/她有一个算法,正确的顺序一致性,但面临着一个底层的键值存储,提供了一个较弱的一致性。我们提出了一种基于检测回滚的方法:设计者确定一个正确性谓词,说$P$,并继续运行协议,因为我们的系统监视器$P$。如果违反了$P$(由于一致性较弱),系统将回滚并在$P$成立的状态下继续计算。我们评估这种方法与基于图的应用程序上运行的伏地魔键值存储。我们在Amazon AWS EC2实例上进行的部署实验表明,与顺序一致性相比,使用带有监控的最终一致性可以提供$50\%$ -- $80\%$吞吐量的增加。我们还观察到监控本身的开销很低(通常小于$4\%$),并且检测违规的延迟很小。特别是,在故意造成大量违规的情况下,在区域网络中不到50毫秒就检测到超过$99.9\%$的违规行为,在全球网络中不到3秒。我们发现,对于某些应用程序,频繁的回滚可以导致程序使用最终一致性有效地\textit{stall}。我们提出了替代机制来处理重复发生的回滚。总体而言,本文中考虑的应用程序,我们发现,即使回滚,最终的一致性提供了更好的性能比使用顺序一致性。
英文摘要:
Consistency properties provided by most key-value stores can be classified into sequential consistency and eventual consistency. The former is easier to program with but suffers from lower performance whereas the latter suffers from potential anomalies while providing higher performance. We focus on the problem of what a designer should do if he/she has an algorithm that works correctly with sequential consistency but is faced with an underlying key-value store that provides a weaker consistency. We propose a detect-rollback based approach: The designer identifies a correctness predicate, say $P$, and continues to run the protocol, as our system monitors $P$. If $P$ is violated (because of weaker consistency), the system rolls back and resumes the computation at a state where $P$ holds. We evaluate this approach with graph-based applications running on the Voldemort key-value store. Our experiments with deployment on Amazon AWS EC2 instances shows that using eventual consistency with monitoring can provide a $50\%$ -- $80\%$ increase in throughput when compared with sequential consistency. We also observe that the overhead of the monitoring itself was low (typically less than $4\%$) and the latency of detecting violations was small. In particular, in a scenario designed to intentionally cause a large number of violations, more than $99.9\%$ of violations were detected in less than 50 milliseconds in regional networks, and in less than 3 seconds in global networks. We find that for some applications, frequent rollback can cause the program using eventual consistency to effectively \textit{stall}. We propose alternate mechanisms for dealing with re-occurring rollbacks. Overall, for applications considered in this paper, we find that even with rollback, eventual consistency provides better performance than using sequential consistency.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。