An Optimized Solution for Highly Contended Transactional Workloads
摘要
High contention frequently explodes in E-commerce scenario when promotions are held. However, modern multi-core main-memory databases cannot achieve ideal performance under high contention. Transactions contending for the same resources must be executed serially in traditional architecture to guarantee correctness, which severely chokes database management systems. In this paper, we propose to optimize the transaction processing scheme for highly contended E-commerce workloads. First, we analyze the characteristics of these workloads in detail. Second, we design to filter ineffective operations at IO layer instead of sending them to executing layer, considering the limited number of items involved in the promotion. Third, we make out a homogeneous operation merging scheme to share database execution resources, e.g., locks, and improve parallelization. We implement a prototype, Filmer, to demonstrate our idea. Filmer launches filtering and merging for contended transactions to make full use of system resources and improve parallelization. Extensive experiments show that filtering and merging improve the throughput by up to 1.95 \(\times \) and 2.55 \(\times \) respectively.