Skip to content

Commit

Permalink
Merge pull request #201 from ClickHouse/pchhetri/revert-selectdb-dori…
Browse files Browse the repository at this point in the history
…s-pr

Revert "SelectDB update results on metal machine"
  • Loading branch information
alexey-milovidov authored Jun 17, 2024
2 parents 01dc48e + bc62d61 commit c110129
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 128 deletions.
25 changes: 13 additions & 12 deletions doris/benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ set -ex
# Install
ROOT=$(pwd)


if [[ -n "$1" ]]; then
url="$1"
else
url='https://doris-clickbench.oss-ap-southeast-1.aliyuncs.com/doris-linux_x64.tar.gz'
url='https://doris-release.s3.us-east-1.amazonaws.com/1.2/doris-1.2.0.alpha-x86_64.tar.gz'
fi
# Download
file_name="$(basename ${url})"
Expand All @@ -25,27 +24,31 @@ dir_name="${file_name/.tar.gz/}"

# Try to stop SelectDB and remove it first if execute this script multiple times
set +e
"$dir_name"/output/fe/bin/stop_fe.sh
"$dir_name"/output/be/bin/stop_be.sh
"$dir_name"/fe/bin/stop_fe.sh
"$dir_name"/be/bin/stop_be.sh
rm -rf "$dir_name"
set -e

# Uncompress
mkdir "$dir_name"
tar zxf "$file_name" -C "$dir_name"
DORIS_HOME="$ROOT/$dir_name/output"
DORIS_HOME="$ROOT/$dir_name/"
export DORIS_HOME

# Install dependencies
sudo yum install -y java-17-amazon-corretto.x86_64
sudo dnf -y localinstall https://dev.mysql.com/get/mysql80-community-release-el9-4.noarch.rpm
sudo dnf -y install mysql mysql-community-client
export JAVA_HOME="/usr/lib/jvm/java-17-amazon-corretto.x86_64/"
sudo yum install -y mysql java-11-amazon-corretto.x86_64
export JAVA_HOME="/usr/lib/jvm/java-11-amazon-corretto.x86_64/"
export PATH=$JAVA_HOME/bin:$PATH

IPADDR=$(hostname -i)

# Start Frontend
echo "priority_networks = ${IPADDR}/24" >>"$DORIS_HOME"/fe/conf/fe_custom.conf
"$DORIS_HOME"/fe/bin/start_fe.sh --daemon

# Start Backend
echo "priority_networks = ${IPADDR}/24
load_process_max_memory_limit_percent=80" >>"$DORIS_HOME"/be/conf/be_custom.conf
sudo sysctl -w vm.max_map_count=2000000
"$DORIS_HOME"/be/bin/start_be.sh --daemon

Expand All @@ -62,7 +65,7 @@ while true; do
done

# Setup cluster, add Backend to cluster
mysql -h 127.0.0.1 -P9030 -uroot -e "ALTER SYSTEM ADD BACKEND '127.0.0.1:9050' "
mysql -h 127.0.0.1 -P9030 -uroot -e "ALTER SYSTEM ADD BACKEND '${IPADDR}:9050' "

# Wait for Backend ready
while true; do
Expand All @@ -76,8 +79,6 @@ while true; do
fi
done

echo 3 | sudo tee /proc/sys/vm/drop_caches >/dev/null

# Create Database and table
mysql -h 127.0.0.1 -P9030 -uroot -e "CREATE DATABASE hits"
sleep 5
Expand Down
55 changes: 0 additions & 55 deletions doris/results/c6a.metal.json

This file was deleted.

24 changes: 12 additions & 12 deletions selectdb/benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ set -ex
# Install
ROOT=$(pwd)


if [[ -n "$1" ]]; then
url="$1"
else
url='https://doris-clickbench.oss-ap-southeast-1.aliyuncs.com/selectdb-linux_x64.tar.gz'
url='https://selectdb.s3.amazonaws.com/selectdb-2.0.0-linux_x64.tar.gz'
fi
# Download
file_name="$(basename ${url})"
Expand All @@ -25,27 +24,30 @@ dir_name="${file_name/.tar.gz/}"

# Try to stop SelectDB and remove it first if execute this script multiple times
set +e
"$dir_name"/output/fe/bin/stop_fe.sh
"$dir_name"/output/be/bin/stop_be.sh
"$dir_name"/fe/bin/stop_fe.sh
"$dir_name"/be/bin/stop_be.sh
rm -rf "$dir_name"
set -e

# Uncompress
mkdir "$dir_name"
tar zxf "$file_name" -C "$dir_name"
DORIS_HOME="$ROOT/$dir_name/output"
DORIS_HOME="$ROOT/$dir_name/"
export DORIS_HOME

# Install dependencies
sudo yum install -y java-17-amazon-corretto.x86_64
sudo dnf -y localinstall https://dev.mysql.com/get/mysql80-community-release-el9-4.noarch.rpm
sudo dnf -y install mysql mysql-community-client
export JAVA_HOME="/usr/lib/jvm/java-17-amazon-corretto.x86_64/"
sudo yum install -y mysql java-11-amazon-corretto.x86_64
export JAVA_HOME="/usr/lib/jvm/java-11-amazon-corretto.x86_64/"
export PATH=$JAVA_HOME/bin:$PATH

