Skip to content

Commit 1e5f268

Browse files
authored
Merge pull request #820 from HappenLee/doris
update apache doris result based on 4.1 RC01 and c7a.48xl, modify benchmark script
2 parents 609d7f8 + b9bafb6 commit 1e5f268

File tree

3 files changed

+195
-83
lines changed

3 files changed

+195
-83
lines changed

doris/benchmark.sh

Lines changed: 148 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ROOT=$(pwd)
99
if [[ -n "$1" ]]; then
1010
url="$1"
1111
else
12-
url='https://apache-doris-releases.oss-accelerate.aliyuncs.com/apache-doris-2.1.7-rc01-bin-x64.tar.gz'
12+
url='https://apache-doris-releases.oss-accelerate.aliyuncs.com/apache-doris-4.1.0-rc01-bin-x64.tar.gz'
1313
fi
1414
# Download
1515
file_name="$(basename ${url})"
@@ -24,21 +24,20 @@ dir_name="${file_name/.tar.gz/}"
2424

2525
# Try to stop Doris and remove it first if execute this script multiple times
2626
set +e
27-
"$dir_name"/apache-doris-2.1.7-rc01-bin-x64/fe/bin/stop_fe.sh
28-
"$dir_name"/apache-doris-2.1.7-rc01-bin-x64/be/bin/stop_be.sh
27+
"$dir_name"/"$dir_name"/fe/bin/stop_fe.sh
28+
"$dir_name"/"$dir_name"/be/bin/stop_be.sh
2929
rm -rf "$dir_name"
3030
set -e
3131

3232
# Uncompress
3333
mkdir "$dir_name"
3434
tar zxf "$file_name" -C "$dir_name"
35-
DORIS_HOME="$ROOT/$dir_name/apache-doris-2.1.7-rc01-bin-x64"
35+
DORIS_HOME="$ROOT/$dir_name/$dir_name"
3636
export DORIS_HOME
3737

3838
# Install dependencies
3939
sudo apt-get update -y
40-
sudo apt-get install -y openjdk-17-jdk
41-
sudo apt-get install -y mysql-client
40+
sudo apt-get install -y openjdk-17-jdk mysql-client
4241
export JAVA_HOME="/usr/lib/jvm/java-17-openjdk-$(dpkg --print-architecture)/"
4342
export PATH=$JAVA_HOME/bin:$PATH
4443

@@ -89,34 +88,160 @@ sleep 5
8988
mysql -h 127.0.0.1 -P9030 -uroot hits <"$ROOT"/create.sql
9089

9190
# Download data
92-
if [[ ! -f hits.tsv.gz ]] && [[ ! -f hits.tsv ]]; then
93-
sudo apt-get install -y pigz
94-
wget --continue --progress=dot:giga 'https://datasets.clickhouse.com/hits_compatible/hits.tsv.gz'
95-
pigz -d -f hits.tsv.gz
91+
BE_DATA_DIR="$DORIS_HOME/be/"
92+
mkdir -p "$BE_DATA_DIR/user_files_secure"
93+
94+
seq 0 99 | xargs -P100 -I{} bash -c 'wget --continue --progress=dot:giga https://datasets.clickhouse.com/hits_compatible/athena_partitioned/hits_{}.parquet'
95+
mv *.parquet "$BE_DATA_DIR/user_files_secure"
96+
97+
BE_ID=$(mysql -h127.0.0.1 -P9030 -uroot -N -e 'show backends' | awk '{print $1}' | head -1)
98+
99+
CORES=$(nproc)
100+
PARALLEL_NUM=$((CORES / 4))
101+
if [ "$PARALLEL_NUM" -lt 1 ]; then
102+
echo "Computed parallel_pipeline_task_num ($PARALLEL_NUM) is less than 1 based on $CORES cores; clamping to 1."
103+
PARALLEL_NUM=1
96104
fi
105+
echo "Setting parallel_pipeline_task_num to $PARALLEL_NUM (cpu cores: $CORES, computed as CORES/4 with min 1)"
97106

