Skip to content

Commit 745e07f

Browse files
authored
Merge pull request #170 from toschmidt/main
Update Umbra.
2 parents 4cc6b3a + 33223fe commit 745e07f

File tree

6 files changed

+121
-109
lines changed

6 files changed

+121
-109
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ <h2>Detailed Comparison</h2>
986986
const ratio = curr_timing !== null ? (constant_time_add + curr_timing) / (constant_time_add + baseline_timing) : null;
987987

988988
let td = document.createElement('td');
989-
td.appendChild(document.createTextNode(curr_timing !== null ? `${curr_timing.toFixed(2)}s (×${ratio.toFixed(2)})` : '☠'));
989+
td.appendChild(document.createTextNode(curr_timing !== null ? `${curr_timing.toFixed(3)}s (×${ratio.toFixed(2)})` : '☠'));
990990

991991
colorize(td, ratio);
992992
tr.appendChild(td);

umbra/benchmark.sh

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,32 @@
11
#!/bin/bash
22

3+
# Ubuntu
34
sudo apt-get update
45
sudo apt-get install -y postgresql-client gzip
56

7+
# Amazon Linux
8+
# yum install nc postgresql15
9+
10+
rm -rf hits.tsv
611
wget --no-verbose --continue 'https://datasets.clickhouse.com/hits_compatible/hits.tsv.gz'
712
gzip -d hits.tsv.gz
8-
chmod 777 ~ hits.tsv
13+
chmod 777 hits.tsv
914

1015
rm -rf umbra-24-01-03.tar.xz umbra
11-
wget --no-verbose --continue 'https://db.in.tum.de/~schmidt/umbra-24-01-03.tar.xz'
12-
tar -xf umbra-24-01-03.tar.xz
16+
wget --no-verbose --continue 'https://db.in.tum.de/~schmidt/umbra-2024-02-04.tar.xz'
17+
tar -xf umbra-2024-02-04.tar.xz
1318

1419
rm -rf db
1520
mkdir db
1621

1722
export USEDIRECTIO=1
1823
umbra/bin/sql -createdb db/umbra.db <<<"ALTER ROLE postgres WITH LOGIN SUPERUSER PASSWORD 'password';"
1924

20-
umbra/bin/server -createSSLFiles -certFile db/umbra.cert -keyFile db/umbra.pem -address 0.0.0.0 db/umbra.db &> umbra.log &
21-
sleep 1
22-
23-
psql -h /tmp -U postgres -t < create.sql
24-
psql -h /tmp -U postgres -t -c '\timing' -c "copy hits from 'hits.tsv' with (format text);"
25+
time umbra/bin/sql db/umbra.db create.sql
2526

2627
./run.sh 2>&1 | tee log.txt
2728

2829
du -bcs db/
2930

3031
cat log.txt | grep -oP 'Time: \d+\.\d+ ms' | sed -r -e 's/Time: ([0-9]+\.[0-9]+) ms/\1/' |
3132
awk '{ if (i % 3 == 0) { printf "[" }; printf $1 / 1000; if (i % 3 != 2) { printf "," } else { print "]," }; ++i; }'
32-
33-
killall server
34-
rm -rf hits.tsv

umbra/create.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,5 @@ create table hits (
107107
primary key (counterid, eventdate, userid, eventtime, watchid)
108108
) with (storage=columnar);
109109

110+
copy hits from 'hits.tsv' with (format text);
111+

umbra/results/c6a.4xlarge.json

