Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions index.html

Large diffs are not rendered by default.

28 changes: 11 additions & 17 deletions starrocks/benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

# This benchmark should run on Amazon Linux

VERSION=2.4.0-rc03
DOWNLOAD_URL=https://download.starrocks.com/en-US/download/request-download/54/StarRocks-2.4.0-rc03.tar.gz
VERSION=3.0.0-preview
DOWNLOAD_URL=https://releases.starrocks.io/starrocks/StarRocks-3.0.0-preview.tar.gz
# Install
wget $DOWNLOAD_URL
tar zxvf StarRocks-${VERSION}.tar.gz
Expand Down Expand Up @@ -33,37 +33,31 @@ be/bin/start_be.sh --daemon
# wait some seconds util fe can serve
sleep 30
mysql -h 127.0.0.1 -P9030 -uroot -e "ALTER SYSTEM ADD BACKEND '${IPADDR}:9050' "
# wait some seconds util be joins
sleep 30

# Prepare Data
cd ../
wget --continue 'https://datasets.clickhouse.com/hits_compatible/hits.tsv.gz'
gzip -d hits.tsv.gz
# Split file into chunks
split -a 1 -d -l 10000000 hits.tsv hits_split

# Create Table
mysql -h 127.0.0.1 -P9030 -uroot -e "CREATE DATABASE hits"
mysql -h 127.0.0.1 -P9030 -uroot hits < create.sql

# Load Data
START=$(date +%s)
for i in `seq -w 0 9`; do
echo "start loading hits_split${i} ..."
curl --location-trusted \
-u root: \
-T "hits_split${i}" \
-H "label:hits_split${i}" \
-H "columns: WatchID,JavaEnable,Title,GoodEvent,EventTime,EventDate,CounterID,ClientIP,RegionID,UserID,CounterClass,OS,UserAgent,URL,Referer,IsRefresh,RefererCategoryID,RefererRegionID,URLCategoryID,URLRegionID,ResolutionWidth,ResolutionHeight,ResolutionDepth,FlashMajor,FlashMinor,FlashMinor2,NetMajor,NetMinor,UserAgentMajor,UserAgentMinor,CookieEnable,JavascriptEnable,IsMobile,MobilePhone,MobilePhoneModel,Params,IPNetworkID,TraficSourceID,SearchEngineID,SearchPhrase,AdvEngineID,IsArtifical,WindowClientWidth,WindowClientHeight,ClientTimeZone,ClientEventTime,SilverlightVersion1,SilverlightVersion2,SilverlightVersion3,SilverlightVersion4,PageCharset,CodeVersion,IsLink,IsDownload,IsNotBounce,FUniqID,OriginalURL,HID,IsOldCounter,IsEvent,IsParameter,DontCountHits,WithHash,HitColor,LocalEventTime,Age,Sex,Income,Interests,Robotness,RemoteIP,WindowName,OpenerName,HistoryLength,BrowserLanguage,BrowserCountry,SocialNetwork,SocialAction,HTTPError,SendTiming,DNSTiming,ConnectTiming,ResponseStartTiming,ResponseEndTiming,FetchTiming,SocialSourceNetworkID,SocialSourcePage,ParamPrice,ParamOrderID,ParamCurrency,ParamCurrencyID,OpenstatServiceName,OpenstatCampaignID,OpenstatAdID,OpenstatSourceID,UTMSource,UTMMedium,UTMCampaign,UTMContent,UTMTerm,FromTag,HasGCLID,RefererHash,URLHash,CLID" \
http://localhost:8030/api/hits/hits/_stream_load
done
echo "Start to load data..."
curl --location-trusted \
-u root: \
-T "hits.tsv" \
-H "label:hits_tsv_${START}" \
-H "columns: WatchID,JavaEnable,Title,GoodEvent,EventTime,EventDate,CounterID,ClientIP,RegionID,UserID,CounterClass,OS,UserAgent,URL,Referer,IsRefresh,RefererCategoryID,RefererRegionID,URLCategoryID,URLRegionID,ResolutionWidth,ResolutionHeight,ResolutionDepth,FlashMajor,FlashMinor,FlashMinor2,NetMajor,NetMinor,UserAgentMajor,UserAgentMinor,CookieEnable,JavascriptEnable,IsMobile,MobilePhone,MobilePhoneModel,Params,IPNetworkID,TraficSourceID,SearchEngineID,SearchPhrase,AdvEngineID,IsArtifical,WindowClientWidth,WindowClientHeight,ClientTimeZone,ClientEventTime,SilverlightVersion1,SilverlightVersion2,SilverlightVersion3,SilverlightVersion4,PageCharset,CodeVersion,IsLink,IsDownload,IsNotBounce,FUniqID,OriginalURL,HID,IsOldCounter,IsEvent,IsParameter,DontCountHits,WithHash,HitColor,LocalEventTime,Age,Sex,Income,Interests,Robotness,RemoteIP,WindowName,OpenerName,HistoryLength,BrowserLanguage,BrowserCountry,SocialNetwork,SocialAction,HTTPError,SendTiming,DNSTiming,ConnectTiming,ResponseStartTiming,ResponseEndTiming,FetchTiming,SocialSourceNetworkID,SocialSourcePage,ParamPrice,ParamOrderID,ParamCurrency,ParamCurrencyID,OpenstatServiceName,OpenstatCampaignID,OpenstatAdID,OpenstatSourceID,UTMSource,UTMMedium,UTMCampaign,UTMContent,UTMTerm,FromTag,HasGCLID,RefererHash,URLHash,CLID" \
http://localhost:8030/api/hits/hits/_stream_load
END=$(date +%s)
LOADTIME=$(echo "$END - $START" | bc)
echo "Load data costs $LOADTIME seconds"

