Skip to content

Commit

Permalink
Merge branch 'main' of github.com:ClickHouse/ClickBench into versions…
Browse files Browse the repository at this point in the history
…-23.5
  • Loading branch information
qoega committed Aug 21, 2023
2 parents 0c96a29 + d3fadf2 commit 405eff8
Show file tree
Hide file tree
Showing 78 changed files with 1,267 additions and 640 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/generate-results.yml
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ We also introduced the [Hardware Benchmark](https://benchmark.clickhouse.com/har
- [ ] ScyllaDB
- [x] Elasticsearch
- [ ] Apache Ignite
- [ ] Motherduck
- [x] Infobright
- [ ] Actian Vector
- [ ] Manticore Search
Expand All @@ -272,6 +273,7 @@ We also introduced the [Hardware Benchmark](https://benchmark.clickhouse.com/har
- [ ] YDB
- [ ] OceanBase
- [ ] Boilingdata
- [x] Byteconity

By default, all tests are run on c6a.4xlarge VM in AWS with 500 GB gp2.

Expand Down
2 changes: 1 addition & 1 deletion aurora-mysql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ mysql -h "${HOST}" -u admin --password="${PASSWORD}" -e "CREATE DATABASE test"
Load the data

```
wget --continue 'https://datasets.clickhouse.com/hits_compatible/hits.tsv.gz'
wget --no-verbose --continue 'https://datasets.clickhouse.com/hits_compatible/hits.tsv.gz'
gzip -d hits.tsv.gz
mysql -h "${HOST}" -u admin --password="${PASSWORD}" test < create.sql
Expand Down
2 changes: 1 addition & 1 deletion aurora-postgresql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ chmod 400 .pgpass
Load the data

```
wget --continue 'https://datasets.clickhouse.com/hits_compatible/hits.tsv.gz'
wget --no-verbose --continue 'https://datasets.clickhouse.com/hits_compatible/hits.tsv.gz'
gzip -d hits.tsv.gz
psql -U postgres -h "${HOST}" -t -c 'CREATE DATABASE test'
Expand Down
2 changes: 1 addition & 1 deletion bigquery/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ source .bashrc

Load the data:
```
wget --continue 'https://datasets.clickhouse.com/hits_compatible/hits.csv.gz'
wget --no-verbose --continue 'https://datasets.clickhouse.com/hits_compatible/hits.csv.gz'
gzip -d hits.csv.gz
time bq load --source_format CSV --allow_quoted_newlines=1 test.hits hits.csv
Expand Down
17 changes: 17 additions & 0 deletions byconity/README.md
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.
24 changes: 24 additions & 0 deletions byconity/benchmark.sh
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
111 changes: 111 additions & 0 deletions byconity/create.sql
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()
105 changes: 105 additions & 0 deletions byconity/docker-compose.yml
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
8 changes: 8 additions & 0 deletions byconity/hdfs/core-site.xml
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>
6 changes: 6 additions & 0 deletions byconity/hdfs/create_users.sh
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
8 changes: 8 additions & 0 deletions byconity/hdfs/hdfs-site.xml
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>
4 changes: 4 additions & 0 deletions byconity/hdfs/log4j.properties
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
Loading

0 comments on commit 405eff8

Please sign in to comment.