-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:ClickHouse/ClickBench into versions…
…-23.5
- Loading branch information
Showing
78 changed files
with
1,267 additions
and
640 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: "Generate index.html" | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
CI_COMMIT_MESSAGE: "[bot] update index.html" | ||
CI_COMMIT_AUTHOR: github | ||
steps: | ||
- uses: actions/[email protected] | ||
- if: github.event.commits[0].message != env.CI_COMMIT_MESSAGE | ||
run: | | ||
bash generate-results.sh | ||
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}" | ||
git config --global user.email "${{ env.CI_COMMIT_AUTHOR }}@users.noreply.github.com" | ||
git add -A | ||
if git status | grep -q modified | ||
then | ||
git commit -m "${{ env.CI_COMMIT_MESSAGE }}" | ||
git push | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[ByConity](https://github.com/ByConity/ByConity) | ||
|
||
Even though ByConity is a fork of ClickHouse, there are some | ||
differences: | ||
|
||
- it does not have some new features/optimizations since it was a fork of | ||
ClickHouse (21.8). | ||
- it supports transactions | ||
- this setup uses HDFS | ||
|
||
But some of this has a cost, so let's see what is it. | ||
|
||
The benchmark uses local in docker setup, so it is far from reality, but | ||
still. | ||
|
||
Note, that almost all setup was copied from the [ByConity repository](https://github.com/ByConity/ByConity/tree/master/docker/local-deploy), | ||
and I did some modifications to use pre-built images. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
docker-compose up -d | ||
sleep 5 | ||
|
||
hdfs/create_users.sh | ||
|
||
function byconity() | ||
{ | ||
docker-compose exec -T server clickhouse-client --port 52145 "$@" | ||
} | ||
export -f byconity | ||
|
||
byconity --time -n < create.sql | ||
wget --no-verbose --continue 'https://datasets.clickhouse.com/hits_compatible/hits.tsv.gz' | ||
pigz -fkd hits.tsv.gz | ||
byconity --database bench --query "INSERT INTO hits FORMAT TSV" < hits.tsv | ||
|
||
# NOTE: sometimes may hung due to docker-compose, using docker directly may help | ||
./run.sh | ||
|
||
byconity --enable_multiple_tables_for_cnch_parts=1 --query "SELECT sum(bytes_on_disk) FROM system.cnch_parts WHERE table = 'hits' AND database = 'bench'" | ||
|
||
docker-compose down --volumes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
CREATE DATABASE bench Engine=Cnch; | ||
CREATE TABLE bench.hits | ||
( | ||
WatchID BIGINT NOT NULL, | ||
JavaEnable SMALLINT NOT NULL, | ||
Title TEXT NOT NULL, | ||
GoodEvent SMALLINT NOT NULL, | ||
EventTime TIMESTAMP NOT NULL, | ||
EventDate Date NOT NULL, | ||
CounterID INTEGER NOT NULL, | ||
ClientIP INTEGER NOT NULL, | ||
RegionID INTEGER NOT NULL, | ||
UserID BIGINT NOT NULL, | ||
CounterClass SMALLINT NOT NULL, | ||
OS SMALLINT NOT NULL, | ||
UserAgent SMALLINT NOT NULL, | ||
URL TEXT NOT NULL, | ||
Referer TEXT NOT NULL, | ||
IsRefresh SMALLINT NOT NULL, | ||
RefererCategoryID SMALLINT NOT NULL, | ||
RefererRegionID INTEGER NOT NULL, | ||
URLCategoryID SMALLINT NOT NULL, | ||
URLRegionID INTEGER NOT NULL, | ||
ResolutionWidth SMALLINT NOT NULL, | ||
ResolutionHeight SMALLINT NOT NULL, | ||
ResolutionDepth SMALLINT NOT NULL, | ||
FlashMajor SMALLINT NOT NULL, | ||
FlashMinor SMALLINT NOT NULL, | ||
FlashMinor2 TEXT NOT NULL, | ||
NetMajor SMALLINT NOT NULL, | ||
NetMinor SMALLINT NOT NULL, | ||
UserAgentMajor SMALLINT NOT NULL, | ||
UserAgentMinor VARCHAR(255) NOT NULL, | ||
CookieEnable SMALLINT NOT NULL, | ||
JavascriptEnable SMALLINT NOT NULL, | ||
IsMobile SMALLINT NOT NULL, | ||
MobilePhone SMALLINT NOT NULL, | ||
MobilePhoneModel TEXT NOT NULL, | ||
Params TEXT NOT NULL, | ||
IPNetworkID INTEGER NOT NULL, | ||
TraficSourceID SMALLINT NOT NULL, | ||
SearchEngineID SMALLINT NOT NULL, | ||
SearchPhrase TEXT NOT NULL, | ||
AdvEngineID SMALLINT NOT NULL, | ||
IsArtifical SMALLINT NOT NULL, | ||
WindowClientWidth SMALLINT NOT NULL, | ||
WindowClientHeight SMALLINT NOT NULL, | ||
ClientTimeZone SMALLINT NOT NULL, | ||
ClientEventTime TIMESTAMP NOT NULL, | ||
SilverlightVersion1 SMALLINT NOT NULL, | ||
SilverlightVersion2 SMALLINT NOT NULL, | ||
SilverlightVersion3 INTEGER NOT NULL, | ||
SilverlightVersion4 SMALLINT NOT NULL, | ||
PageCharset TEXT NOT NULL, | ||
CodeVersion INTEGER NOT NULL, | ||
IsLink SMALLINT NOT NULL, | ||
IsDownload SMALLINT NOT NULL, | ||
IsNotBounce SMALLINT NOT NULL, | ||
FUniqID BIGINT NOT NULL, | ||
OriginalURL TEXT NOT NULL, | ||
HID INTEGER NOT NULL, | ||
IsOldCounter SMALLINT NOT NULL, | ||
IsEvent SMALLINT NOT NULL, | ||
IsParameter SMALLINT NOT NULL, | ||
DontCountHits SMALLINT NOT NULL, | ||
WithHash SMALLINT NOT NULL, | ||
HitColor CHAR NOT NULL, | ||
LocalEventTime TIMESTAMP NOT NULL, | ||
Age SMALLINT NOT NULL, | ||
Sex SMALLINT NOT NULL, | ||
Income SMALLINT NOT NULL, | ||
Interests SMALLINT NOT NULL, | ||
Robotness SMALLINT NOT NULL, | ||
RemoteIP INTEGER NOT NULL, | ||
WindowName INTEGER NOT NULL, | ||
OpenerName INTEGER NOT NULL, | ||
HistoryLength SMALLINT NOT NULL, | ||
BrowserLanguage TEXT NOT NULL, | ||
BrowserCountry TEXT NOT NULL, | ||
SocialNetwork TEXT NOT NULL, | ||
SocialAction TEXT NOT NULL, | ||
HTTPError SMALLINT NOT NULL, | ||
SendTiming INTEGER NOT NULL, | ||
DNSTiming INTEGER NOT NULL, | ||
ConnectTiming INTEGER NOT NULL, | ||
ResponseStartTiming INTEGER NOT NULL, | ||
ResponseEndTiming INTEGER NOT NULL, | ||
FetchTiming INTEGER NOT NULL, | ||
SocialSourceNetworkID SMALLINT NOT NULL, | ||
SocialSourcePage TEXT NOT NULL, | ||
ParamPrice BIGINT NOT NULL, | ||
ParamOrderID TEXT NOT NULL, | ||
ParamCurrency TEXT NOT NULL, | ||
ParamCurrencyID SMALLINT NOT NULL, | ||
OpenstatServiceName TEXT NOT NULL, | ||
OpenstatCampaignID TEXT NOT NULL, | ||
OpenstatAdID TEXT NOT NULL, | ||
OpenstatSourceID TEXT NOT NULL, | ||
UTMSource TEXT NOT NULL, | ||
UTMMedium TEXT NOT NULL, | ||
UTMCampaign TEXT NOT NULL, | ||
UTMContent TEXT NOT NULL, | ||
UTMTerm TEXT NOT NULL, | ||
FromTag TEXT NOT NULL, | ||
HasGCLID SMALLINT NOT NULL, | ||
RefererHash BIGINT NOT NULL, | ||
URLHash BIGINT NOT NULL, | ||
CLID INTEGER NOT NULL, | ||
PRIMARY KEY (CounterID, EventDate, UserID, EventTime, WatchID) | ||
) | ||
ENGINE = CnchMergeTree() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
--- | ||
version: "3" | ||
|
||
# NOTE: | ||
# - you cannot use network_mode=host (to optimize out network overhead) because hadoop does not work without DNS. | ||
|
||
services: | ||
# hdfs / remote fs | ||
hdfs: | ||
image: gchq/hdfs:3.3 | ||
command: namenode | ||
container_name: hdfs-namenode | ||
ports: | ||
- 9871:9870 | ||
environment: | ||
HADOOP_CONF_DIR: /etc/hadoop/conf | ||
volumes: | ||
- ./hdfs:/etc/hadoop/conf:ro | ||
- /var/log/hadoop | ||
- /data1 | ||
- /data2 | ||
|
||
hdfs-datanode: | ||
depends_on: | ||
- hdfs | ||
image: gchq/hdfs:3.3 | ||
command: datanode | ||
container_name: hdfs-datanode | ||
environment: | ||
HADOOP_CONF_DIR: /etc/hadoop/conf | ||
volumes: | ||
- ./hdfs:/etc/hadoop/conf:ro | ||
- /var/log/hadoop | ||
- /data1 | ||
- /data2 | ||
|
||
# foundation db / catalog | ||
fdb: | ||
image: foundationdb/foundationdb:7.1.24 | ||
environment: | ||
FDB_NETWORKING_MODE: container | ||
FDB_COORDINATOR_PORT: 4550 | ||
FDB_PORT: 4550 | ||
container_name: fdb-0 | ||
|
||
# byconity: | ||
tso: | ||
image: byconity/byconity:0.1.0-GA | ||
environment: | ||
PATH: /usr/sbin:/usr/bin:/sbin:/bin:/opt/byconity/bin | ||
command: bash -c "fdbcli -C /config/fdb.cluster --exec \"configure new single ssd\"; tso-server --config-file /config/tso.yml" | ||
depends_on: | ||
- fdb | ||
- hdfs | ||
volumes: | ||
- ./simple/:/config/:ro | ||
container_name: tso-0 | ||
|
||
server: | ||
image: byconity/byconity:0.1.0-GA | ||
environment: | ||
PATH: /usr/sbin:/usr/bin:/sbin:/bin:/opt/byconity/bin | ||
command: bash -c "curl --retry 10 --retry-delay 5 --retry-connrefused --retry-max-time 120 --max-time 120 tso-0:18845 && clickhouse-server --config-file /config/server.yml" | ||
depends_on: | ||
- tso | ||
- hdfs | ||
ports: | ||
- "9000:52145" | ||
- "8124:21557" | ||
container_name: server-0 | ||
volumes: | ||
- ./simple/:/config/:ro | ||
|
||
worker-write: | ||
image: byconity/byconity:0.1.0-GA | ||
environment: | ||
PATH: /usr/sbin:/usr/bin:/sbin:/bin:/opt/byconity/bin | ||
command: bash -c "curl --retry 10 --retry-delay 5 --retry-connrefused --retry-max-time 120 --max-time 120 server:21557 && clickhouse-server --config-file /config/worker.yml" | ||
depends_on: | ||
- server | ||
container_name: worker-write-0 | ||
volumes: | ||
- ./simple/:/config/:ro | ||
|
||
worker-default: | ||
image: byconity/byconity:0.1.0-GA | ||
environment: | ||
PATH: /usr/sbin:/usr/bin:/sbin:/bin:/opt/byconity/bin | ||
command: bash -c "curl --retry 10 --retry-delay 5 --retry-connrefused --retry-max-time 120 --max-time 120 server:21557 && clickhouse-server --config-file /config/worker.yml" | ||
depends_on: | ||
- server | ||
container_name: worker-default-0 | ||
volumes: | ||
- ./simple/:/config/:ro | ||
|
||
daemon-manager: | ||
image: byconity/byconity:0.1.0-GA | ||
environment: | ||
PATH: /usr/sbin:/usr/bin:/sbin:/bin:/opt/byconity/bin | ||
command: bash -c "curl --retry 10 --retry-delay 5 --retry-connrefused --retry-max-time 120 --max-time 120 server:21557 && daemon-manager --config-file ./config/daemon-manager.yml" | ||
depends_on: | ||
- server | ||
container_name: daemon-manager-0 | ||
volumes: | ||
- ./simple/:/config/:ro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> | ||
<configuration> | ||
<property> | ||
<name>fs.defaultFS</name> | ||
<value>hdfs://hdfs-namenode:9000</value> | ||
</property> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
set -e -x | ||
docker exec hdfs-namenode hdfs dfs -mkdir /user | ||
docker exec hdfs-namenode hdfs dfs -mkdir /user/clickhouse | ||
docker exec hdfs-namenode hdfs dfs -chown clickhouse /user/clickhouse | ||
docker exec hdfs-namenode hdfs dfs -chmod -R 775 /user/clickhouse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> | ||
<configuration> | ||
<property><name>dfs.namenode.name.dir</name><value>/data1/dfs/name,/data2/dfs/name</value></property> | ||
<property><name>dfs.datanode.data.dir</name><value>/data1/dfs/data,/data2/dfs/data</value></property> | ||
<property><name>dfs.replication</name><value>1</value></property> | ||
<property><name>dfs.namenode.http-address</name><value>0.0.0.0:9870</value></property> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
log4j.rootLogger=INFO, stdout | ||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender | ||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout | ||
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n |
Oops, something went wrong.