# This if you want to obtain the "tuned" result. Analyze table:
# time mysql -h 127.0.0.1 -P9030 -uroot hits -e "ANALYZE TABLE hits with sync mode"
# mysql -h 127.0.0.1 -P9030 -uroot hits -e "SET GLOBAL enable_tablet_internal_parallel=false"

# Dataset contains about 40GB of data when the import is just completed.
# This is because the trashed data generated during the compaction process.
# After about tens of minutes, when the gc is completed, the system includes about 16.5GB of data.
Expand Down
2 changes: 1 addition & 1 deletion starrocks/create.sql
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,5 @@ CREATE TABLE hits (
CLID INT NOT NULL
)
DUPLICATE KEY (CounterID, EventDate, UserID, EventTime, WatchID)
DISTRIBUTED BY HASH(UserID) BUCKETS 48
DISTRIBUTED BY HASH(UserID) BUCKETS 192
PROPERTIES ( "replication_num"="1");
2 changes: 1 addition & 1 deletion starrocks/queries.sql
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SELECT SearchPhrase FROM hits WHERE SearchPhrase <> '' ORDER BY EventTime LIMIT
SELECT SearchPhrase FROM hits WHERE SearchPhrase <> '' ORDER BY SearchPhrase LIMIT 10;
SELECT SearchPhrase FROM hits WHERE SearchPhrase <> '' ORDER BY EventTime, SearchPhrase LIMIT 10;
SELECT CounterID, AVG(length(URL)) AS l, COUNT(*) AS c FROM hits WHERE URL <> '' GROUP BY CounterID HAVING COUNT(*) > 100000 ORDER BY l DESC LIMIT 25;
SELECT REGEXP_REPLACE(Referer, '^https?://(?:www\.)?([^/]+)/.*$', '\1') AS k, AVG(length(Referer)) AS l, COUNT(*) AS c, MIN(Referer) FROM hits WHERE Referer <> '' GROUP BY k HAVING COUNT(*) > 100000 ORDER BY l DESC LIMIT 25;
SELECT REGEXP_REPLACE(Referer, '^https?://(?:www\.)?([^/]+)/.*$', '\\1') AS k, AVG(length(Referer)) AS l, COUNT(*) AS c, MIN(Referer) FROM hits WHERE Referer <> '' GROUP BY k HAVING COUNT(*) > 100000 ORDER BY l DESC LIMIT 25;
SELECT SUM(ResolutionWidth), SUM(ResolutionWidth + 1), SUM(ResolutionWidth + 2), SUM(ResolutionWidth + 3), SUM(ResolutionWidth + 4), SUM(ResolutionWidth + 5), SUM(ResolutionWidth + 6), SUM(ResolutionWidth + 7), SUM(ResolutionWidth + 8), SUM(ResolutionWidth + 9), SUM(ResolutionWidth + 10), SUM(ResolutionWidth + 11), SUM(ResolutionWidth + 12), SUM(ResolutionWidth + 13), SUM(ResolutionWidth + 14), SUM(ResolutionWidth + 15), SUM(ResolutionWidth + 16), SUM(ResolutionWidth + 17), SUM(ResolutionWidth + 18), SUM(ResolutionWidth + 19), SUM(ResolutionWidth + 20), SUM(ResolutionWidth + 21), SUM(ResolutionWidth + 22), SUM(ResolutionWidth + 23), SUM(ResolutionWidth + 24), SUM(ResolutionWidth + 25), SUM(ResolutionWidth + 26), SUM(ResolutionWidth + 27), SUM(ResolutionWidth + 28), SUM(ResolutionWidth + 29), SUM(ResolutionWidth + 30), SUM(ResolutionWidth + 31), SUM(ResolutionWidth + 32), SUM(ResolutionWidth + 33), SUM(ResolutionWidth + 34), SUM(ResolutionWidth + 35), SUM(ResolutionWidth + 36), SUM(ResolutionWidth + 37), SUM(ResolutionWidth + 38), SUM(ResolutionWidth + 39), SUM(ResolutionWidth + 40), SUM(ResolutionWidth + 41), SUM(ResolutionWidth + 42), SUM(ResolutionWidth + 43), SUM(ResolutionWidth + 44), SUM(ResolutionWidth + 45), SUM(ResolutionWidth + 46), SUM(ResolutionWidth + 47), SUM(ResolutionWidth + 48), SUM(ResolutionWidth + 49), SUM(ResolutionWidth + 50), SUM(ResolutionWidth + 51), SUM(ResolutionWidth + 52), SUM(ResolutionWidth + 53), SUM(ResolutionWidth + 54), SUM(ResolutionWidth + 55), SUM(ResolutionWidth + 56), SUM(ResolutionWidth + 57), SUM(ResolutionWidth + 58), SUM(ResolutionWidth + 59), SUM(ResolutionWidth + 60), SUM(ResolutionWidth + 61), SUM(ResolutionWidth + 62), SUM(ResolutionWidth + 63), SUM(ResolutionWidth + 64), SUM(ResolutionWidth + 65), SUM(ResolutionWidth + 66), SUM(ResolutionWidth + 67), SUM(ResolutionWidth + 68), SUM(ResolutionWidth + 69), SUM(ResolutionWidth + 70), SUM(ResolutionWidth + 71), SUM(ResolutionWidth + 72), SUM(ResolutionWidth + 73), SUM(ResolutionWidth + 74), SUM(ResolutionWidth + 75), SUM(ResolutionWidth + 76), SUM(ResolutionWidth + 77), SUM(ResolutionWidth + 78), SUM(ResolutionWidth + 79), SUM(ResolutionWidth + 80), SUM(ResolutionWidth + 81), SUM(ResolutionWidth + 82), SUM(ResolutionWidth + 83), SUM(ResolutionWidth + 84), SUM(ResolutionWidth + 85), SUM(ResolutionWidth + 86), SUM(ResolutionWidth + 87), SUM(ResolutionWidth + 88), SUM(ResolutionWidth + 89) FROM hits;
SELECT SearchEngineID, ClientIP, COUNT(*) AS c, SUM(IsRefresh), AVG(ResolutionWidth) FROM hits WHERE SearchPhrase <> '' GROUP BY SearchEngineID, ClientIP ORDER BY c DESC LIMIT 10;
SELECT WatchID, ClientIP, COUNT(*) AS c, SUM(IsRefresh), AVG(ResolutionWidth) FROM hits WHERE SearchPhrase <> '' GROUP BY WatchID, ClientIP ORDER BY c DESC LIMIT 10;
Expand Down
91 changes: 45 additions & 46 deletions starrocks/results/c6a.4xlarge.json
Original file line number Diff line number Diff line change
@@ -1,56 +1,55 @@
{
"hide": true,
"system": "StarRocks (tuned)",
"system": "StarRocks",
"date": "2022-09-25",
"machine": "c6a.4xlarge, 500gb gp2",
"cluster_size": 1,
"comment": "",
"tags": ["C++", "column-oriented", "MySQL compatible", "ClickHouse derivative"],
"load_time": 737,
"data_size": 17731811260,
"load_time": 492,
"data_size": 17233927256,
"result": [
[0.02,0.03,0.02],
[0.04,0.02,0.02],
[0.09,0.06,0.06],
[2.00,0.08,0.08],
[0.51,0.49,0.47],
[1.32,0.96,0.90],
[0.09,0.07,0.09],
[0.06,0.01,0.02],
[0.76,0.92,0.79],
[0.94,0.86,0.94],
[0.16,0.15,0.12],
[0.15,0.13,0.12],
[0.68,0.66,0.66],
[1.48,1.38,1.36],
[0.89,0.88,0.96],
[0.63,0.56,0.56],
[3.03,2.61,2.21],
[0.46,0.41,0.50],
[5.34,4.57,4.58],
[0.01,0.00,0.01],
[12.05,1.22,1.04],
[13.14,1.05,1.02],
[26.14,2.00,2.04],
[37.50,2.50,3.04],
[2.47,0.16,0.15],
[0.13,0.12,0.14],
[0.15,0.15,0.14],
[11.77,1.45,1.41],
[10.44,6.16,8.27],
[1.54,1.40,1.37],
[2.84,0.51,0.47],
[2.96,0.74,0.72],
[4.89,5.57,5.30],
[11.71,4.86,4.79],
[11.30,5.11,4.62],
[2.69,2.56,2.59],
[0.06,0.04,0.05],
[0.04,0.03,0.02],
[0.02,0.02,0.02],
[0.15,0.14,0.14],
[0.05,0.02,0.02],
[0.03,0.02,0.01],
[0.02,0.01,0.01]
[0.21,0.03,0.04],
[1.88,0.07,0.07],
[3.40,0.09,0.10],
[0.37,0.34,0.33],
[2.71,0.88,0.84],
[0.03,0.02,0.02],
[0.06,0.03,0.03],
[1.66,0.53,0.47],
[1.58,1.52,1.47],
[0.68,0.10,0.11],
[1.26,0.12,0.12],
[0.54,0.54,0.54],
[0.99,0.96,0.99],
[0.81,0.77,0.80],
[0.41,0.39,0.40],
[1.45,1.49,1.52],
[0.52,0.52,0.51],
[2.98,2.60,2.56],
[0.02,0.01,0.00],
[12.97,1.10,1.11],
[14.84,0.91,0.94],
[27.68,1.96,1.94],
[46.49,1.49,1.22],
[0.16,0.11,0.07],
[0.94,0.12,0.12],
[0.06,0.05,0.04],
[13.99,1.44,1.42],
[11.58,10.20,10.37],
[0.22,0.10,0.11],
[4.60,0.38,0.36],
[4.15,0.53,0.52],
[3.54,3.48,3.48],
[15.22,6.08,6.17],
[14.90,6.34,6.31],
[1.86,0.59,0.51],
[0.99,0.09,0.08],
[0.42,0.05,0.05],
[0.15,0.04,0.04],
[1.27,0.18,0.18],
[0.32,0.04,0.03],
[0.11,0.03,0.04],
[0.08,0.03,0.02]
]
}
55 changes: 0 additions & 55 deletions starrocks/results/c6a.4xlarge.untuned.json

