TPC-DS Benchmark
TPC-DS Benchmarking
TPC-DS is a decision support benchmark developed by the Transaction Processing Performance Council (TPC). It uses more comprehensive test datasets and complex SQL queries than TPC-H.
TPC-DS models several generally applicable aspects of a decision support system, including queries and data maintenance. TPC-DS aims to provide a comprehensive and realistic workload for testing and evaluating the performance of database systems in a retail environment. The TPC-DS benchmark simulates the sales and return data of three sales channels (stores, Internet, and catalog) in a retail enterprise. In addition to creating tables for sales and return data models, it also includes a simple inventory system and a promotion system.
This benchmark tests a total of 99 complex SQL queries against 24 tables whose data size ranges from 1 GB to 3 GB. The main performance metric is the response time of each query, which is the duration between the time a query is submitted to the time the result is returned.
1. Test Conclusion
We perform a test on 99 queries against a TPC-DS 100 GB dataset. The following figure shows the test result.
In the test, StarRocks queries data from both its native storage and Hive external tables. StarRocks and Trino query the same copy of data from Hive external tables. Data is LZ4-compressed and stored in the Parquet format.
The latency for StarRocks to query data from its native storage is 174s, that for StarRocks to query Hive external tables is 239s, that for StarRocks to query Hive external tables with the Data Cache feature enabled is 176s, and that for Trino to query Hive external tables is 892s.
2. Test Preparation
2.1 Hardware Environment
Machine | 4 cloud hosts |
---|---|
CPU | 8core Intel(R) Xeon(R) Platinum 8269CY CPU @ 2.50GHz |
Memory | 32 GB |
Network bandwidth | 5 Gbit/s |
Disk | ESSD |
2.2 Software Environment
StarRocks and Trino are deployed on machines with the same configuration. StarRocks has 1 FE and 3 BEs deployed. Trino has 1 Coordinator and 3 Workers deployed.
- Kernel version: Linux 3.10.0-1127.13.1.el7.x86_64
- OS version: CentOS Linux released 7.8.2003
- Software version: StarRocks Community Edition 3.1, Trino-419, Hive-3.1.2
The StarRocks FE can be separately deployed or hybrid deployed with BEs, which does not affect the test results.
3. Test Data and Results
3.1 Test Data
Table | Records |
---|---|
call_center | 30 |
catalog_page | 20400 |
catalog_returns | 14404374 |
catalog_sales | 143997065 |
customer_address | 1000000 |
customer_demographics | 1920800 |
customer | 2000000 |
date_dim | 73049 |
household_demographics | 7200 |
income_band | 20 |
inventory | 399330000 |
item | 204000 |
promotion | 1000 |
reason | 55 |
ship_mode | 20 |
store | 402 |
store_returns | 28795080 |
store_sales | 287997024 |
time_dim | 86400 |
warehouse | 15 |
web_page | 2040 |
web_returns | 7197670 |
web_sales | 72001237 |
web_site | 24 |
3.2 Test Results
NOTE
- The unit of query latency in the following table is ms.
StarRocks-3.0.5-native
indicates StarRocks native storage,StarRocks-3.0-Hive external
indicates StarRocks queries Hive external tables through Hive Catalog,StarRocks-3.0-Hive external-Cache
indicates StarRocks queries Hive external tables through Hive Catalog with Data Cache enabled.- Aggregate pushdown is enabled for StarRocks (
SET global cbo_push_down_aggregate_mode = 0
).
Query | StarRocks-3.0.5-native | StarRocks-3.0-Hive external | StarRocks-3.0-Hive external-Cache | Trino-419 |
---|---|---|---|---|
SUM | 174157 | 238590 | 175970 | 891892 |
Q1 | 274 | 780 | 254 | 1681 |
Q2 | 338 | 676 | 397 | 10200 |
Q3 | 455 | 1156 | 628 | 3156 |
Q4 | 16180 | 13229 | 12623 | 48176 |
Q5 | 1162 | 773 | 506 | 4490 |
Q6 | 397 | 606 | 165 | 1349 |
Q7 | 898 | 1707 | 724 | 2300 |
Q8 | 532 | 447 | 141 | 2330 |
Q9 | 2113 | 7998 | 6336 | 17734 |
Q10 | 588 | 847 | 285 | 2498 |
Q11 | 6465 | 5086 | 4665 | 31333 |
Q12 | 149 | 302 | 135 | 728 |
Q13 | 1573 | 2661 | 1349 | 4370 |
Q14 | 7928 | 7811 | 5955 | 69729 |
Q15 | 323 | 461 | 199 | 1522 |
Q16 | 639 | 1278 | 661 | 3282 |
Q17 | 1157 | 898 | 682 | 4102 |
Q18 | 540 | 1746 | 521 | 2471 |
Q19 | 667 | 639 | 230 | 1701 |
Q20 | 209 | 369 | 144 | 849 |
Q21 | 466 | 586 | 306 | 1591 |
Q22 | 3876 | 4704 | 4536 | 17422 |
Q23 | 24500 | 24746 | 21707 | 145850 |
Q24 | 1256 | 5220 | 3219 | 21234 |
Q25 | 1037 | 792 | 542 | 3702 |
Q26 | 393 | 834 | 360 | 1737 |
Q27 | 742 | 1303 | 696 | 2396 |
Q28 | 1864 | 8600 | 6564 | 15837 |
Q29 | 1097 | 1134 | 888 | 4024 |
Q30 | 194 | 669 | 242 | 1922 |
Q31 | 1149 | 1070 | 834 | 5431 |
Q32 | 222 | 718 | 104 | 1706 |
Q33 | 922 | 735 | 327 | 2048 |
Q34 | 544 | 1392 | 576 | 3185 |
Q35 | 974 | 897 | 574 | 3050 |
Q36 | 630 | 1009 | 464 | 3056 |
Q37 | 246 | 791 | 273 | 3258 |
Q38 | 2831 | 2017 | 1695 | 10913 |
Q39 | 1057 | 2312 | 1324 | 10665 |
Q40 | 331 | 560 | 209 | 2678 |
Q41 | 57 | 148 | 79 | 776 |
Q42 | 463 | 559 | 106 | 1213 |
Q43 | 885 | 602 | 342 | 2914 |
Q44 | 506 | 3783 | 2306 | 9705 |
Q45 | 439 | 777 | 309 | 1012 |
Q46 | 868 | 1746 | 1037 | 4766 |
Q47 | 1816 | 2979 | 2684 | 19111 |
Q48 | 635 | 2038 | 1202 | 3635 |
Q49 | 1440 | 2754 | 1168 | 3435 |
Q50 | 836 | 2053 | 1305 | 4375 |
Q51 | 3966 | 5258 | 4466 | 14283 |
Q52 | 483 | 436 | 100 | 1126 |
Q53 | 698 | 802 | 391 | 1648 |
Q54 | 794 | 970 | 534 | 5146 |
Q55 | 463 | 540 | 97 | 963 |
Q56 | 874 | 695 | 240 | 2110 |
Q57 | 1717 | 2723 | 2372 | 10203 |
Q58 | 554 | 727 | 242 | 2053 |
Q59 | 2764 | 1581 | 1368 | 15697 |
Q60 | 1053 | 557 | 389 | 2421 |
Q61 | 1353 | 1026 | 439 | 2334 |
Q62 | 453 | 659 | 427 | 2422 |
Q63 | 709 | 943 | 374 | 1624 |
Q64 | 3209 | 6968 | 6175 | 31994 |
Q65 | 2147 | 3043 | 2451 | 9334 |
Q66 | 688 | 805 | 437 | 2598 |
Q67 | 15486 | 23743 | 21975 | 58091 |
Q68 | 965 | 1702 | 776 | 2710 |
Q69 | 600 | 703 | 263 | 2872 |
Q70 | 2376 | 2217 | 1588 | 10272 |
Q71 | 702 | 691 | 348 | 3074 |
Q72 | 1764 | 2733 | 2305 | 13973 |
Q73 | 576 | 1145 | 484 | 1899 |
Q74 | 4615 | 3884 | 3776 | 18749 |
Q75 | 2661 | 3479 | 3137 | 10858 |
Q76 | 450 | 2001 | 1014 | 5297 |
Q77 | 1109 | 743 | 317 | 2810 |
Q78 | 6540 | 7198 | 5890 | 19671 |
Q79 | 1116 | 1953 | 1121 | 4406 |
Q80 | 2290 | 1973 | 1480 | 5865 |
Q81 | 247 | 1024 | 317 | 1729 |
Q82 | 392 | 929 | 407 | 3605 |
Q83 | 134 | 313 | 158 | 1209 |
Q84 | 107 | 820 | 228 | 2448 |
Q85 | 460 | 2045 | 621 | 4311 |
Q86 | 433 | 999 | 387 | 1693 |
Q87 | 2873 | 2159 | 1779 | 10709 |
Q88 | 3616 | 7076 | 5432 | 26002 |
Q89 | 735 | 785 | 454 | 1997 |
Q90 | 174 | 898 | 232 | 2585 |
Q91 | 113 | 495 | 139 | 1745 |
Q92 | 203 | 627 | 91 | 1016 |
Q93 | 529 | 2508 | 1422 | 12265 |
Q94 | 475 | 811 | 598 | 2153 |
Q95 | 1059 | 1993 | 1526 | 8058 |
Q96 | 395 | 1197 | 681 | 3976 |
Q97 | 3000 | 3459 | 2860 | 6818 |
Q98 | 419 | 486 | 344 | 2090 |
Q99 | 755 | 1070 | 740 | 4332 |
4. Test Procedure
4.1 Query StarRocks Native Table
4.1.1 Generate Data
Download the tpcds-poc toolkit and generate the standard TPC-DS test dataset scale factor=100
.
wget https://starrocks-public.oss-cn-zhangjiakou.aliyuncs.com/tpcds-poc-1.0.zip
unzip tpcds-poc-1.0
cd tpcds-poc-1.0
sh bin/gen_data/gen-tpcds.sh 100 data_100
4.1.2 Create Table Schema
Modify the configuration file conf/starrocks.conf
and specify the cluster address. Pay attention to mysql_host
and mysql_port
.
sh bin/create_db_table.sh ddl_100
4.1.3 Load Data
sh bin/stream_load.sh data_100