Skip to content

Commit 656ba67

Browse files
Merge pull request #472 from ClickHouse/various-tunes-2
Various tunes (2)
2 parents 35af641 + 538c36f commit 656ba67

15 files changed

Lines changed: 51 additions & 31 deletions

File tree

aurora-postgresql/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ gzip -d -f hits.tsv.gz
4141
4242
psql -U postgres -h "${FQDN}" -t -c 'CREATE DATABASE test'
4343
psql -U postgres -h "${FQDN}" test -t < create.sql
44-
psql -U postgres -h "${FQDN}" test -t -c '\timing' -c "\\copy hits FROM 'hits.tsv'"
44+
echo -n "Load time: "
45+
command time -f '%e' psql -U postgres -h "${FQDN}" test -t -c "\\copy hits FROM 'hits.tsv'"
4546
```
4647

4748
> COPY 99997497

cedardb/benchmark.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ until pg_isready -h localhost --dbname postgres -U postgres > /dev/null 2>&1; do
2626
# create table and ingest data
2727
PGPASSWORD=test psql -h localhost -U postgres -t < create.sql
2828
echo "Inserting data..."
29-
PGPASSWORD=test time psql -h localhost -U postgres -t -c '\timing' -c "COPY hits FROM '/data/hits.tsv';"
29+
echo -n "Load time: "
30+
PGPASSWORD=test command time -f '%e' psql -h localhost -U postgres -t -c "COPY hits FROM '/data/hits.tsv';"
3031

3132
# get ingested data size
32-
echo "data size after ingest:"
33-
PGPASSWORD=test psql -h localhost -U postgres -t -c '\timing' -c "SELECT pg_total_relation_size('hits');"
33+
echo -n "Data size: "
34+
PGPASSWORD=test psql -h localhost -U postgres -t -c "SELECT pg_total_relation_size('hits');"
3435

3536
# run benchmark
3637
echo "running benchmark..."

citus/benchmark.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ chmod 400 .pgpass
1515

1616
psql -U postgres -h localhost -d postgres --no-password -t -c 'CREATE DATABASE test'
1717
psql -U postgres -h localhost -d postgres --no-password test -t < create.sql
18-
psql -U postgres -h localhost -d postgres --no-password test -t -c '\timing' -c "\\copy hits FROM 'hits.tsv'"
18+
echo -n "Load time: "
19+
command time -f '%e' psql -U postgres -h localhost -d postgres --no-password test -t -c "\\copy hits FROM 'hits.tsv'"
1920

2021
# COPY 99997497
2122
# Time: 1579203.482 ms (26:19.203)

cratedb/benchmark.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ chmod 444 /tmp/hits.tsv
4040

4141
psql -U crate -h localhost --no-password -t < $CREATE_FILE
4242

43-
psql -U crate -h localhost --no-password -t -c '\timing' -c "
43+
echo -n "Load time: "
44+
command time -f '%e' psql -U crate -h localhost --no-password -t -c "
4445
COPY hits
4546
FROM 'file:///tmp/hits.tsv'
4647
WITH

duckdb-memory/benchmark.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@ cat log.txt | grep -P '^\d|Killed|Segmentation' | head -n1
2121

2222
cat log.txt | grep -P '^\d|Killed|Segmentation' | tail -n+2 | sed -r -e 's/^.*(Killed|Segmentation).*$/null\nnull\nnull/' |
2323
awk '{ if (i % 3 == 0) { printf "[" }; printf $1; if (i % 3 != 2) { printf "," } else { print "]," }; ++i; }'
24+
25+
echo -n "Data size: "
26+
grep -F 'Maximum resident set size' log.txt | grep -o -P '\d+$' | awk '{ print $1 * 1024 }'

hydra/benchmark.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ IFS=$'\n\t'
77
#sudo apt-get install -y postgresql-client
88

99
# load data
10-
psql "$DATABASE_URL" -c '\timing on' -t -f create.sql
10+
echo -n "Load time: "
11+
command time -f '%e' psql "$DATABASE_URL" -t -f create.sql
1112

1213
# run test
1314
DATABASE_URL="$DATABASE_URL" ./run.sh 2>&1 | tee log.txt

infobright/benchmark.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ sudo docker exec mysql_ib du -bcs /mnt/mysql_data/ /usr/local/infobright-4.0.7-x
3232

3333
# 13 760 341 294
3434

35-
./run.sh 2>&1 | log
35+
./run.sh 2>&1 | tee log.txt
3636

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

oxla/benchmark.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@ export PGCLIENTENCODING=UTF8
2727

2828
PGPASSWORD=oxla psql -h localhost -U oxla -t < create.sql
2929
echo "Insert data."
30-
PGPASSWORD=oxla psql -h localhost -U oxla -t -c '\timing' -c "COPY hits FROM '/data/hits.csv';"
30+
echo -n "Load time: "
31+
PGPASSWORD=oxla command time -f '%e' psql -h localhost -U oxla -t -c "COPY hits FROM '/data/hits.csv';"
3132

3233
# get ingested data size
33-
echo "data size after ingest:"
34-
PGPASSWORD=oxla psql -h localhost -U oxla -t -c '\timing' -c "SELECT pg_total_relation_size('hits');"
34+
echo -n "Data size: "
35+
PGPASSWORD=oxla psql -h localhost -U oxla -t -c "SELECT pg_total_relation_size('hits');"
3536

3637
# run benchmark
3738
echo "running benchmark..."

pg_duckdb-motherduck/load.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,5 @@ PARQUET_FILE='https://datasets.clickhouse.com/hits_compatible/hits.parquet'
99

1010
echo "Loading data"
1111
(
12-
echo "\timing"
13-
cat create.sql |
14-
sed -e "s=REPLACE_SCHEMA=$DATABASE=g" -e "s=REPLACE_PARQUET_FILE=$PARQUET_FILE=g"
15-
) | psql --no-psqlrc --tuples-only $CONNECTION | grep 'Time'
12+
cat create.sql | sed -e "s=REPLACE_SCHEMA=$DATABASE=g" -e "s=REPLACE_PARQUET_FILE=$PARQUET_FILE=g"
13+
) | psql --no-psqlrc --tuples-only $CONNECTION

pgpro_tam/benchmark.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ if [ "$1" == "parquet_fd_parall" ] ; then
5252
#insert data in parallel; not ordered insert is much faster, but breaks query performance
5353
sudo docker exec pgpro_tam bash -c "time cat /tmp/hits.tsv | parallel -l 2000000 -j 50 -N1 -k --spreadstdin 'psql -U postgres -t -c \"copy hits FROM STDIN\"'"
5454
else
55-
psql -h 127.0.0.1 -U postgres -t -c '\timing' -c "COPY hits FROM '/tmp/hits.tsv'"
55+
echo -n "Load time: "
56+
command time -f '%e' psql -h 127.0.0.1 -U postgres -t -c "COPY hits FROM '/tmp/hits.tsv'"
5657
fi
5758

5859
#run benchmark

0 commit comments

Comments
 (0)