98-
# Load data
99-
echo "start loading hits.tsv, estimated to take about 9 minutes ..."
100-
date
107+
echo "start loading hits.parquet using TVF, estimated to take about 3 minutes ..."
101108
START=$(date +%s)
102-
curl --location-trusted \
103-
-u root: \
104-
-T "hits.tsv" \
105-
-H "label:hits" \
106-
-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" \
107-
http://localhost:8030/api/hits/hits/_stream_load
109+
mysql -h 127.0.0.1 -P9030 -uroot hits -e "SET parallel_pipeline_task_num = $PARALLEL_NUM;\
110+
INSERT INTO hits SELECT
111+
CounterID,
112+
DATE_ADD('1970-01-01', INTERVAL EventDate DAY) AS EventDate,
113+
UserID,
114+
FROM_UNIXTIME(EventTime) AS EventTime,
115+
WatchID,
116+
JavaEnable,
117+
Title,
118+
GoodEvent,
119+
ClientIP,
120+
RegionID,
121+
CounterClass,
122+
OS,
123+
UserAgent,
124+
URL,
125+
Referer,
126+
IsRefresh,
127+
RefererCategoryID,
128+
RefererRegionID,
129+
URLCategoryID,
130+
URLRegionID,
131+
ResolutionWidth,
132+
ResolutionHeight,
133+
ResolutionDepth,
134+
FlashMajor,
135+
FlashMinor,
136+
FlashMinor2,
137+
NetMajor,
138+
NetMinor,
139+
UserAgentMajor,
140+
UserAgentMinor,
141+
CookieEnable,
142+
JavascriptEnable,
143+
IsMobile,
144+
MobilePhone,
145+
MobilePhoneModel,
146+
Params,
147+
IPNetworkID,
148+
TraficSourceID,
149+
SearchEngineID,
150+
SearchPhrase,
151+
AdvEngineID,
152+
IsArtifical,
153+
WindowClientWidth,
154+
WindowClientHeight,
155+
ClientTimeZone,
156+
FROM_UNIXTIME(ClientEventTime) AS ClientEventTime,
157+
SilverlightVersion1,
158+
SilverlightVersion2,
159+
SilverlightVersion3,
160+
SilverlightVersion4,
161+
PageCharset,
162+
CodeVersion,
163+
IsLink,
164+
IsDownload,
165+
IsNotBounce,
166+
FUniqID,
167+
OriginalURL,
168+
HID,
169+
IsOldCounter,
170+
IsEvent,
171+
IsParameter,
172+
DontCountHits,
173+
WithHash,
174+
HitColor,
175+
FROM_UNIXTIME(LocalEventTime) AS LocalEventTime,
176+
Age,
177+
Sex,
178+
Income,
179+
Interests,
180+
Robotness,
181+
RemoteIP,
182+
WindowName,
183+
OpenerName,
184+
HistoryLength,
185+
BrowserLanguage,
186+
BrowserCountry,
187+
SocialNetwork,
188+
SocialAction,
189+
HTTPError,
190+
SendTiming,
191+
DNSTiming,
192+
ConnectTiming,
193+
ResponseStartTiming,
194+
ResponseEndTiming,
195+
FetchTiming,
196+
SocialSourceNetworkID,
197+
SocialSourcePage,
198+
ParamPrice,
199+
ParamOrderID,
200+
ParamCurrency,
201+
ParamCurrencyID,
202+
OpenstatServiceName,
203+
OpenstatCampaignID,
204+
OpenstatAdID,
205+
OpenstatSourceID,
206+
UTMSource,
207+
UTMMedium,
208+
UTMCampaign,
209+
UTMContent,
210+
UTMTerm,
211+
FromTag,
212+
HasGCLID,
213+
RefererHash,
214+
URLHash,
215+
CLID
216+
FROM local(
217+
\"file_path\" = \"user_files_secure/hits_*.parquet\",
218+
\"backend_id\" = \"$BE_ID\",
219+
\"format\" = \"parquet\"
220+
)
221+
"
108222
END=$(date +%s)
109223
LOADTIME=$(echo "$END - $START" | bc)
110224
echo "Load time: $LOADTIME"
111225
echo "$LOADTIME" > loadtime
112226

113-
# Dataset contains 99997497 rows, storage size is about 17319588503 bytes
114-
mysql -h 127.0.0.1 -P9030 -uroot hits -e "SELECT count(*) FROM hits"
115-
du -bs "$DORIS_HOME"/be/storage/ | cut -f1 | tee storage_size
116227

228+
du -bs "$DORIS_HOME"/be/storage/ | cut -f1 | tee storage_size
117229
echo "Data size: $(cat storage_size)"
118230

119-
./run.sh 2>&1 | tee -a log.txt
231+
mysql -h 127.0.0.1 -P9030 -uroot hits -e "set global enable_sql_cache = false"
232+
# Dataset contains 99997497 rows, storage size is about 13319588503 bytes
233+
mysql -h 127.0.0.1 -P9030 -uroot hits -e "SELECT count(*) FROM hits"
234+
235+
# Run queries
236+
TRIES=3
237+
while read -r query; do
238+
sync
239+
echo 3 | sudo tee /proc/sys/vm/drop_caches >/dev/null
240+
241+
for i in $(seq 1 $TRIES); do
242+
mysql -vvv -h127.1 -P9030 -uroot hits -e "${query}" 2>&1 | tee -a log.txt
243+
done
244+
done <queries.sql
120245

121246
cat log.txt |
122247
grep -P 'rows? in set|Empty set|^ERROR' |