Lines changed: 46 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,54 @@
11
{
22
"system": "Umbra",
3-
"date": "2024-02-02",
3+
"date": "2024-02-05",
44
"machine": "c6a.4xlarge, 500gb gp2",
55
"cluster_size": 1,
66
"tags": ["C++", "column-oriented", "PostgreSQL compatible"],
7-
"load_time": 1061.541,
8-
"data_size": 97767877183,
9-
"comment": "Segmentation fault in the middle of the test",
7+
"load_time": 505.913,
8+
"data_size": 36477780830,
109
"result": [
11-
[0.209086,0.011738,0.012061],
12-
[0.286187,0.011852,0.003785],
13-
[0.295367,0.135114,0.044054],
14-
[0.895806,0.679204,0.680544],
15-
[0.702135,0.674911,0.677621],
16-
[4.0023,0.87053,0.613472],
17-
[0.11274,0.078905,0.087947],
18-
[0.012837,0.014259,0.014031],
19-
[2.729,0.350596,0.341228],
20-
[0.696983,0.639588,0.669598],
21-
[0.339289,0.038563,0.043669],
22-
[0.209976,0.05442,0.054552],
23-
[0.430673,0.587625,0.768441],
24-
[0.932235,0.787055,0.780889],
25-
[1.28999,0.276156,0.297337],
26-
[0.202715,0.188756,0.192702],
27-
[0.530036,0.623375,0.608413],
28-
[0.511773,0.595728,0.563421],
29-
[1.42062,1.23585,1.192],
30-
[0.035434,0.013534,0.002076],
31-
[27.6449,14.838,12.4979],
32-
[11.6779,6.98523,4.57714],
33-
[28.1569,20.2952,10.3134],
34-
[153.316,153.2,154.629],
35-
[4.08712,1.57023,0.007798],
36-
[0.010185,0.010279,0.009956],
37-
[0.038879,0.038326,0.039015],
38-
[19.3634,7.89121,4.27973],
39-
[16.7256,10.2004,3.92077],
40-
[0.303641,0.054993,0.055398],
41-
[4.58902,0.332033,0.130684],
42-
[2.79384,1.48084,0.731322],
43-
[1.38139,1.6159,1.39411],
44-
[12.9291,9.05383,6.94245],
45-
[5.3304,5.41123,5.38231],
46-
[0.57384,0.254843,0.26153],
47-
[null,null,null],
48-
[null,null,null],
49-
[null,null,null],
50-
[null,null,null],
51-
[null,null,null],
52-
[null,null,null],
53-
[null,null,null]
10+
[0.030601,0.010866,0.011101],
11+
[0.33904,0.003698,0.003548],
12+
[0.645752,0.027352,0.026303],
13+
[0.719249,0.026984,0.026267],
14+
[0.727638,0.13537,0.133211],
15+
[2.0782,0.252201,0.255137],
16+
[0.338405,0.027632,0.027376],
17+
[0.309864,0.004253,0.004158],
18+
[1.61685,0.243389,0.263255],
19+
[3.01982,0.51973,0.524606],
20+
[1.08709,0.033062,0.032059],
21+
[1.46887,0.037179,0.035897],
22+
[2.0821,0.216457,0.215829],
23+
[3.92123,0.391088,0.395779],
24+
[2.48072,0.233635,0.21876],
25+
[0.765295,0.18303,0.18472],
26+
[3.88406,0.518152,0.541263],
27+
[3.8342,0.459446,0.476508],
28+
[7.15095,0.868591,0.862418],
29+
[0.674124,0.001847,0.001711],
30+
[18.1118,0.276739,0.27634],
31+
[21.1296,0.085333,0.083386],
32+
[35.0997,0.143139,0.141073],
33+
[122.717,118.44,116.582],
34+
[5.06751,0.009433,0.009186],
35+
[2.00484,0.00967,0.009456],
36+
[5.07312,0.038766,0.038597],
37+
[18.5152,0.269536,0.271205],
38+
[13.2374,2.55058,2.54432],
39+
[0.465351,0.022607,0.021943],
40+
[4.74853,0.13671,0.133112],
41+
[7.54723,0.204112,0.20182],
42+
[5.16736,1.29808,1.30411],
43+
[18.7229,1.4329,1.42222],
44+
[18.6891,1.47666,1.50563],
45+
[0.706767,0.194858,0.196652],
46+
[19.6567,0.01349,0.013724],
47+
[12.869,0.008628,0.009058],
48+
[1.23511,0.019785,0.019251],
49+
[34.5888,0.030742,0.027173],
50+
[0.503624,0.015988,0.015614],
51+
[0.288441,0.016486,0.016809],
52+
[3.59948,0.005299,0.005082]
5453
]
5554
}

umbra/results/c6a.metal.json