IPADDR=$(hostname -i)

# Start Frontend
echo "priority_networks = ${IPADDR}/24" >>"$DORIS_HOME"/fe/conf/fe_custom.conf
"$DORIS_HOME"/fe/bin/start_fe.sh --daemon

# Start Backend
echo "priority_networks = ${IPADDR}/24" >>"$DORIS_HOME"/be/conf/be_custom.conf
sudo sysctl -w vm.max_map_count=2000000
"$DORIS_HOME"/be/bin/start_be.sh --daemon

Expand All @@ -62,7 +64,7 @@ while true; do
done

# Setup cluster, add Backend to cluster
mysql -h 127.0.0.1 -P9030 -uroot -e "ALTER SYSTEM ADD BACKEND '127.0.0.1:9050' "
mysql -h 127.0.0.1 -P9030 -uroot -e "ALTER SYSTEM ADD BACKEND '${IPADDR}:9050' "

# Wait for Backend ready
while true; do
Expand All @@ -76,8 +78,6 @@ while true; do
fi
done

echo 3 | sudo tee /proc/sys/vm/drop_caches >/dev/null

# Create Database and table
mysql -h 127.0.0.1 -P9030 -uroot -e "CREATE DATABASE hits"
sleep 5
Expand Down
4 changes: 2 additions & 2 deletions selectdb/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 192
PROPERTIES ( "replication_num"="1");
DISTRIBUTED BY HASH(UserID) BUCKETS 16
PROPERTIES ( "replication_num"="1");
94 changes: 47 additions & 47 deletions selectdb/results/c6a.metal.json
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
{
"system": "SelectDB",
"date": "2024-04-26",
"date": "2022-10-08",
"machine": "c6a.metal, 500gb gp2",
"cluster_size": 1,
"comment": "",
"tags": ["C++", "column-oriented", "MySQL compatible"],
"load_time": 487,
"data_size": 17358223498,
"tags": ["C++", "column-oriented", "MySQL compatible", "ClickHouse derivative"],
"load_time": 369,
"data_size": 17123069872,
"result": [
[0.02,0.03,0.02],
[0.05,0.02,0.02],
[0.38,0.03,0.03],
[1.67,0.04,0.03],
[0.08,0.09,0.07],
[1.66,0.20,0.17],
[0.01,0.01,0.01],
[0.02,0.02,0.02],
[0.21,0.09,0.10],
[0.12,0.12,0.12],
[0.17,0.03,0.03],
[0.59,0.03,0.03],
[0.18,0.15,0.18],
[0.22,0.21,0.20],
[0.20,0.18,0.20],
[0.10,0.10,0.12],
[0.29,0.28,0.26],
[0.07,0.06,0.07],
[0.59,0.42,0.44],
[0.02,0.00,0.00],
[11.27,0.09,0.09],
[0.05,0.05,0.05],
[10.37,0.08,0.08],
[0.36,0.04,0.04],
[0.02,0.03,0.03],
[0.05,0.05,0.04],
[0.03,0.02,0.02],
[0.24,0.21,0.21],
[9.42,0.97,0.96],
[0.07,0.04,0.04],
[0.89,0.09,0.09],
[2.81,0.12,0.11],
[0.72,0.75,0.71],
[1.00,0.98,0.95],
[0.97,0.99,0.92],
[0.13,0.12,0.12],
[0.05,0.02,0.03],
[0.03,0.02,0.02],
[0.08,0.02,0.03],
[0.14,0.05,0.05],
[0.42,0.03,0.02],
[0.35,0.03,0.02],
[0.02,0.02,0.01]
[0.01,0.01,0.00],
[0.03,0.02,0.02],
[0.04,0.04,0.05],
[0.07,0.06,0.07],
[0.17,0.15,0.17],
[0.30,0.30,0.28],
[0.01,0.01,0.01],
[0.02,0.02,0.02],
[0.32,0.33,0.34],
[0.36,0.37,0.34],
[0.11,0.11,0.25],
[0.11,0.11,0.10],
[0.23,0.23,0.23],
[0.55,0.75,0.89],
[0.32,0.30,0.31],
[0.18,0.16,0.19],
[0.53,0.51,0.50],
[0.20,0.20,0.20],
[1.04,1.06,1.30],
[0.01,0.01,0.00],
[0.59,0.60,0.66],
[0.48,0.34,0.34],
[0.38,0.38,0.37],
[0.25,0.26,0.25],
[0.04,0.04,0.04],
[0.15,0.15,0.14],
[0.04,0.04,0.04],
[0.55,0.54,0.54],
[1.39,1.36,1.34],
[0.68,0.69,0.76],
[0.24,0.23,0.23],
[0.21,0.20,0.21],
[1.45,1.53,2.05],
[1.84,1.92,1.67],
[1.83,1.75,1.90],
[0.19,0.22,0.20],
[0.03,0.04,0.04],
[0.03,0.03,0.03],
[0.02,0.02,0.02],
[0.06,0.06,0.06],
[0.02,0.02,0.02],
[0.02,0.02,0.02],
[0.02,0.02,0.02]
]
}

0 comments on commit c110129

Please sign in to comment.