針對數據庫不同的使用場景TPC組織發布了多項測試標准。其中被業界廣泛接受和使用的有TPC-C 、TPC-H和TPC-DS。
TPC-C:
Approved in July of 1992, TPC Benchmark C is an on-line transaction processing (OLTP) benchmark. TPC-C is more complex than previous OLTP benchmarks such as TPC-A because of its multiple transaction types, more complex database and overall execution structure. TPC-C involves a mix of five concurrent transactions of different types and complexity either executed on-line or queued for deferred execution. The database is comprised of nine types of tables with a wide range of record and population sizes. TPC-C is measured in transactions per minute (tpmC). While the benchmark portrays the activity of a wholesale supplier, TPC-C is not limited to the activity of any particular business segment, but, rather represents any industry that must manage, sell, or distribute a product or service.
TPC-C於1992年7月獲得批准,是針對OLTP的基准測試。TPC-C相對於此前的OLTP基准測試標准如TPC-A更加復雜,
因為多事務類型、更復雜的數據庫和整體執行的結構。TPC-C混合五種不同類型的比並發事務及其復雜性,要么在線
執行成功要么排隊等候延遲執行。這個數據庫由九種類型的表,這些表具有廣泛的數據記錄和數據大小。TPC-C通過每分鍾
事務數來衡量。TPC-C 基准測試描述了批發供應商的活動,他不局限於特定的商業活動,而是代表了包含管理、銷售、
分發產品或者服務的任何行業。
目前針對MySQL,Percona仍然提供TPC-C測試包。
http://repo.percona.com/release/7/RPMS/x86_64/sysbench-tpcc-1.0.15-2.el7.x86_64.rpm
TPC-H:
The TPC Benchmark™H (TPC-H) is a decision support benchmark. It consists of a suite of business oriented ad-hoc queries and concurrent data modifications. The queries and the data populating the database have been chosen to have broad industry-wide relevance. This benchmark illustrates decision support systems that examine large volumes of data, execute queries with a high degree of complexity, and give answers to critical businessquestions. The performance metric reported by TPC-H is called the TPC-H Composite Query-per-Hour Performance Metric (QphH@Size), and reflects multiple aspects of the capability of the system to process queries. These aspects include the selected database size against which the queries are executed, the query processing power when queries are submitted by a single stream,and the query throughput when queries are submitted by multiple concurrent users. The TPC-H Price/Performance metric is expressed as $/QphH@Size.
TPC-H是決策支持的基准測試。它由一套面向業務的即席查詢和並發數據修改組成。 這些查詢和填充數據庫的數據具有廣泛的行業相關性。 該基准測試展示了決策支持系統,它可以檢索大量數據,執行高度復雜的查詢,並為關鍵業務問題提供答案。 TPC-H報告的性能指標稱為TPC-H每小時綜合查詢性能指標(QphH @ Size),並反映了系統處理查詢的能力的多方面。 這些方面包括執行查詢所選的數據庫大小,單個流提交查詢時的查詢處理能力,以及多個並發用戶提交查詢時的查詢吞吐量。 TPC-H的價格/性能指標表示為$ / QphH @ Size。
TPC.org官方提供的有測試包。
TPC-H是一款面向商品零售業的決策支持系統測試基准,它定義了8張表,22個查詢,遵循SQL92;TPC-H基准的數據庫模式遵循第三范式。新興的數據倉庫開始采用新的模型,如星型模型、雪花模型。TPC-H已經不能精准反映當今數據庫系統的真實性能。為此,TPC組織推出了新一代的面向決策應用的TPC-DS 基准。
TPC-DS:
The TPC Benchmark DS (TPC-DS) is a decision support benchmark that models several generally applicable aspects of a decision support system, including queries and data maintenance. The benchmark provides a representative evaluation of performance as a general purpose decision support system. A benchmark result measures query response time in single user mode, query throughput in multi user mode and data maintenance performance for a given hardware, operating system, and data processing system configuration under a controlled, complex, multi-user decision support workload. The purpose of TPC benchmarks is to provide relevant, objective performance data to industry users. TPC-DS Version 2 enables emerging technologies, such as Big Data systems, to execute the benchmark.
TPC-DS是決策支持的基本測試,提供了決策支持系統的通用見面方式,包括數據查詢和數據維護。TPC-DS基准測試提供了
通用決策支持系統的性能評估。基准測試的結果衡量了單用戶模式下的響應時間,多用戶模式下的查詢吞吐量,特定操作系統和硬件的數據維護性能,在受限復雜的環境下數據處理系統、支持多用戶決策。TPC-DS基准測試為用戶提供相關的 客觀性能數據。TPC-DS v2則支持新興技術如大數據 進行性能測試。
tpc.org 官方也提供規范和測試包。
TPC-DS采用星型、雪花型等多維數據模式。它包含7張事實表,17張緯度表平均每張表含有18列。其工作負載包含99個SQL查詢,覆蓋SQL99和2003的核心部分以及OLAP。這個測試集包含對大數據集的統計、報表生成、聯機查詢、數據挖掘等復雜應用,測試用的數據和值是有傾斜的,與真實數據一致。可以說TPC-DS是與真實場景非常接近的一個測試集,也是難度較大的一個測試集。
TPC-DS的這個特點跟大數據的分析挖掘應用非常類似。Hadoop等大數據分析技術也是對海量數據進行大規模的數據分析和深度挖掘,也包含交互式聯機查詢和統計報表類應用,同時大數據的數據質量也較低,數據分布是真實而不均勻的。因此TPC-DS成為客觀衡量多個不同Hadoop版本以及SQL on Hadoop技術的最佳測試集。這個基准測試有以下幾個主要特點:
一共99個測試案例,遵循SQL’99和SQL 2003的語法標准,SQL案例比較復雜
分析的數據量大,並且測試案例是在回答真實的商業問題
測試案例中包含各種業務模型(如分析報告型,迭代式的聯機分析型,數據挖掘型等)
幾乎所有的測試案例都有很高的IO負載和CPU計算需求
分析的數據量大,並且測試案例是在回答真實的商業問題
測試案例中包含各種業務模型(如分析報告型,迭代式的聯機分析型,數據挖掘型等)
幾乎所有的測試案例都有很高的IO負載和CPU計算需求
結論:
TPC-C是針對OLTP的測試,TPC-H和TPC-DS則是針對OLAP的測試,在新興的HATP數據庫興起是則TPC-C、TPC-H和TPC-DS都需要進行測試測試驗證,不過大部分數據庫目前對TPC-DS的99個SQL查詢支持尚不完善。
參考:
http://www.tpc.org/tpcc/default.asp
————————————————
版權聲明:本文為CSDN博主「vkingnew」的原創文章,遵循 CC 4.0 BY-SA 版權協議,轉載請附上原文出處鏈接及本聲明。
原文鏈接:https://blog.csdn.net/vkingnew/article/details/81914859
————————————————
版權聲明:本文為CSDN博主「vkingnew」的原創文章,遵循 CC 4.0 BY-SA 版權協議,轉載請附上原文出處鏈接及本聲明。
原文鏈接:https://blog.csdn.net/vkingnew/article/details/81914859