Lines changed: 46 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,54 @@
11
{
22
"system": "Umbra",
3-
"date": "2024-02-02",
3+
"date": "2024-02-05",
44
"machine": "c6a.metal, 500gb gp2",
55
"cluster_size": 1,
66
"tags": ["C++", "column-oriented", "PostgreSQL compatible"],
7-
"load_time": 432.753,
8-
"data_size": 104811147008,
9-
"comment": "It looks like it caches the data in memory, so the cold run results are incorrect. When I attempt to restart the server, it didn't start due to Segmentation fault.",
10-
"hide": true,
7+
"load_time": 224.253,
8+
"data_size": 37985071698,
119
"result": [
12-
[0.021103,0.014069,0.013841],
13-
[0.016241,0.015651,0.014398],
14-
[0.016433,0.019444,0.020535],
15-
[0.019118,0.022744,0.024424],
16-
[0.087463,0.116452,0.108668],
17-
[0.137545,0.143623,0.186976],
18-
[0.022322,0.018086,0.016414],
19-
[0.01743,0.01459,0.016214],
20-
[0.13723,0.145615,0.154707],
21-
[0.602285,0.614764,0.614396],
22-
[0.052353,0.055475,0.060419],
23-
[0.066132,0.068412,0.064872],
24-
[0.143196,0.178901,0.184571],
25-
[0.246122,0.285504,0.287426],
26-
[0.141119,0.172389,0.192775],
27-
[0.133211,0.124609,0.127582],
28-
[0.187477,0.219748,0.214415],
29-
[0.157956,0.187116,0.206256],
30-
[0.267917,0.337226,0.368166],
31-
[0.036774,0.019947,0.019828],
32-
[0.180748,0.088995,0.092018],
33-
[0.050261,0.056437,0.049835],
34-
[0.085935,0.08502,0.085339],
35-
[0.384127,0.283856,0.298186],
36-
[0.023887,0.025708,0.029501],
37-
[0.026465,0.022693,0.026492],
38-
[0.038385,0.043431,0.041599],
39-
[0.108191,0.095912,0.094505],
40-
[0.384992,0.369839,0.397459],
41-
[0.023921,0.019091,0.020356],
42-
[0.105971,0.103385,0.108233],
43-
[0.133147,0.127664,0.13925],
44-
[0.332119,0.366251,0.336184],
45-
[0.592509,0.652576,0.750742],
46-
[0.839829,0.668914,0.731482],
47-
[0.386763,0.131991,0.143009],
48-
[0.038283,0.033977,0.03078],
49-
[0.02885,0.021694,0.021639],
50-
[0.025068,0.018045,0.0184],
51-
[0.041889,0.041119,0.041826],
52-
[0.030802,0.021935,0.029303],
53-
[0.020964,0.022451,0.023481],
54-
[0.017381,0.020976,0.016867]
10+
[0.664962,0.014879,0.013896],
11+
[0.86897,0.014264,0.014216],
12+
[1.39741,0.019753,0.019888],
13+
[1.76497,0.022482,0.022356],
14+
[1.80665,0.067752,0.081],
15+
[3.30264,0.133111,0.156861],
16+
[0.785534,0.0208,0.022284],
17+
[0.870046,0.015516,0.016097],
18+
[2.66753,0.14137,0.15998],
19+
[4.51368,0.689448,0.726916],
20+
[2.19478,0.053639,0.059179],
21+
[2.57461,0.043306,0.045997],
22+
[3.30665,0.164523,0.175388],
23+
[4.92596,0.234748,0.273746],
24+
[3.70171,0.147932,0.182008],
25+
[1.851,0.094632,0.113691],
26+
[4.93327,0.243824,0.270263],
27+
[4.87596,0.226228,0.210788],
28+
[8.02335,0.306983,0.333771],
29+
[1.7747,0.017516,0.018097],
30+
[19.9175,0.097303,0.081085],
31+
[22.3949,0.049008,0.049755],
32+
[37.544,0.080033,0.08298],
33+
[127.193,0.237656,0.249893],
34+
[5.70401,0.02041,0.02158],
35+
[2.93367,0.020734,0.021048],
36+
[6.12096,0.034546,0.038698],
37+
[19.8159,0.110082,0.107088],
38+
[14.2241,0.336072,0.36425],
39+
[0.663126,0.019808,0.019036],
40+
[5.58319,0.082806,0.083288],
41+
[8.2146,0.106136,0.093486],
42+
[5.46498,0.342316,0.345279],
43+
[19.5496,0.631508,0.862308],
44+
[19.0042,0.849141,0.840496],
45+
[0.303872,0.119839,0.087051],
46+
[20.4269,0.029673,0.027629],
47+
[14.2258,0.02278,0.019946],
48+
[7.9593,0.012017,0.013362],
49+
[35.6343,0.039568,0.037401],
50+
[2.49159,0.014061,0.013447],
51+
[2.00332,0.012786,0.011437],
52+
[3.64226,0.016922,0.017801]
5553
]
5654
}

umbra/run.sh

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,24 @@ TRIES=3
55
cat queries.sql | while read query; do
66
sync
77
echo 3 | sudo tee /proc/sys/vm/drop_caches
8+
umbra/bin/server -createSSLFiles -certFile db/umbra.cert -keyFile db/umbra.pem -address 0.0.0.0 db/umbra.db &> umbra.log &
9+
10+
retry_count=0
11+
while [ $retry_count -lt 120 ]; do
12+
if nc -z localhost 5432; then
13+
break
14+
fi
15+
16+
retry_count=$((retry_count+1))
17+
sleep 1
18+
done
819

920
echo "$query";
1021
for i in $(seq 1 $TRIES); do
1122
psql -h /tmp -U postgres -t -c '\timing' -c "$query" | grep 'Time'
12-
done;
13-
done;
23+
done
24+
25+
26+
killall -9 server
27+
sleep 2
28+
done

0 commit comments

Comments
 (0)