华东师范大学学报(自然科学版) ›› 2020, Vol. 2020 ›› Issue (5): 1-9.doi: 10.3969/j.issn.1000-5641.202091005

• 数据系统 • 上一篇    下一篇

针对高竞争电商负载的事务处理优化原型系统

张舒燕, 王清帅, 张蓉   

  1. 华东师范大学 数据科学与工程学院, 上海 200062
  • 收稿日期:2020-08-05 发布日期:2020-09-24
  • 通讯作者: 张蓉,女,教授,博士生导师,研究方向为分布式数据管理.E-mail:rzhang@dase.ecnu.edu.cn E-mail:rzhang@dase.ecnu.edu.cn
  • 基金资助:
    国家重点研发计划(2018YFB1003404)

High contention transaction processing prototype for e-commerce workloads

ZHANG Shuyan, WANG Qingshuai, ZHANG Rong   

  1. School of Data Science and Engineering, East China Normal University, Shanghai 200062, China
  • Received:2020-08-05 Published:2020-09-24

摘要: 现代多核主存数据库在高竞争的负载下仍然不能达到理想的性能. 获得高吞吐量的障碍是试图访问相同数据的并发冲突事务. 这些事务争用相同的资源, 在传统数据库中必须串行执行. 促销活动中的电子商务(电商)负载就是这种高冲突的事务. 本研究从两个方面对电商负载的事务处理方案进行了优化. 首先, 由于产品数量有限, 许多购买请求不会成功. 数据库系统可以通过提前过滤掉无效请求来节省资源、降低锁竞争. 其次, 大量的写操作针对同一商品, 故在写操作之间实现锁共享, 再次降低锁竞争. 基于此想法本文实现了原型系统Filmer. 大量的实验表明, 过滤和合并可以提高处理高竞争电商负载的效率.

关键词: 事务处理, 并发控制, 高竞争

Abstract: Modern multi-core main-memory databases still cannot achieve ideal performance under high contention. Throughput is considered to be choked by concurrent transactions trying to modify the same data. These transactions contend for the same resources and must be executed serially in a traditional database. Unfortunately, e-commerce workloads often meet with high contentions due to promotions. In this paper, we optimize the transaction processing scheme for high contention e-commerce workloads from two aspects. First, prefiltering is designed to filter invalid modifications to the databases, which can mitigate the contention for locks. Second, if a large number of writes are similar, we propose to do lock sharing among similar writes. We implement a prototype of our proposed system, Filmer, to demonstrate the idea. Extensive experiments have shown that filtering and merging improve efficiency in handling high contention e-commerce workloads.

Key words: transaction processing, concurrency control, high contention

中图分类号: