Adapting TPC-C Benchmark to Measure Performance of Multi-Document Transactions in MongoDB

Adapting TPC-C Benchmark to Measure Performance of Multi-Document Transactions in MongoDB
复制标题

采用 TPC-C 基准测试来衡量 MongoDB 中多文档事务的性能

DOI:
10.14778/3352063.3352140
复制
发表时间:
2019
期刊:
Proc. VLDB Endow.
影响因子:
--
通讯作者:
Asya Kamsky
Asya Kamsky
中科院分区:
--
文献类型:
--
作者:
Asya Kamsky

文献摘要

被引文献

相似文献

MongoDB是一个流行的分布式数据库,它支持复制、水平分区(sharding)、灵活的文档模式和文档级别的ACID保证。虽然MongoDB通常被归为“NoSQL”数据库,但它提供了许多与传统RDBMS相似的特性,如二级索引、特殊查询语言、对复杂聚合的支持,以及4.0版本的新多语句、多文档ACID事务。我们寻找一个易于理解的OLTP工作负载基准,在我们自己的系统性能测试套件中使用,以建立事务性能的基线,以支持标记性能回归,并在我们继续添加新功能时进行改进。虽然存在许多针对RDBMS OLTP工作负载的已发布和广泛使用的基准,但没有专门针对文档数据库的基准。本文描述了将现有的传统RDBMS基准调整到MongoDB查询语言和事务语义的过程,以允许测量事务性能。我们选择调整TPC-C基准测试,尽管它假设使用关系数据库模式和SQL,因此必须进行大量更改以保持与MongoDB最佳实践的一致。我们的目标不包括创建官方的TPC-C可认证的结果,但是,我们做了每一次尝试,以保持与原始基准规范的精神一致,并在可能的情况下符合所有规范需求。我们发现,遵循文档模式设计的最佳实践比使用所需的规范化模式获得更好的性能。所有使用的源代码和验证脚本都在github中发布,允许读者重新创建和验证我们的结果。
MongoDB is a popular distributed database that supports replication, horizontal partitioning (sharding), a flexible document schema and ACID guarantees on the document level. While it is generally grouped with "NoSQL" databases, MongoDB provides many features similar to those of traditional RDBMS such as secondary indexes, an ad hoc query language, support for complex aggregations, and new as of version 4.0 multi-statement, multi-document ACID transactions.We looked for a well understood OLTP workload benchmark to use in our own system performance test suite to establish a baseline of transaction performance to enable flagging performance regressions, as well as improvements as we continue to add new functionality. While there exist many published and widely used benchmarks for RDBMS OLTP workloads, there are none specifically for document databases.This paper describes the process of adapting an existing traditional RDBMS benchmark to MongoDB query language and transaction semantics to allow measuring transaction performance. We chose to adapt the TPC-C benchmark even though it assumes a relational database schema and SQL, hence extensive changes had to be made to stay consistent with MongoDB best practices. Our goal did not include creating official TPC-C certifiable results, however, every attempt was made to stay consistent with the spirit of the original benchmark specification as well as to be compliant to all specification requirements where possible.We discovered that following best practices for document schema design achieves better performance than using required normalized schema. All the source code used and validation scripts are published in github to allow the reader to recreate and verify our results.