This file was deleted.

93 changes: 46 additions & 47 deletions starrocks/results/c6a.metal.json
Original file line number Diff line number Diff line change
@@ -1,56 +1,55 @@
{
"hide": true,
"system": "StarRocks (tuned)",
"date": "2022-09-25",
"system": "StarRocks",
"date": "2023-02-10",
"machine": "c6a.metal, 500gb gp2",
"cluster_size": 1,
"comment": "",
"tags": ["C++", "column-oriented", "MySQL compatible", "ClickHouse derivative"],
"load_time": 490,
"data_size": 17746587454,
"load_time": 433,
"data_size": 17705230744,
"result": [
[0.10,0.03,0.03],
[0.06,0.02,0.02],
[0.06,0.04,0.04],
[1.17,0.08,0.05],
[0.08,0.07,0.10],
[1.14,0.31,0.21],
[0.06,0.05,0.03],
[0.04,0.02,0.03],
[0.22,0.20,0.20],
[0.22,0.23,0.23],
[0.04,0.04,0.03],
[0.12,0.03,0.03],
[0.66,0.06,0.06],
[2.08,0.08,0.06],
[0.10,0.08,0.09],
[0.11,0.10,0.11],
[0.16,0.17,0.15],
[0.26,0.27,0.26],
[0.19,0.21,0.19],
[0.09,0.08,0.08],
[0.29,0.27,0.27],
[0.09,0.10,0.10],
[0.64,0.53,0.55],
[0.01,0.00,0.01],
[10.79,0.24,0.25],
[0.16,0.14,0.14],
[9.59,0.28,0.29],
[23.02,0.32,0.31],
[0.04,0.04,0.05],
[0.04,0.05,0.05],
[0.04,0.04,0.05],
[0.29,0.30,0.30],
[8.48,0.82,0.75],
[0.30,0.28,0.26],
[0.19,0.15,0.15],
[2.11,0.20,0.22],
[1.37,1.14,1.13],
[0.93,0.95,0.91],
[0.94,0.88,0.92],
[0.32,0.32,0.33],
[0.03,0.03,0.03],
[0.02,0.02,0.02],
[0.02,0.03,0.03],
[0.16,0.17,0.16],
[0.08,0.10,0.11],
[0.09,0.10,0.10],
[0.09,0.10,0.09]
[2.19,0.22,0.21],
[0.04,0.02,0.03],
[0.06,0.04,0.04],
[0.99,0.12,0.12],
[0.73,0.74,0.70],
[0.13,0.06,0.05],
[1.04,0.06,0.07],
[0.17,0.18,0.17],
[0.23,0.23,0.23],
[0.54,0.18,0.18],
[0.09,0.09,0.08],
[0.31,0.32,0.30],
[0.12,0.10,0.11],
[1.27,0.48,0.44],
[0.01,0.01,0.00],
[12.09,0.17,0.15],
[0.17,0.13,0.12],
[10.91,0.28,0.24],
[28.25,0.86,1.36],
[0.03,0.03,0.02],
[0.06,0.04,0.04],
[0.02,0.03,0.02],
[0.63,0.24,0.21],
[8.77,1.60,1.64],
[0.12,0.10,0.10],
[1.33,0.13,0.13],
[3.46,0.18,0.19],
[0.97,0.86,0.86],
[0.95,0.96,0.98],
[0.96,0.97,0.97],
[0.14,0.12,0.14],
[0.07,0.06,0.06],
[0.05,0.04,0.04],
[0.04,0.03,0.03],
[0.10,0.09,0.09],
[0.47,0.03,0.03],
[0.25,0.03,0.03],
[0.04,0.03,0.03]
]
}
55 changes: 0 additions & 55 deletions starrocks/results/c6a.metal.untuned.json

This file was deleted.

Loading