From c1006d6433936f8bc41956848d9a9823f6972f1f Mon Sep 17 00:00:00 2001 From: Onder KALACI Date: Wed, 5 Jun 2024 13:43:19 +0300 Subject: [PATCH 1/3] Add Crunchy Bridge for Analytics Adding results for Crunchy Bridge for Analytics (a managed service): https://www.crunchydata.com/products/crunchy-bridge-for-analytics --- crunchy-bridge-for-analytics/README.md | 38 ++++++ crunchy-bridge-for-analytics/create.sql | 118 ++++++++++++++++++ crunchy-bridge-for-analytics/queries.sql | 43 +++++++ .../results/crunchy-bridge-analytics-256.json | 56 +++++++++ crunchy-bridge-for-analytics/run.sh | 19 +++ index.html | 1 + 6 files changed, 275 insertions(+) create mode 100644 crunchy-bridge-for-analytics/README.md create mode 100644 crunchy-bridge-for-analytics/create.sql create mode 100644 crunchy-bridge-for-analytics/queries.sql create mode 100644 crunchy-bridge-for-analytics/results/crunchy-bridge-analytics-256.json create mode 100755 crunchy-bridge-for-analytics/run.sh diff --git a/crunchy-bridge-for-analytics/README.md b/crunchy-bridge-for-analytics/README.md new file mode 100644 index 00000000..0d769217 --- /dev/null +++ b/crunchy-bridge-for-analytics/README.md @@ -0,0 +1,38 @@ + +[Crunchy Bridge for Analytics](https://docs.crunchybridge.com/analytics) allows users to query parquet files on S3 directly. It also automatically downloads files accessed to a local disk to avoid network delays. + +To best represent the default production behavior of our system, we benchmark the `(Parquet, Local)` scenario where: +- 'Parquet' we directly use `hits.parquet` from `s3://clickhouse-public-datasets` +- 'Local': We load the `hits.parquet` file to a local disk drive on the machine running the service. In this scenario, it is expected that 'cold run' and 'hot run' results will be similar + +1) Setup the cluster: + +- Go to https://crunchybridge.com/ +- Click `Create Cluster` -> `Create Analytics Cluster` +- Choose Region (`eu-central-1`) where `s3://clickhouse-public-datasets/hits_compatible/hits.parquet` is +- Click `Analytics-256` +- Click `Create Cluster` +- Step Two: Set Up Analytics Credentials: Click "Skip for now" +- Wait until the state of the machine becomes "Running" + +2) Get the connection string: + +- Click the "Connection" tab from the left menu +- Pick role: application, Format psql +- Click "Copy" + +3) Set the `CONNCMD` that we are going to use with what you copied in (2): +```bash +export CONNCMD='psql postgres://application:XXXX@XXXXX.postgresbridge.com:5432/postgres' +``` + +4) Create the table, load the data: +```bash + $CONNCMD -c '\timing' -f create.sql +``` + + +5) Run the script: +```bash + ./run.sh + ``` diff --git a/crunchy-bridge-for-analytics/create.sql b/crunchy-bridge-for-analytics/create.sql new file mode 100644 index 00000000..a7b86908 --- /dev/null +++ b/crunchy-bridge-for-analytics/create.sql @@ -0,0 +1,118 @@ +-- Auto-infer the columns from the hits.parquet +CREATE FOREIGN TABLE hits_auto () SERVER crunchy_lake_analytics OPTIONS (path 's3://clickhouse-public-datasets/hits_compatible/hits.parquet'); + +-- To show representative behavior of Crunchy Bridge for Analytics, we point to the +-- official hits.parquet file on S3 and load it to a local disk before running the queries +SELECT * FROM crunchy_file_cache.add('s3://clickhouse-public-datasets/hits_compatible/hits.parquet'); + +-- hits.parquet uses integers for date and time, +-- which most databases cannot pass directly +-- to date/time functions. Hence we convert them to date and +-- timestamptz in a view that wraps around the table +CREATE OR REPLACE VIEW hits as SELECT + WatchID, + JavaEnable, + Title, + GoodEvent, + to_timestamp(EventTime) AS EventTime, + to_date(EventDate) AS EventDate, + CounterID, + ClientIP, + RegionID, + UserID, + CounterClass, + OS, + UserAgent, + URL, + Referer, + IsRefresh, + RefererCategoryID, + RefererRegionID, + URLCategoryID, + URLRegionID, + ResolutionWidth, + ResolutionHeight, + ResolutionDepth, + FlashMajor, + FlashMinor, + FlashMinor2, + NetMajor, + NetMinor, + UserAgentMajor, + UserAgentMinor, + CookieEnable, + JavascriptEnable, + IsMobile, + MobilePhone, + MobilePhoneModel, + Params, + IPNetworkID, + TraficSourceID, + SearchEngineID, + SearchPhrase, + AdvEngineID, + IsArtifical, + WindowClientWidth, + WindowClientHeight, + ClientTimeZone, + ClientEventTime, + SilverlightVersion1, + SilverlightVersion2, + SilverlightVersion3, + SilverlightVersion4, + PageCharset, + CodeVersion, + IsLink, + IsDownload, + IsNotBounce, + FUniqID, + OriginalURL, + HID, + IsOldCounter, + IsEvent, + IsParameter, + DontCountHits, + WithHash, + HitColor, + LocalEventTime, + Age, + Sex, + Income, + Interests, + Robotness, + RemoteIP, + WindowName, + OpenerName, + HistoryLength, + BrowserLanguage, + BrowserCountry, + SocialNetwork, + SocialAction, + HTTPError, + SendTiming, + DNSTiming, + ConnectTiming, + ResponseStartTiming, + ResponseEndTiming, + FetchTiming, + SocialSourceNetworkID, + SocialSourcePage, + ParamPrice, + ParamOrderID, + ParamCurrency, + ParamCurrencyID, + OpenstatServiceName, + OpenstatCampaignID, + OpenstatAdID, + OpenstatSourceID, + UTMSource, + UTMMedium, + UTMCampaign, + UTMContent, + UTMTerm, + FromTag, + HasGCLID, + RefererHash, + URLHash, + CLID +from hits_auto; diff --git a/crunchy-bridge-for-analytics/queries.sql b/crunchy-bridge-for-analytics/queries.sql new file mode 100644 index 00000000..2fed42e5 --- /dev/null +++ b/crunchy-bridge-for-analytics/queries.sql @@ -0,0 +1,43 @@ +SELECT COUNT(*) FROM hits; +SELECT COUNT(*) FROM hits WHERE AdvEngineID <> 0; +SELECT SUM(AdvEngineID), COUNT(*), AVG(ResolutionWidth) FROM hits; +SELECT AVG(UserID) FROM hits; +SELECT COUNT(DISTINCT UserID) FROM hits; +SELECT COUNT(DISTINCT SearchPhrase) FROM hits; +SELECT MIN(EventDate), MAX(EventDate) FROM hits; +SELECT AdvEngineID, COUNT(*) FROM hits WHERE AdvEngineID <> 0 GROUP BY AdvEngineID ORDER BY COUNT(*) DESC; +SELECT RegionID, COUNT(DISTINCT UserID) AS u FROM hits GROUP BY RegionID ORDER BY u DESC LIMIT 10; +SELECT RegionID, SUM(AdvEngineID), COUNT(*) AS c, AVG(ResolutionWidth), COUNT(DISTINCT UserID) FROM hits GROUP BY RegionID ORDER BY c DESC LIMIT 10; +SELECT MobilePhoneModel, COUNT(DISTINCT UserID) AS u FROM hits WHERE MobilePhoneModel <> '' GROUP BY MobilePhoneModel ORDER BY u DESC LIMIT 10; +SELECT MobilePhone, MobilePhoneModel, COUNT(DISTINCT UserID) AS u FROM hits WHERE MobilePhoneModel <> '' GROUP BY MobilePhone, MobilePhoneModel ORDER BY u DESC LIMIT 10; +SELECT SearchPhrase, COUNT(*) AS c FROM hits WHERE SearchPhrase <> '' GROUP BY SearchPhrase ORDER BY c DESC LIMIT 10; +SELECT SearchPhrase, COUNT(DISTINCT UserID) AS u FROM hits WHERE SearchPhrase <> '' GROUP BY SearchPhrase ORDER BY u DESC LIMIT 10; +SELECT SearchEngineID, SearchPhrase, COUNT(*) AS c FROM hits WHERE SearchPhrase <> '' GROUP BY SearchEngineID, SearchPhrase ORDER BY c DESC LIMIT 10; +SELECT UserID, COUNT(*) FROM hits GROUP BY UserID ORDER BY COUNT(*) DESC LIMIT 10; +SELECT UserID, SearchPhrase, COUNT(*) FROM hits GROUP BY UserID, SearchPhrase ORDER BY COUNT(*) DESC LIMIT 10; +SELECT UserID, SearchPhrase, COUNT(*) FROM hits GROUP BY UserID, SearchPhrase LIMIT 10; +SELECT UserID, extract(minute FROM EventTime) AS m, SearchPhrase, COUNT(*) FROM hits GROUP BY UserID, m, SearchPhrase ORDER BY COUNT(*) DESC LIMIT 10; +SELECT UserID FROM hits WHERE UserID = 435090932899640449; +SELECT COUNT(*) FROM hits WHERE URL LIKE '%google%'; +SELECT SearchPhrase, MIN(URL), COUNT(*) AS c FROM hits WHERE URL LIKE '%google%' AND SearchPhrase <> '' GROUP BY SearchPhrase ORDER BY c DESC LIMIT 10; +SELECT SearchPhrase, MIN(URL), MIN(Title), COUNT(*) AS c, COUNT(DISTINCT UserID) FROM hits WHERE Title LIKE '%Google%' AND URL NOT LIKE '%.google.%' AND SearchPhrase <> '' GROUP BY SearchPhrase ORDER BY c DESC LIMIT 10; +SELECT * FROM hits WHERE URL LIKE '%google%' ORDER BY EventTime LIMIT 10; +SELECT SearchPhrase FROM hits WHERE SearchPhrase <> '' ORDER BY EventTime LIMIT 10; +SELECT SearchPhrase FROM hits WHERE SearchPhrase <> '' ORDER BY SearchPhrase LIMIT 10; +SELECT SearchPhrase FROM hits WHERE SearchPhrase <> '' ORDER BY EventTime, SearchPhrase LIMIT 10; +SELECT CounterID, AVG(length(URL)) AS l, COUNT(*) AS c FROM hits WHERE URL <> '' GROUP BY CounterID HAVING COUNT(*) > 100000 ORDER BY l DESC LIMIT 25; +SELECT REGEXP_REPLACE(Referer, '^https?://(?:www\\.)?([^/]+)/.*$', '\1') AS k, AVG(length(Referer)) AS l, COUNT(*) AS c, MIN(Referer) FROM hits WHERE Referer <> '' GROUP BY k HAVING COUNT(*) > 100000 ORDER BY l DESC LIMIT 25; +SELECT SUM(ResolutionWidth), SUM(ResolutionWidth + 1), SUM(ResolutionWidth + 2), SUM(ResolutionWidth + 3), SUM(ResolutionWidth + 4), SUM(ResolutionWidth + 5), SUM(ResolutionWidth + 6), SUM(ResolutionWidth + 7), SUM(ResolutionWidth + 8), SUM(ResolutionWidth + 9), SUM(ResolutionWidth + 10), SUM(ResolutionWidth + 11), SUM(ResolutionWidth + 12), SUM(ResolutionWidth + 13), SUM(ResolutionWidth + 14), SUM(ResolutionWidth + 15), SUM(ResolutionWidth + 16), SUM(ResolutionWidth + 17), SUM(ResolutionWidth + 18), SUM(ResolutionWidth + 19), SUM(ResolutionWidth + 20), SUM(ResolutionWidth + 21), SUM(ResolutionWidth + 22), SUM(ResolutionWidth + 23), SUM(ResolutionWidth + 24), SUM(ResolutionWidth + 25), SUM(ResolutionWidth + 26), SUM(ResolutionWidth + 27), SUM(ResolutionWidth + 28), SUM(ResolutionWidth + 29), SUM(ResolutionWidth + 30), SUM(ResolutionWidth + 31), SUM(ResolutionWidth + 32), SUM(ResolutionWidth + 33), SUM(ResolutionWidth + 34), SUM(ResolutionWidth + 35), SUM(ResolutionWidth + 36), SUM(ResolutionWidth + 37), SUM(ResolutionWidth + 38), SUM(ResolutionWidth + 39), SUM(ResolutionWidth + 40), SUM(ResolutionWidth + 41), SUM(ResolutionWidth + 42), SUM(ResolutionWidth + 43), SUM(ResolutionWidth + 44), SUM(ResolutionWidth + 45), SUM(ResolutionWidth + 46), SUM(ResolutionWidth + 47), SUM(ResolutionWidth + 48), SUM(ResolutionWidth + 49), SUM(ResolutionWidth + 50), SUM(ResolutionWidth + 51), SUM(ResolutionWidth + 52), SUM(ResolutionWidth + 53), SUM(ResolutionWidth + 54), SUM(ResolutionWidth + 55), SUM(ResolutionWidth + 56), SUM(ResolutionWidth + 57), SUM(ResolutionWidth + 58), SUM(ResolutionWidth + 59), SUM(ResolutionWidth + 60), SUM(ResolutionWidth + 61), SUM(ResolutionWidth + 62), SUM(ResolutionWidth + 63), SUM(ResolutionWidth + 64), SUM(ResolutionWidth + 65), SUM(ResolutionWidth + 66), SUM(ResolutionWidth + 67), SUM(ResolutionWidth + 68), SUM(ResolutionWidth + 69), SUM(ResolutionWidth + 70), SUM(ResolutionWidth + 71), SUM(ResolutionWidth + 72), SUM(ResolutionWidth + 73), SUM(ResolutionWidth + 74), SUM(ResolutionWidth + 75), SUM(ResolutionWidth + 76), SUM(ResolutionWidth + 77), SUM(ResolutionWidth + 78), SUM(ResolutionWidth + 79), SUM(ResolutionWidth + 80), SUM(ResolutionWidth + 81), SUM(ResolutionWidth + 82), SUM(ResolutionWidth + 83), SUM(ResolutionWidth + 84), SUM(ResolutionWidth + 85), SUM(ResolutionWidth + 86), SUM(ResolutionWidth + 87), SUM(ResolutionWidth + 88), SUM(ResolutionWidth + 89) FROM hits; +SELECT SearchEngineID, ClientIP, COUNT(*) AS c, SUM(IsRefresh), AVG(ResolutionWidth) FROM hits WHERE SearchPhrase <> '' GROUP BY SearchEngineID, ClientIP ORDER BY c DESC LIMIT 10; +SELECT WatchID, ClientIP, COUNT(*) AS c, SUM(IsRefresh), AVG(ResolutionWidth) FROM hits WHERE SearchPhrase <> '' GROUP BY WatchID, ClientIP ORDER BY c DESC LIMIT 10; +SELECT WatchID, ClientIP, COUNT(*) AS c, SUM(IsRefresh), AVG(ResolutionWidth) FROM hits GROUP BY WatchID, ClientIP ORDER BY c DESC LIMIT 10; +SELECT URL, COUNT(*) AS c FROM hits GROUP BY URL ORDER BY c DESC LIMIT 10; +SELECT 1, URL, COUNT(*) AS c FROM hits GROUP BY 1, URL ORDER BY c DESC LIMIT 10; +SELECT ClientIP, ClientIP - 1, ClientIP - 2, ClientIP - 3, COUNT(*) AS c FROM hits GROUP BY ClientIP, ClientIP - 1, ClientIP - 2, ClientIP - 3 ORDER BY c DESC LIMIT 10; +SELECT URL, COUNT(*) AS PageViews FROM hits WHERE CounterID = 62 AND EventDate >= '2013-07-01' AND EventDate <= '2013-07-31' AND DontCountHits = 0 AND IsRefresh = 0 AND URL <> '' GROUP BY URL ORDER BY PageViews DESC LIMIT 10; +SELECT Title, COUNT(*) AS PageViews FROM hits WHERE CounterID = 62 AND EventDate >= '2013-07-01' AND EventDate <= '2013-07-31' AND DontCountHits = 0 AND IsRefresh = 0 AND Title <> '' GROUP BY Title ORDER BY PageViews DESC LIMIT 10; +SELECT URL, COUNT(*) AS PageViews FROM hits WHERE CounterID = 62 AND EventDate >= '2013-07-01' AND EventDate <= '2013-07-31' AND IsRefresh = 0 AND IsLink <> 0 AND IsDownload = 0 GROUP BY URL ORDER BY PageViews DESC LIMIT 10 OFFSET 1000; +SELECT TraficSourceID, SearchEngineID, AdvEngineID, CASE WHEN (SearchEngineID = 0 AND AdvEngineID = 0) THEN Referer ELSE '' END AS Src, URL AS Dst, COUNT(*) AS PageViews FROM hits WHERE CounterID = 62 AND EventDate >= '2013-07-01' AND EventDate <= '2013-07-31' AND IsRefresh = 0 GROUP BY TraficSourceID, SearchEngineID, AdvEngineID, Src, Dst ORDER BY PageViews DESC LIMIT 10 OFFSET 1000; +SELECT URLHash, EventDate, COUNT(*) AS PageViews FROM hits WHERE CounterID = 62 AND EventDate >= '2013-07-01' AND EventDate <= '2013-07-31' AND IsRefresh = 0 AND TraficSourceID IN (-1, 6) AND RefererHash = 3594120000172545465 GROUP BY URLHash, EventDate ORDER BY PageViews DESC LIMIT 10 OFFSET 100; +SELECT WindowClientWidth, WindowClientHeight, COUNT(*) AS PageViews FROM hits WHERE CounterID = 62 AND EventDate >= '2013-07-01' AND EventDate <= '2013-07-31' AND IsRefresh = 0 AND DontCountHits = 0 AND URLHash = 2868770270353813622 GROUP BY WindowClientWidth, WindowClientHeight ORDER BY PageViews DESC LIMIT 10 OFFSET 10000; +SELECT DATE_TRUNC('minute', EventTime) AS M, COUNT(*) AS PageViews FROM hits WHERE CounterID = 62 AND EventDate >= '2013-07-14' AND EventDate <= '2013-07-15' AND IsRefresh = 0 AND DontCountHits = 0 GROUP BY DATE_TRUNC('minute', EventTime) ORDER BY DATE_TRUNC('minute', EventTime) LIMIT 10 OFFSET 1000; \ No newline at end of file diff --git a/crunchy-bridge-for-analytics/results/crunchy-bridge-analytics-256.json b/crunchy-bridge-for-analytics/results/crunchy-bridge-analytics-256.json new file mode 100644 index 00000000..646d49f0 --- /dev/null +++ b/crunchy-bridge-for-analytics/results/crunchy-bridge-analytics-256.json @@ -0,0 +1,56 @@ +{ + "system": "Crunchy Bridge for Analytics (Parquet, local)", + "date": "2024-06-05", + "machine": "Crunchy Bridge (Analytics-256GB)", + "cluster_size": 1, + "comment":"", + "tags": ["column-oriented", "PostgreSQL compatible", "analytical", "managed"], + "load_time": 306.186, + "data_size": 14779976446, + +"result": [ +[0.0779,0.0674,0.0669], +[0.0699,0.0705,0.0708], +[0.0821,0.0842,0.0836], +[0.0886,0.0909,0.0910], +[0.1571,0.1502,0.1554], +[0.2471,0.2445,0.2320], +[0.0760,0.0733,0.0739], +[0.0728,0.0731,0.0775], +[0.1664,0.1657,0.1653], +[0.2104,0.2099,0.2115], +[0.1099,0.1088,0.1085], +[0.1122,0.1121,0.1117], +[0.2473,0.2622,0.2612], +[0.2830,0.2821,0.2831], +[0.2576,0.2694,0.2739], +[0.1592,0.1603,0.1586], +[0.2885,0.2856,0.2932], +[0.2833,0.2767,0.2789], +[0.8322,0.8537,0.8480], +[0.6994,0.6982,0.6998], +[0.5727,0.5774,0.5730], +[0.4907,0.4971,0.4896], +[0.7917,0.7983,0.7922], +[2.3615,2.3367,2.3455], +[0.1382,0.1377,0.1382], +[0.1355,0.1354,0.1341], +[0.1402,0.1406,0.1422], +[0.5576,0.5581,0.5538], +[1.1469,1.1294,1.0472], +[0.1600,0.1597,0.1608], +[0.1972,0.1916,0.1920], +[0.2164,0.2153,0.2172], +[0.6612,0.6298,0.6607], +[0.9328,0.9646,0.8992], +[0.9365,0.8979,0.9273], +[0.1723,0.1721,0.1727], +[0.1778,0.1778,0.1787], +[0.1329,0.1337,0.1331], +[0.1499,0.1496,0.1497], +[0.3122,0.3133,0.3263], +[0.0787,0.0769,0.0769], +[0.0761,0.0753,0.0773], +[0.2416,0.2411,0.2411] +] +} diff --git a/crunchy-bridge-for-analytics/run.sh b/crunchy-bridge-for-analytics/run.sh new file mode 100755 index 00000000..5a477a73 --- /dev/null +++ b/crunchy-bridge-for-analytics/run.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +TRIES=3 + +echo '"result": [' + +cat queries.sql | while read query; do + times=() + for i in $(seq 1 $TRIES); do + time_ms=$($CONNCMD -c '\timing' -c "$query" | grep 'Time' | awk '{print $2}') + time_sec=$(echo "scale=4; $time_ms / 1000" | bc) + time_sec=$(printf "%.4f" $time_sec) # Ensure leading zero + times+=($time_sec) + done + echo "[${times[0]},${times[1]},${times[2]}]," +done | sed '$ s/,$//' + +echo "]" + diff --git a/index.html b/index.html index fc464d1b..9dd5c2a1 100644 --- a/index.html +++ b/index.html @@ -387,6 +387,7 @@ ,{"system":"ClickHouse (tuned)","date":"2024-02-07","machine":"c6a.metal, 500gb gp2","cluster_size":1,"comment":"","tags":["C++","column-oriented","ClickHouse derivative"],"load_time":165.938,"data_size":14807919160,"result":[[0.007,0.01,0.006],[0.027,0.027,0.023],[0.048,0.025,0.024],[0.17,0.024,0.021],[0.223,0.122,0.11],[0.91,0.139,0.131],[0.056,0.019,0.02],[0.032,0.034,0.03],[0.337,0.184,0.171],[0.773,0.299,0.305],[0.163,0.049,0.056],[0.171,0.063,0.061],[1.079,0.171,0.145],[1.578,0.216,0.18],[0.828,0.158,0.152],[0.23,0.13,0.131],[1.78,0.376,0.343],[1.142,0.115,0.106],[3.364,0.678,0.607],[0.083,0.028,0.026],[8.824,0.149,0.122],[10.257,0.176,0.151],[13.896,0.16,0.139],[10.755,0.558,0.526],[1.786,0.053,0.047],[0.929,0.04,0.035],[2.452,0.051,0.047],[9.375,0.164,0.147],[7.434,0.195,0.176],[0.085,0.037,0.037],[1.281,0.121,0.11],[4.7,0.174,0.153],[3.749,0.959,0.731],[9.136,0.684,0.584],[9.126,0.683,0.625],[0.213,0.193,0.176],[0.075,0.054,0.051],[0.045,0.032,0.037],[0.059,0.037,0.042],[0.092,0.052,0.046],[0.033,0.033,0.029],[0.029,0.03,0.039],[0.047,0.047,0.043]],"source":"clickhouse/results/c6a.metal.tuned.json"} ,{"system":"ClickHouse (tuned, memory)","date":"2024-02-13","machine":"c6a.metal, 500gb gp2","cluster_size":1,"comment":"","tags":["C++","column-oriented","ClickHouse derivative"],"load_time":289.623,"data_size":137605811811,"result":[[0.019,0.013,0.011],[0.014,0.015,0.015],[0.019,0.018,0.02],[0.029,0.02,0.024],[0.142,0.134,0.107],[0.162,0.121,0.118],[0.017,0.014,0.015],[0.03,0.031,0.028],[0.187,0.174,0.151],[0.282,0.28,0.287],[0.055,0.046,0.048],[0.05,0.061,0.049],[0.142,0.145,0.14],[0.175,0.184,0.175],[0.155,0.15,0.157],[0.131,0.129,0.118],[0.317,0.305,0.311],[0.139,0.08,0.077],[0.66,0.638,0.581],[0.032,0.022,0.028],[0.241,0.13,0.12],[0.183,0.169,0.158],[0.292,0.168,0.164],[0.182,0.179,0.17],[0.042,0.038,0.044],[0.035,0.034,0.033],[0.042,0.04,0.043],[0.175,0.177,0.168],[0.327,0.252,0.248],[0.036,0.035,0.033],[0.1,0.091,0.093],[0.139,0.149,0.139],[1.053,1.053,0.892],[0.541,0.56,0.552],[0.538,0.562,0.53],[0.2,0.191,0.181],[0.066,0.053,0.051],[0.054,0.046,0.053],[0.054,0.04,0.046],[0.072,0.067,0.063],[0.052,0.041,0.045],[0.046,0.041,0.038],[0.03,0.034,0.048]],"source":"clickhouse/results/c6a.metal.tuned.memory.json"} ,{"system":"CrateDB","date":"2022-07-01","machine":"c6a.4xlarge, 500gb gp2","cluster_size":1,"comment":"For some queries it gives \"Data too large\".","tags":["Java","column-oriented"],"load_time":10687,"data_size":109636633416,"result":[[0.008162,0.005118,0.002553],[0.350014,0.39977,0.133775],[2.58426,2.47192,2.59779],[2.12939,0.532981,0.507246],[null,null,null],[null,null,null],[1.18488,1.06603,1.07219],[0.209264,0.073284,0.067912],[null,null,null],[null,null,null],[1.68892,1.2866,1.47428],[1.62976,1.43073,1.26904],[12.7517,13.0334,13.2685],[18.8587,null,18.6951],[11.2982,11.2108,11.577],[20.2964,20.4035,19.1076],[null,null,null],[null,null,null],[null,null,null],[0.202044,0.010009,0.005566],[9.22964,4.54606,0.774149],[1.41673,1.09885,0.789775],[12.3933,8.06911,1.69671],[1.45018,0.969528,0.979718],[0.357589,0.14887,0.153326],[0.189282,0.133963,0.130279],[0.153222,0.140756,0.139861],[27.5195,19.6862,20.1825],[72.7575,68.2,67.1238],[144.533,146.579,152.144],[8.76866,9.00563,8.46917],[17.6652,16.6755,16.0558],[null,null,null],[null,null,null],[null,null,null],[42.2967,44.9621,44.4386],[0.786911,0.4904,0.508416],[0.602075,0.226261,0.182399],[0.131407,0.058958,0.054518],[0.954736,1.1361,1.14233],[0.23764,0.139109,0.134472],[0.110253,0.057695,0.056073],[0.124285,0.150479,0.066226]],"source":"cratedb/results/c6a.4xlarge.json"} +,{"system": "Crunchy Bridge for Analytics (Parquet, local)","date": "2024-06-05","machine": "Crunchy Bridge (Analytics-256GB)","cluster_size": 1,"comment":"","tags": ["column-oriented", "PostgreSQL compatible", "analytical", "managed"],"load_time": 306.186,"data_size": 14779976446,"result": [[0.0779,0.0674,0.0669],[0.0699,0.0705,0.0708],[0.0821,0.0842,0.0836],[0.0886,0.0909,0.0910],[0.1571,0.1502,0.1554],[0.2471,0.2445,0.2320],[0.0760,0.0733,0.0739],[0.0728,0.0731,0.0775],[0.1664,0.1657,0.1653],[0.2104,0.2099,0.2115],[0.1099,0.1088,0.1085],[0.1122,0.1121,0.1117],[0.2473,0.2622,0.2612],[0.2830,0.2821,0.2831],[0.2576,0.2694,0.2739],[0.1592,0.1603,0.1586],[0.2885,0.2856,0.2932],[0.2833,0.2767,0.2789],[0.8322,0.8537,0.8480],[0.6994,0.6982,0.6998],[0.5727,0.5774,0.5730],[0.4907,0.4971,0.4896],[0.7917,0.7983,0.7922],[2.3615,2.3367,2.3455],[0.1382,0.1377,0.1382],[0.1355,0.1354,0.1341],[0.1402,0.1406,0.1422],[0.5576,0.5581,0.5538],[1.1469,1.1294,1.0472],[0.1600,0.1597,0.1608],[0.1972,0.1916,0.1920],[0.2164,0.2153,0.2172],[0.6612,0.6298,0.6607],[0.9328,0.9646,0.8992],[0.9365,0.8979,0.9273],[0.1723,0.1721,0.1727],[0.1778,0.1778,0.1787],[0.1329,0.1337,0.1331],[0.1499,0.1496,0.1497],[0.3122,0.3133,0.3263],[0.0787,0.0769,0.0769],[0.0761,0.0753,0.0773],[0.2416,0.2411,0.2411]]} ,{"system":"Databend","date":"2023-02-26","machine":"c5.4xlarge, 500gb gp2","cluster_size":1,"comment":"","tags":["Rust","column-oriented","MySQL compatible","ClickHouse derivative"],"load_time":368,"data_size":20922561953,"result":[[0.002554,0.002257,0.002058],[0.041885,0.026659,0.026301],[0.377386,0.047169,0.046246],[1.111276,0.043512,0.042424],[1.337056,0.378329,0.378],[1.517051,0.516229,0.513954],[0.040641,0.02423,0.025701],[0.048797,0.029641,0.028597],[1.695267,0.591075,0.582311],[2.82141,0.663166,0.666039],[1.407029,0.255046,0.253865],[1.971179,0.258693,0.254872],[1.548181,0.639874,0.63798],[3.217226,1.0459,1.038888],[1.861833,0.815691,0.806401],[0.768044,0.530842,0.528053],[3.639183,2.567878,2.556752],[2.787874,1.658994,1.6746],[7.466028,4.180932,4.241429],[0.006217,0.003521,0.013345],[10.689073,0.56204,0.551567],[12.984685,0.686805,0.676753],[23.748547,1.311328,1.267505],[6.763271,0.285252,0.273009],[0.132152,0.028291,0.028296],[1.943504,0.226601,0.224721],[0.326737,0.029324,0.027575],[11.538898,0.516586,0.502331],[9.223633,6.920732,6.945943],[0.153429,0.074415,0.073831],[5.458251,0.556813,0.550952],[7.330739,0.895601,0.866605],[7.677006,4.602414,4.704338],[11.838616,2.964448,3.080231],[11.848512,2.947774,3.029332],[0.57868,0.525259,0.491508],[0.086986,0.062111,0.062906],[0.06579,0.032106,0.031138],[0.030254,0.01606,0.017036],[0.124381,0.093671,0.095871],[0.029603,0.019117,0.022236],[0.019694,0.010848,0.016053],[0.019806,0.010239,0.010112]],"source":"databend/results/c5.4xlarge.json"} ,{"system":"Databend","date":"2023-02-26","machine":"c6a.4xlarge, 500gb gp2","cluster_size":1,"comment":"","tags":["Rust","column-oriented","MySQL compatible","ClickHouse derivative"],"load_time":357,"data_size":20922561953,"result":[[0.002354,0.001796,0.001676],[0.03541,0.019995,0.020233],[0.387346,0.031738,0.031385],[1.13763,0.030899,0.030119],[1.405919,0.423186,0.423155],[1.562987,0.578546,0.580928],[0.032613,0.014625,0.014217],[0.032749,0.02213,0.022904],[1.735342,0.53332,0.524569],[2.804289,0.599192,0.595315],[1.369841,0.17547,0.186941],[2.0922,0.181471,0.181655],[1.750355,0.683891,0.67764],[3.213623,1.051686,1.04771],[1.881785,0.830412,0.813682],[0.813736,0.602403,0.591426],[3.880537,2.488562,2.4804],[2.782833,1.3676,1.344967],[7.815274,4.236312,4.263853],[0.006507,0.003202,0.003167],[10.674944,0.451903,0.43883],[12.984352,0.543479,0.531805],[23.749905,1.028132,1.006847],[6.267209,0.20805,0.194846],[0.273405,0.027663,0.027727],[1.813349,0.183311,0.180188],[0.441909,0.027818,0.027427],[11.5565,0.410411,0.397217],[11.878248,11.803086,11.842988],[0.147288,0.058588,0.056877],[5.500723,0.496444,0.488228],[7.438851,0.982329,0.97478],[8.228235,5.575889,5.488849],[12.279272,3.42623,3.439635],[12.288545,3.465759,3.472598],[0.629652,0.542064,0.549532],[0.068277,0.055286,0.062397],[0.028899,0.023338,0.026963],[0.024785,0.016914,0.014623],[0.094073,0.082865,0.088973],[0.024245,0.013744,0.017487],[0.018292,0.009779,0.008906],[0.018714,0.009268,0.009275]],"source":"databend/results/c6a.4xlarge.json"} ,{"system":"Databend","date":"2023-02-26","machine":"c6a.metal, 500gb gp2","cluster_size":1,"comment":"","tags":["Rust","column-oriented","MySQL compatible","ClickHouse derivative"],"load_time":70,"data_size":20922561953,"result":[[0.073969,0.002969,0.002275],[0.289053,0.0145,0.013984],[0.597566,0.020848,0.022175],[1.241144,0.019701,0.019218],[1.407042,0.266073,0.245832],[1.707674,0.265472,0.272181],[0.037721,0.015296,0.014786],[0.044271,0.019238,0.018279],[1.814285,0.29248,0.287474],[3.034563,0.304214,0.31072],[1.634329,0.286281,0.299248],[1.937083,0.177104,0.188476],[1.52924,0.28984,0.289497],[3.075821,0.461813,0.428307],[1.708843,0.27206,0.275821],[0.83204,0.234342,0.218837],[3.085068,0.494668,0.480146],[2.891979,0.477079,0.457178],[6.122974,0.690913,0.634832],[0.186429,0.004711,0.00394],[10.868874,0.099969,0.086985],[13.480312,0.11198,0.10336],[24.405612,0.431874,0.440055],[10.061871,0.2325,0.242135],[0.647733,0.046068,0.039222],[2.100647,0.046711,0.043591],[1.391526,0.041194,0.039617],[11.536597,0.093705,0.088706],[9.839564,1.566094,1.5916],[0.16243,0.049029,0.049039],[5.631392,0.26343,0.225562],[7.261623,0.304319,0.279184],[5.646363,1.06771,0.910199],[11.17362,0.789665,0.684581],[11.251824,0.766817,0.682614],[0.663092,0.261053,0.272992],[0.40079,0.083889,0.091102],[0.073341,0.021988,0.028371],[0.091126,0.019851,0.013461],[0.151101,0.058686,0.058112],[0.281109,0.016812,0.014878],[0.398818,0.015711,0.022669],[0.222298,0.011058,0.014887]],"source":"databend/results/c6a.metal.json"} From 8e825f22de2659c1c225ae236bea50be8eb7f773 Mon Sep 17 00:00:00 2001 From: Onder KALACI Date: Mon, 1 Jul 2024 12:45:36 +0300 Subject: [PATCH 2/3] Apply feedback Make the distinction between hot vs cold results more explicit. Do not load file to the server upfront. Instead, in the first run make sure that the file is not available as local file. Then, on the second/third runs make sure that the file is locally available on the cluster. --- crunchy-bridge-for-analytics/README.md | 30 ++++--- crunchy-bridge-for-analytics/create.sql | 4 - .../results/crunchy-bridge-analytics-256.json | 89 +++++++++---------- crunchy-bridge-for-analytics/run.sh | 60 ++++++++++--- index.html | 2 +- 5 files changed, 113 insertions(+), 72 deletions(-) diff --git a/crunchy-bridge-for-analytics/README.md b/crunchy-bridge-for-analytics/README.md index 0d769217..54ba8147 100644 --- a/crunchy-bridge-for-analytics/README.md +++ b/crunchy-bridge-for-analytics/README.md @@ -1,9 +1,6 @@ -[Crunchy Bridge for Analytics](https://docs.crunchybridge.com/analytics) allows users to query parquet files on S3 directly. It also automatically downloads files accessed to a local disk to avoid network delays. +[Crunchy Bridge for Analytics](https://docs.crunchybridge.com/analytics) allows users to query parquet files on S3 directly. -To best represent the default production behavior of our system, we benchmark the `(Parquet, Local)` scenario where: -- 'Parquet' we directly use `hits.parquet` from `s3://clickhouse-public-datasets` -- 'Local': We load the `hits.parquet` file to a local disk drive on the machine running the service. In this scenario, it is expected that 'cold run' and 'hot run' results will be similar 1) Setup the cluster: @@ -15,24 +12,35 @@ To best represent the default production behavior of our system, we benchmark t - Step Two: Set Up Analytics Credentials: Click "Skip for now" - Wait until the state of the machine becomes "Running" -2) Get the connection string: +2) Setup a VM on `aws` in the same region as the cluster `eu-central-1`. +This is to make sure the latency between the server and the client is not high. We are going to need `psql` on this VM, so you should install `sudo yum install -y postgresql16` etc. depending on the linux distro. + + +3) Get the application connection strings: + +3.1) Application connection - Click the "Connection" tab from the left menu - Pick role: application, Format psql - Click "Copy" -3) Set the `CONNCMD` that we are going to use with what you copied in (2): + Set the `APPCONNCMD` that we are going to use with what you copied above: ```bash -export CONNCMD='psql postgres://application:XXXX@XXXXX.postgresbridge.com:5432/postgres' +export APPCONNCMD='psql postgres://application:XXXX@XXXXX.postgresbridge.com:5432/postgres' ``` -4) Create the table, load the data: +3.2) Get the postgres connection string: + +- Click the "Connection" tab from the left menu +- Pick role: postgres, Format psql +- Click "Copy" + +Set the `SUPERUSERCONNCMD` that we are going to use with what you copied above: ```bash - $CONNCMD -c '\timing' -f create.sql +export SUPERUSERCONNCMD='psql postgres://postgres:XXXX@XXXX.postgresbridge.com:5432/postgres' ``` - -5) Run the script: +4) Run the script: ```bash ./run.sh ``` diff --git a/crunchy-bridge-for-analytics/create.sql b/crunchy-bridge-for-analytics/create.sql index a7b86908..229111c1 100644 --- a/crunchy-bridge-for-analytics/create.sql +++ b/crunchy-bridge-for-analytics/create.sql @@ -1,10 +1,6 @@ -- Auto-infer the columns from the hits.parquet CREATE FOREIGN TABLE hits_auto () SERVER crunchy_lake_analytics OPTIONS (path 's3://clickhouse-public-datasets/hits_compatible/hits.parquet'); --- To show representative behavior of Crunchy Bridge for Analytics, we point to the --- official hits.parquet file on S3 and load it to a local disk before running the queries -SELECT * FROM crunchy_file_cache.add('s3://clickhouse-public-datasets/hits_compatible/hits.parquet'); - -- hits.parquet uses integers for date and time, -- which most databases cannot pass directly -- to date/time functions. Hence we convert them to date and diff --git a/crunchy-bridge-for-analytics/results/crunchy-bridge-analytics-256.json b/crunchy-bridge-for-analytics/results/crunchy-bridge-analytics-256.json index 646d49f0..1e16cfb4 100644 --- a/crunchy-bridge-for-analytics/results/crunchy-bridge-analytics-256.json +++ b/crunchy-bridge-for-analytics/results/crunchy-bridge-analytics-256.json @@ -1,56 +1,55 @@ { - "system": "Crunchy Bridge for Analytics (Parquet, local)", + "system": "Crunchy Bridge for Analytics (Parquet)", "date": "2024-06-05", "machine": "Crunchy Bridge (Analytics-256GB)", "cluster_size": 1, "comment":"", "tags": ["column-oriented", "PostgreSQL compatible", "analytical", "managed"], - "load_time": 306.186, "data_size": 14779976446, "result": [ -[0.0779,0.0674,0.0669], -[0.0699,0.0705,0.0708], -[0.0821,0.0842,0.0836], -[0.0886,0.0909,0.0910], -[0.1571,0.1502,0.1554], -[0.2471,0.2445,0.2320], -[0.0760,0.0733,0.0739], -[0.0728,0.0731,0.0775], -[0.1664,0.1657,0.1653], -[0.2104,0.2099,0.2115], -[0.1099,0.1088,0.1085], -[0.1122,0.1121,0.1117], -[0.2473,0.2622,0.2612], -[0.2830,0.2821,0.2831], -[0.2576,0.2694,0.2739], -[0.1592,0.1603,0.1586], -[0.2885,0.2856,0.2932], -[0.2833,0.2767,0.2789], -[0.8322,0.8537,0.8480], -[0.6994,0.6982,0.6998], -[0.5727,0.5774,0.5730], -[0.4907,0.4971,0.4896], -[0.7917,0.7983,0.7922], -[2.3615,2.3367,2.3455], -[0.1382,0.1377,0.1382], -[0.1355,0.1354,0.1341], -[0.1402,0.1406,0.1422], -[0.5576,0.5581,0.5538], -[1.1469,1.1294,1.0472], -[0.1600,0.1597,0.1608], -[0.1972,0.1916,0.1920], -[0.2164,0.2153,0.2172], -[0.6612,0.6298,0.6607], -[0.9328,0.9646,0.8992], -[0.9365,0.8979,0.9273], -[0.1723,0.1721,0.1727], -[0.1778,0.1778,0.1787], -[0.1329,0.1337,0.1331], -[0.1499,0.1496,0.1497], -[0.3122,0.3133,0.3263], -[0.0787,0.0769,0.0769], -[0.0761,0.0753,0.0773], -[0.2416,0.2411,0.2411] +[0.0628,0.0726,0.0699], +[0.3610,0.0713,0.0706], +[0.4281,0.0821,0.0819], +[0.4133,0.0884,0.0879], +[0.3735,0.1454,0.1463], +[0.4762,0.2440,0.2360], +[0.2493,0.0761,0.0774], +[0.1362,0.0734,0.0737], +[0.2802,0.1653,0.1656], +[0.5351,0.2102,0.2109], +[0.3286,0.1102,0.1099], +[0.2949,0.1135,0.1133], +[0.5787,0.2420,0.2544], +[0.5019,0.2800,0.2818], +[0.4142,0.2518,0.2536], +[0.2518,0.1629,0.1565], +[0.5032,0.2965,0.2888], +[0.4987,0.2764,0.2721], +[1.2427,0.8276,0.8378], +[5.9475,0.7041,0.7026], +[1.5523,0.5729,0.5729], +[1.4388,0.4994,0.4961], +[2.3632,0.7972,0.7951], +[5.7294,2.3540,2.3470], +[0.4353,0.1463,0.1382], +[0.3627,0.1325,0.1334], +[0.4214,0.1420,0.1406], +[1.4605,0.5591,0.5534], +[2.5890,2.1074,2.1023], +[0.2560,0.1601,0.1592], +[0.5807,0.1927,0.1964], +[0.8045,0.2173,0.2202], +[1.0320,0.6704,0.6718], +[1.6656,0.9118,0.9003], +[1.6751,0.9396,0.9062], +[0.2671,0.1728,0.1730], +[0.4445,0.1802,0.1823], +[0.2588,0.1354,0.1346], +[0.4247,0.1536,0.1526], +[0.8441,0.3354,0.3201], +[0.2188,0.0809,0.0808], +[0.2217,0.0787,0.0777], +[0.3362,0.2414,0.2417] ] } diff --git a/crunchy-bridge-for-analytics/run.sh b/crunchy-bridge-for-analytics/run.sh index 5a477a73..4a97d345 100755 --- a/crunchy-bridge-for-analytics/run.sh +++ b/crunchy-bridge-for-analytics/run.sh @@ -1,19 +1,57 @@ #!/bin/bash -TRIES=3 +# disable cache manager to prevent auto-loading of files +$SUPERUSERCONNCMD -c 'ALTER SYSTEM SET crunchy_query_engine.enable_cache_manager TO off;' +$SUPERUSERCONNCMD -c 'SELECT pg_reload_conf();' +$SUPERUSERCONNCMD -c 'SHOW crunchy_query_engine.enable_cache_manager;' -echo '"result": [' +# make sure there are no leftover files locally available +$APPCONNCMD -c 'select crunchy_file_cache.remove(path) FROM crunchy_file_cache.list();' + +# create the table +$APPCONNCMD -f create.sql + +# Initialize the results array +declare -A results + +# Function to run queries and store results +run_queries() { + local run_number=$1 + local query_index=0 -cat queries.sql | while read query; do - times=() - for i in $(seq 1 $TRIES); do - time_ms=$($CONNCMD -c '\timing' -c "$query" | grep 'Time' | awk '{print $2}') + while read -r query; do + time_ms=$($APPCONNCMD -c '\timing' -c "$query" | grep 'Time' | awk '{print $2}') time_sec=$(echo "scale=4; $time_ms / 1000" | bc) time_sec=$(printf "%.4f" $time_sec) # Ensure leading zero - times+=($time_sec) - done - echo "[${times[0]},${times[1]},${times[2]}]," -done | sed '$ s/,$//' -echo "]" + # Append the result to the appropriate query's results array + if [ $run_number -eq 0 ]; then + results[$query_index]="$time_sec" + else + results[$query_index]+=",$time_sec" + fi + query_index=$((query_index + 1)) + done < queries.sql +} + +# Run queries for the first time without file downloaded locally, add to results +run_queries 0 +# Enable loading the file locally +$SUPERUSERCONNCMD -c 'ALTER SYSTEM SET crunchy_query_engine.enable_cache_manager TO on;' +$SUPERUSERCONNCMD -c 'SELECT pg_reload_conf();' +$SUPERUSERCONNCMD -c 'SHOW crunchy_query_engine.enable_cache_manager;' + +# Synchronously load the file to the local machine +$APPCONNCMD -c "SELECT * FROM crunchy_file_cache.add('s3://clickhouse-public-datasets/hits_compatible/hits.parquet');" + +# Run queries for the second and third times with file locally available +run_queries 1 +run_queries 2 + +# Format the results +echo '"result": [' +for ((i = 0; i < ${#results[@]}; i++)); do + echo "[${results[$i]}]," +done | sed '$ s/,$//' +echo "]" diff --git a/index.html b/index.html index 9dd5c2a1..0bc07cf6 100644 --- a/index.html +++ b/index.html @@ -387,7 +387,7 @@ ,{"system":"ClickHouse (tuned)","date":"2024-02-07","machine":"c6a.metal, 500gb gp2","cluster_size":1,"comment":"","tags":["C++","column-oriented","ClickHouse derivative"],"load_time":165.938,"data_size":14807919160,"result":[[0.007,0.01,0.006],[0.027,0.027,0.023],[0.048,0.025,0.024],[0.17,0.024,0.021],[0.223,0.122,0.11],[0.91,0.139,0.131],[0.056,0.019,0.02],[0.032,0.034,0.03],[0.337,0.184,0.171],[0.773,0.299,0.305],[0.163,0.049,0.056],[0.171,0.063,0.061],[1.079,0.171,0.145],[1.578,0.216,0.18],[0.828,0.158,0.152],[0.23,0.13,0.131],[1.78,0.376,0.343],[1.142,0.115,0.106],[3.364,0.678,0.607],[0.083,0.028,0.026],[8.824,0.149,0.122],[10.257,0.176,0.151],[13.896,0.16,0.139],[10.755,0.558,0.526],[1.786,0.053,0.047],[0.929,0.04,0.035],[2.452,0.051,0.047],[9.375,0.164,0.147],[7.434,0.195,0.176],[0.085,0.037,0.037],[1.281,0.121,0.11],[4.7,0.174,0.153],[3.749,0.959,0.731],[9.136,0.684,0.584],[9.126,0.683,0.625],[0.213,0.193,0.176],[0.075,0.054,0.051],[0.045,0.032,0.037],[0.059,0.037,0.042],[0.092,0.052,0.046],[0.033,0.033,0.029],[0.029,0.03,0.039],[0.047,0.047,0.043]],"source":"clickhouse/results/c6a.metal.tuned.json"} ,{"system":"ClickHouse (tuned, memory)","date":"2024-02-13","machine":"c6a.metal, 500gb gp2","cluster_size":1,"comment":"","tags":["C++","column-oriented","ClickHouse derivative"],"load_time":289.623,"data_size":137605811811,"result":[[0.019,0.013,0.011],[0.014,0.015,0.015],[0.019,0.018,0.02],[0.029,0.02,0.024],[0.142,0.134,0.107],[0.162,0.121,0.118],[0.017,0.014,0.015],[0.03,0.031,0.028],[0.187,0.174,0.151],[0.282,0.28,0.287],[0.055,0.046,0.048],[0.05,0.061,0.049],[0.142,0.145,0.14],[0.175,0.184,0.175],[0.155,0.15,0.157],[0.131,0.129,0.118],[0.317,0.305,0.311],[0.139,0.08,0.077],[0.66,0.638,0.581],[0.032,0.022,0.028],[0.241,0.13,0.12],[0.183,0.169,0.158],[0.292,0.168,0.164],[0.182,0.179,0.17],[0.042,0.038,0.044],[0.035,0.034,0.033],[0.042,0.04,0.043],[0.175,0.177,0.168],[0.327,0.252,0.248],[0.036,0.035,0.033],[0.1,0.091,0.093],[0.139,0.149,0.139],[1.053,1.053,0.892],[0.541,0.56,0.552],[0.538,0.562,0.53],[0.2,0.191,0.181],[0.066,0.053,0.051],[0.054,0.046,0.053],[0.054,0.04,0.046],[0.072,0.067,0.063],[0.052,0.041,0.045],[0.046,0.041,0.038],[0.03,0.034,0.048]],"source":"clickhouse/results/c6a.metal.tuned.memory.json"} ,{"system":"CrateDB","date":"2022-07-01","machine":"c6a.4xlarge, 500gb gp2","cluster_size":1,"comment":"For some queries it gives \"Data too large\".","tags":["Java","column-oriented"],"load_time":10687,"data_size":109636633416,"result":[[0.008162,0.005118,0.002553],[0.350014,0.39977,0.133775],[2.58426,2.47192,2.59779],[2.12939,0.532981,0.507246],[null,null,null],[null,null,null],[1.18488,1.06603,1.07219],[0.209264,0.073284,0.067912],[null,null,null],[null,null,null],[1.68892,1.2866,1.47428],[1.62976,1.43073,1.26904],[12.7517,13.0334,13.2685],[18.8587,null,18.6951],[11.2982,11.2108,11.577],[20.2964,20.4035,19.1076],[null,null,null],[null,null,null],[null,null,null],[0.202044,0.010009,0.005566],[9.22964,4.54606,0.774149],[1.41673,1.09885,0.789775],[12.3933,8.06911,1.69671],[1.45018,0.969528,0.979718],[0.357589,0.14887,0.153326],[0.189282,0.133963,0.130279],[0.153222,0.140756,0.139861],[27.5195,19.6862,20.1825],[72.7575,68.2,67.1238],[144.533,146.579,152.144],[8.76866,9.00563,8.46917],[17.6652,16.6755,16.0558],[null,null,null],[null,null,null],[null,null,null],[42.2967,44.9621,44.4386],[0.786911,0.4904,0.508416],[0.602075,0.226261,0.182399],[0.131407,0.058958,0.054518],[0.954736,1.1361,1.14233],[0.23764,0.139109,0.134472],[0.110253,0.057695,0.056073],[0.124285,0.150479,0.066226]],"source":"cratedb/results/c6a.4xlarge.json"} -,{"system": "Crunchy Bridge for Analytics (Parquet, local)","date": "2024-06-05","machine": "Crunchy Bridge (Analytics-256GB)","cluster_size": 1,"comment":"","tags": ["column-oriented", "PostgreSQL compatible", "analytical", "managed"],"load_time": 306.186,"data_size": 14779976446,"result": [[0.0779,0.0674,0.0669],[0.0699,0.0705,0.0708],[0.0821,0.0842,0.0836],[0.0886,0.0909,0.0910],[0.1571,0.1502,0.1554],[0.2471,0.2445,0.2320],[0.0760,0.0733,0.0739],[0.0728,0.0731,0.0775],[0.1664,0.1657,0.1653],[0.2104,0.2099,0.2115],[0.1099,0.1088,0.1085],[0.1122,0.1121,0.1117],[0.2473,0.2622,0.2612],[0.2830,0.2821,0.2831],[0.2576,0.2694,0.2739],[0.1592,0.1603,0.1586],[0.2885,0.2856,0.2932],[0.2833,0.2767,0.2789],[0.8322,0.8537,0.8480],[0.6994,0.6982,0.6998],[0.5727,0.5774,0.5730],[0.4907,0.4971,0.4896],[0.7917,0.7983,0.7922],[2.3615,2.3367,2.3455],[0.1382,0.1377,0.1382],[0.1355,0.1354,0.1341],[0.1402,0.1406,0.1422],[0.5576,0.5581,0.5538],[1.1469,1.1294,1.0472],[0.1600,0.1597,0.1608],[0.1972,0.1916,0.1920],[0.2164,0.2153,0.2172],[0.6612,0.6298,0.6607],[0.9328,0.9646,0.8992],[0.9365,0.8979,0.9273],[0.1723,0.1721,0.1727],[0.1778,0.1778,0.1787],[0.1329,0.1337,0.1331],[0.1499,0.1496,0.1497],[0.3122,0.3133,0.3263],[0.0787,0.0769,0.0769],[0.0761,0.0753,0.0773],[0.2416,0.2411,0.2411]]} +,{"system": "Crunchy Bridge for Analytics (Parquet)","date": "2024-07-01","machine": "Crunchy Bridge (Analytics-256GB)","cluster_size": 1,"comment":"","tags": ["column-oriented", "PostgreSQL compatible", "analytical", "managed"],"data_size": 14779976446,"result": "result": [[0.0628,0.0726,0.0699],[0.3610,0.0713,0.0706],[0.4281,0.0821,0.0819],[0.4133,0.0884,0.0879],[0.3735,0.1454,0.1463],[0.4762,0.2440,0.2360],[0.2493,0.0761,0.0774],[0.1362,0.0734,0.0737],[0.2802,0.1653,0.1656],[0.5351,0.2102,0.2109],[0.3286,0.1102,0.1099],[0.2949,0.1135,0.1133],[0.5787,0.2420,0.2544],[0.5019,0.2800,0.2818],[0.4142,0.2518,0.2536],[0.2518,0.1629,0.1565],[0.5032,0.2965,0.2888],[0.4987,0.2764,0.2721],[1.2427,0.8276,0.8378],[5.9475,0.7041,0.7026],[1.5523,0.5729,0.5729],[1.4388,0.4994,0.4961],[2.3632,0.7972,0.7951],[5.7294,2.3540,2.3470],[0.4353,0.1463,0.1382],[0.3627,0.1325,0.1334],[0.4214,0.1420,0.1406],[1.4605,0.5591,0.5534],[2.5890,2.1074,2.1023],[0.2560,0.1601,0.1592],[0.5807,0.1927,0.1964],[0.8045,0.2173,0.2202],[1.0320,0.6704,0.6718],[1.6656,0.9118,0.9003],[1.6751,0.9396,0.9062],[0.2671,0.1728,0.1730],[0.4445,0.1802,0.1823],[0.2588,0.1354,0.1346],[0.4247,0.1536,0.1526],[0.8441,0.3354,0.3201],[0.2188,0.0809,0.0808],[0.2217,0.0787,0.0777],[0.3362,0.2414,0.2417]]} ,{"system":"Databend","date":"2023-02-26","machine":"c5.4xlarge, 500gb gp2","cluster_size":1,"comment":"","tags":["Rust","column-oriented","MySQL compatible","ClickHouse derivative"],"load_time":368,"data_size":20922561953,"result":[[0.002554,0.002257,0.002058],[0.041885,0.026659,0.026301],[0.377386,0.047169,0.046246],[1.111276,0.043512,0.042424],[1.337056,0.378329,0.378],[1.517051,0.516229,0.513954],[0.040641,0.02423,0.025701],[0.048797,0.029641,0.028597],[1.695267,0.591075,0.582311],[2.82141,0.663166,0.666039],[1.407029,0.255046,0.253865],[1.971179,0.258693,0.254872],[1.548181,0.639874,0.63798],[3.217226,1.0459,1.038888],[1.861833,0.815691,0.806401],[0.768044,0.530842,0.528053],[3.639183,2.567878,2.556752],[2.787874,1.658994,1.6746],[7.466028,4.180932,4.241429],[0.006217,0.003521,0.013345],[10.689073,0.56204,0.551567],[12.984685,0.686805,0.676753],[23.748547,1.311328,1.267505],[6.763271,0.285252,0.273009],[0.132152,0.028291,0.028296],[1.943504,0.226601,0.224721],[0.326737,0.029324,0.027575],[11.538898,0.516586,0.502331],[9.223633,6.920732,6.945943],[0.153429,0.074415,0.073831],[5.458251,0.556813,0.550952],[7.330739,0.895601,0.866605],[7.677006,4.602414,4.704338],[11.838616,2.964448,3.080231],[11.848512,2.947774,3.029332],[0.57868,0.525259,0.491508],[0.086986,0.062111,0.062906],[0.06579,0.032106,0.031138],[0.030254,0.01606,0.017036],[0.124381,0.093671,0.095871],[0.029603,0.019117,0.022236],[0.019694,0.010848,0.016053],[0.019806,0.010239,0.010112]],"source":"databend/results/c5.4xlarge.json"} ,{"system":"Databend","date":"2023-02-26","machine":"c6a.4xlarge, 500gb gp2","cluster_size":1,"comment":"","tags":["Rust","column-oriented","MySQL compatible","ClickHouse derivative"],"load_time":357,"data_size":20922561953,"result":[[0.002354,0.001796,0.001676],[0.03541,0.019995,0.020233],[0.387346,0.031738,0.031385],[1.13763,0.030899,0.030119],[1.405919,0.423186,0.423155],[1.562987,0.578546,0.580928],[0.032613,0.014625,0.014217],[0.032749,0.02213,0.022904],[1.735342,0.53332,0.524569],[2.804289,0.599192,0.595315],[1.369841,0.17547,0.186941],[2.0922,0.181471,0.181655],[1.750355,0.683891,0.67764],[3.213623,1.051686,1.04771],[1.881785,0.830412,0.813682],[0.813736,0.602403,0.591426],[3.880537,2.488562,2.4804],[2.782833,1.3676,1.344967],[7.815274,4.236312,4.263853],[0.006507,0.003202,0.003167],[10.674944,0.451903,0.43883],[12.984352,0.543479,0.531805],[23.749905,1.028132,1.006847],[6.267209,0.20805,0.194846],[0.273405,0.027663,0.027727],[1.813349,0.183311,0.180188],[0.441909,0.027818,0.027427],[11.5565,0.410411,0.397217],[11.878248,11.803086,11.842988],[0.147288,0.058588,0.056877],[5.500723,0.496444,0.488228],[7.438851,0.982329,0.97478],[8.228235,5.575889,5.488849],[12.279272,3.42623,3.439635],[12.288545,3.465759,3.472598],[0.629652,0.542064,0.549532],[0.068277,0.055286,0.062397],[0.028899,0.023338,0.026963],[0.024785,0.016914,0.014623],[0.094073,0.082865,0.088973],[0.024245,0.013744,0.017487],[0.018292,0.009779,0.008906],[0.018714,0.009268,0.009275]],"source":"databend/results/c6a.4xlarge.json"} ,{"system":"Databend","date":"2023-02-26","machine":"c6a.metal, 500gb gp2","cluster_size":1,"comment":"","tags":["Rust","column-oriented","MySQL compatible","ClickHouse derivative"],"load_time":70,"data_size":20922561953,"result":[[0.073969,0.002969,0.002275],[0.289053,0.0145,0.013984],[0.597566,0.020848,0.022175],[1.241144,0.019701,0.019218],[1.407042,0.266073,0.245832],[1.707674,0.265472,0.272181],[0.037721,0.015296,0.014786],[0.044271,0.019238,0.018279],[1.814285,0.29248,0.287474],[3.034563,0.304214,0.31072],[1.634329,0.286281,0.299248],[1.937083,0.177104,0.188476],[1.52924,0.28984,0.289497],[3.075821,0.461813,0.428307],[1.708843,0.27206,0.275821],[0.83204,0.234342,0.218837],[3.085068,0.494668,0.480146],[2.891979,0.477079,0.457178],[6.122974,0.690913,0.634832],[0.186429,0.004711,0.00394],[10.868874,0.099969,0.086985],[13.480312,0.11198,0.10336],[24.405612,0.431874,0.440055],[10.061871,0.2325,0.242135],[0.647733,0.046068,0.039222],[2.100647,0.046711,0.043591],[1.391526,0.041194,0.039617],[11.536597,0.093705,0.088706],[9.839564,1.566094,1.5916],[0.16243,0.049029,0.049039],[5.631392,0.26343,0.225562],[7.261623,0.304319,0.279184],[5.646363,1.06771,0.910199],[11.17362,0.789665,0.684581],[11.251824,0.766817,0.682614],[0.663092,0.261053,0.272992],[0.40079,0.083889,0.091102],[0.073341,0.021988,0.028371],[0.091126,0.019851,0.013461],[0.151101,0.058686,0.058112],[0.281109,0.016812,0.014878],[0.398818,0.015711,0.022669],[0.222298,0.011058,0.014887]],"source":"databend/results/c6a.metal.json"} From 1b989f63b40220ad7d8edf1564fbf2492b9f3b34 Mon Sep 17 00:00:00 2001 From: Onder KALACI Date: Fri, 2 Aug 2024 17:15:31 +0300 Subject: [PATCH 3/3] apply feedback --- crunchy-bridge-for-analytics/README.md | 2 ++ .../results/crunchy-bridge-analytics-256.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/crunchy-bridge-for-analytics/README.md b/crunchy-bridge-for-analytics/README.md index 54ba8147..445204aa 100644 --- a/crunchy-bridge-for-analytics/README.md +++ b/crunchy-bridge-for-analytics/README.md @@ -44,3 +44,5 @@ export SUPERUSERCONNCMD='psql postgres://postgres:XXXX@XXXX.postgresbridge.com:5 ```bash ./run.sh ``` + +For the cold run, we directly access to S3 while running the queries. For the warm runs, we first download the file from S3 to a local cache drive, then run the queries. This logic is coded into `run.sh ` script. diff --git a/crunchy-bridge-for-analytics/results/crunchy-bridge-analytics-256.json b/crunchy-bridge-for-analytics/results/crunchy-bridge-analytics-256.json index 1e16cfb4..090ab69e 100644 --- a/crunchy-bridge-for-analytics/results/crunchy-bridge-analytics-256.json +++ b/crunchy-bridge-for-analytics/results/crunchy-bridge-analytics-256.json @@ -1,7 +1,7 @@ { "system": "Crunchy Bridge for Analytics (Parquet)", "date": "2024-06-05", - "machine": "Crunchy Bridge (Analytics-256GB)", + "machine": "Analytics-256GB (64 vCores, 256 GB)", "cluster_size": 1, "comment":"", "tags": ["column-oriented", "PostgreSQL compatible", "analytical", "managed"],