doris/results/c7a.metal-48xl.json

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,57 @@
11
{
22
"system": "Apache Doris",
3-
"date": "2025-08-30",
3+
"date": "2026-03-18",
44
"machine": "c7a.metal-48xl",
55
"cluster_size": 1,
66
"proprietary": "no",
77
"hardware": "cpu",
88
"tuned": "no",
99
"tags": ["C++","column-oriented","MySQL compatible","ClickHouse derivative", "lukewarm-cold-run"],
10-
"load_time": 363,
11-
"data_size": 17361427232,
10+
"load_time": 152,
11+
"data_size": 13777831111,
1212
"result": [
13-
[0.04, 0.03, 0.02],
14-
[0.36, 0.02, 0.02],
15-
[1.29, 0.02, 0.03],
16-
[1.71, 0.03, 0.03],
17-
[1.62, 0.1, 0.11],
18-
[1.56, 0.15, 0.13],
19-
[0.04, 0.01, 0.01],
20-
[0.36, 0.03, 0.02],
21-
[2.81, 0.19, 0.19],
22-
[3.82, 0.21, 0.2],
23-
[2.38, 0.07, 0.07],
24-
[3.12, 0.07, 0.07],
25-
[1.99, 0.15, 0.14],
26-
[3.61, 0.2, 0.18],
27-
[2.25, 0.17, 0.16],
28-
[1.49, 0.11, 0.1],
29-
[3.5, 0.23, 0.21],
30-
[2.45, 0.05, 0.05],
31-
[4.73, 0.38, 0.37],
32-
[0.05, 0.01, 0],
33-
[11.14, 0.08, 0.05],
34-
[12.94, 0.08, 0.05],
35-
[24.8, 0.14, 0.07],
36-
[7.49, 0.05, 0.04],
37-
[2.94, 0.17, 0.04],
38-
[2.05, 0.05, 0.05],
39-
[2.88, 0.28, 0.22],
40-
[11.37, 0.15, 0.12],
41-
[9.15, 0.72, 0.66],
42-
[0.52, 0.04, 0.03],
43-
[5.17, 0.1, 0.08],
44-
[6.79, 0.12, 0.11],
45-
[4.87, 0.65, 0.58],
46-
[11.4, 0.75, 0.68],
47-
[11.44, 0.77, 0.66],
48-
[0.88, 0.14, 0.15],
49-
[1.85, 0.03, 0.03],
50-
[2.06, 0.02, 0.02],
51-
[2.01, 0.03, 0.03],
52-
[2.62, 0.06, 0.05],
53-
[1.51, 0.03, 0.03],
54-
[1.94, 0.03, 0.03],
55-
[1.35, 0.03, 0.02]
56-
]
13+
[0.024, 0.004, 0.003],
14+
[0.100, 0.028, 0.027],
15+
[0.488, 0.051, 0.050],
16+
[3.588, 0.052, 0.044],
17+
[0.092, 0.061, 0.068],
18+
[1.921, 0.120, 0.120],
19+
[0.031, 0.008, 0.004],
20+
[0.052, 0.032, 0.032],
21+
[0.430, 0.094, 0.095],
22+
[0.147, 0.146, 0.144],
23+
[0.112, 0.038, 0.040],
24+
[0.550, 0.045, 0.046],
25+
[0.099, 0.097, 0.091],
26+
[0.161, 0.160, 0.156],
27+
[3.030, 2.667, 2.491],
28+
[0.112, 0.102, 0.105],
29+
[0.260, 0.258, 0.248],
30+
[0.067, 0.051, 0.055],
31+
[1.544, 0.374, 0.380],
32+
[0.016, 0.008, 0.008],
33+
[17.071, 0.128, 0.056],
34+
[0.082, 0.054, 0.049],
35+
[15.391, 0.085, 0.069],
36+
[0.823, 0.057, 0.051],
37+
[0.046, 0.052, 0.076],
38+
[0.063, 0.063, 0.061],
39+
[0.055, 0.049, 0.054],
40+
[0.193, 0.154, 0.153],
41+
[14.729, 0.698, 0.683],
42+
[0.072, 0.058, 0.056],
43+
[1.549, 0.068, 0.068],
44+
[6.815, 0.100, 0.098],
45+
[0.533, 0.477, 0.512],
46+
[0.536, 0.525, 0.536],
47+
[0.609, 0.520, 0.516],
48+
[0.129, 0.125, 0.126],
49+
[0.074, 0.038, 0.039],
50+
[0.053, 0.035, 0.035],
51+
[0.302, 0.035, 0.036],
52+
[0.223, 0.063, 0.056],
53+
[0.555, 0.038, 0.038],
54+
[0.442, 0.040, 0.041],
55+
[0.040, 0.045, 0.038]
56+
]
5757
}

doris/run.sh

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)