diff --git a/elosdb/README.md b/elosdb/README.md new file mode 100644 index 0000000000..cf2f38abeb --- /dev/null +++ b/elosdb/README.md @@ -0,0 +1,60 @@ +# elosdb — ClickBench submission + +`elosdb` is a single-node analytical database: a C++ storage and execution engine +with its own column format, behind a server that speaks the PostgreSQL v3 wire +protocol. All 43 ClickBench queries are answered by the engine. + +> It is a personal research / hobby / experiments project, published so this +> result can be reproduced — **not for production use**. + +Results are in [`results/`](results/), one JSON per machine in ClickBench's own +format: every query's three tries, the load time and the data size. The totals, each +installed by `./install` from the release it pins for each architecture — +[`v0.1.10`](https://github.com/decster/elosdb/releases/tag/v0.1.10), on aarch64 and on x86_64: + +| machine | release | load | data size | cold (sum of 43 first tries) | hot (sum of 43 best-of-rest) | concurrent QPS | +|---|---|---:|---:|---:|---:|---:| +| c8g.4xlarge (16 vCPU, 32 GiB) | v0.1.10 aarch64 | 44.94 s | 7,668,470,509 B | 29.66 s | 2.00 s | 12.05 | +| c6a.4xlarge (16 vCPU, 32 GiB) | v0.1.10 x86_64 | 90.22 s | 7,668,470,549 B | 34.66 s | 5.34 s | 4.95 | + +Cold is the first try after the server was restarted and the OS page cache dropped; +it varies noticeably between instances of the same machine type, hot much less. + +## Running it + +From this directory: + + ./install # downloads one file, verifies its sha256, installs psql + ./benchmark.sh # ClickBench's own driver + +`install` compiles nothing. It fetches one statically-linked executable from +[github.com/decster/elosdb's releases](https://github.com/decster/elosdb/releases); the URL and +its sha256 are pinned in `install` itself, per architecture, and a mismatch is a refusal. Set +`ELOSDB_URL` (with `ELOSDB_SHA256`) to run a different build. + +**One asset per architecture, and each names its core.** The aarch64 asset is built +`-mcpu=neoverse-v2` and refuses to start where SVE2 is absent; the x86_64 asset is built +`-march=x86-64-v3` (AVX2/FMA/BMI2, no AVX-512) and refuses on a CPU without those. +`install` selects by `uname -m`, and an architecture with no pinned asset is refused by +name. Each needs +`glibc >= 2.38` and nothing else — libstdc++ and libgcc are linked in, there is no shared library to place +beside it, and it exports no global dynamic symbols. The other requirement is a +`psql`, which `install` apt-gets. + +## The scripts + +| | | +|---|---| +| `install` | fetch + verify the binary; make sure there is a working psql | +| `start` | one server on 127.0.0.1:5432 — no tuning flags | +| `load` | `create.sql`, then one `COPY hits FROM 'hits.parquet'` | +| `query` | a statement in on stdin, psql's `\timing` out on stderr | +| `data-size` | `du -bs` of the store directory | +| `stop` | SIGTERM, then wait, so `drop_caches` finds nothing holding the store mapped | + +`tuned: no` is a claim `start` has to keep, so its only flags are the port and the +data directory; every other setting is the binary's own default. `create.sql` is +[umbra's](../umbra/create.sql) column +list unchanged — no per-column encoding is declared, the encoder picks every layout +from the data — and `queries.sql` is umbra's unchanged. The store is +built inside the timed load window — nothing is cached or pre-computed. diff --git a/elosdb/benchmark.sh b/elosdb/benchmark.sh new file mode 100755 index 0000000000..a33527ee30 --- /dev/null +++ b/elosdb/benchmark.sh @@ -0,0 +1,3 @@ +#!/bin/bash +export BENCH_DOWNLOAD_SCRIPT="download-hits-parquet-single" +exec ../lib/benchmark-common.sh diff --git a/elosdb/check b/elosdb/check new file mode 100755 index 0000000000..9fdf1f7959 --- /dev/null +++ b/elosdb/check @@ -0,0 +1,3 @@ +#!/bin/bash +. "$(dirname "$0")/common.sh" +"${PSQL[@]}" -c 'SELECT 1' >/dev/null diff --git a/elosdb/common.sh b/elosdb/common.sh new file mode 100644 index 0000000000..f68b7d9017 --- /dev/null +++ b/elosdb/common.sh @@ -0,0 +1,15 @@ +# common.sh — sourced by every script here. Nothing in it is a knob: these are the +# facts the scripts share about where things are. +set -eu +ELOSDB_HOME="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +ELOSDB_BIN="${ELOSDB_BIN:-$ELOSDB_HOME/bin/elosdb}" # `install` puts it there +ELOSDB_PORT="${ELOSDB_PORT:-5432}" +ELOSDB_DATA="$ELOSDB_HOME/data" # data/elosdb is the store, + # data/clickbench the parquet +# A psql on PATH whose libpq is not loadable answers `command -v` and then dies on +# every invocation, so the probe RUNS it rather than looking for it. +if ! psql --version >/dev/null 2>&1; then + echo "elosdb: no working psql on PATH — ./install installs postgresql-client" >&2 + exit 1 +fi +PSQL=(psql -X -h 127.0.0.1 -p "$ELOSDB_PORT" -U elosdb -d elosdb) diff --git a/elosdb/create.sql b/elosdb/create.sql new file mode 100644 index 0000000000..682b87aeb2 --- /dev/null +++ b/elosdb/create.sql @@ -0,0 +1,119 @@ +-- The hits table as ClickBench declares it: umbra/create.sql's column list, unchanged. +-- elosdb EXECUTES this file as DDL; it is not documentation. +-- +-- No column carries an ENCODING clause. The encoder prices every column on that +-- column's own values and cannot see the query set; a load of this file and a load +-- of one that pins five string columns to DICT+BLOCK write byte-identical +-- column files. +-- +-- The declared type fixes the logical tag and the physical class; the parquet file +-- fixes the width — `eventdate date` is 32-bit days in PostgreSQL and 16-bit days +-- in hits.parquet, and DATE here is a tag over any integer width. +create table 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 +); + diff --git a/elosdb/data-size b/elosdb/data-size new file mode 100755 index 0000000000..27d3d0685c --- /dev/null +++ b/elosdb/data-size @@ -0,0 +1,4 @@ +#!/bin/bash +# data-size — the store on disk, in bytes: one file per column plus its dictionaries. +. "$(dirname "$0")/common.sh" +du -bs "$ELOSDB_DATA/elosdb" | cut -f1 diff --git a/elosdb/install b/elosdb/install new file mode 100755 index 0000000000..cbfa6aaa3e --- /dev/null +++ b/elosdb/install @@ -0,0 +1,114 @@ +#!/bin/bash +# install — fetch one verified file and make sure there is a psql to talk to it. +# NOTHING IS COMPILED ON THIS BOX. +# +# elosdb ships as a single statically-linked executable: libstdc++ and libgcc are +# inside it, and it imports nothing newer than GLIBC_2.38, so the four things it +# asks the machine for are libc, libm, libgcc_s and the loader. There is no library +# to place beside it, no RUNPATH to get right and no C++ runtime to match. +# +# A BINARY OFF THE NETWORK WITH NOTHING TO CHECK IT AGAINST IS NOT A DEPLOYMENT, so +# the digest below is pinned in this file and compared before the file is ever +# executed. Point ELOSDB_URL somewhere else and you must supply ELOSDB_SHA256 with +# it: a URL without a digest is refused rather than trusted. +set -eu +cd "$(dirname "$0")" + +# THE RELEASE THIS SUBMISSION IS, PER ARCHITECTURE: a tag and that tag's asset digest, +# pinned here, and a pair moves together or not at all. The two arches may name +# different tags — each pins the release that carries ITS asset and was measured with +# it (v0.1.10 carries both: the aarch64 asset built on an aarch64 box, the x86_64 asset +# on an x86 box, from the same source). An empty digest means no asset for that arch, +# and install refuses below rather than fetching a file it cannot check. +RELEASE_TAG_aarch64="v0.1.10" +RELEASE_SHA256_aarch64="44d2a66dca85d28d2fffdc439006f1a348461f50450b446b8e7791957741fa70" +RELEASE_TAG_x86_64="v0.1.10" +RELEASE_SHA256_x86_64="ce12bbf75774b4690602ea782aa0961d6f5e4a6d146078d31427bed893b719b5" +release_url() { echo "https://github.com/decster/elosdb/releases/download/$2/elosdb-$2-linux-$1"; } + +# THE ARTIFACT NAMES ITS ARCHITECTURE AND ITS CORE. aarch64 is built -mcpu=neoverse-v2 +# and refuses to start on a CPU that reports no SVE2; x86_64 is built -march=x86-64-v3 +# (AVX2/FMA/BMI2, no AVX-512 — c6a.4xlarge's Zen 3) and refuses on a CPU without +# those. "Built for this core" in a published header has to mean it, so a box this +# release has no asset for fails here, by name, rather than three phases in. +arch="$(uname -m)" +case "$arch" in + aarch64) tag="$RELEASE_TAG_aarch64"; pinned="$RELEASE_SHA256_aarch64" ;; + x86_64) tag="$RELEASE_TAG_x86_64"; pinned="$RELEASE_SHA256_x86_64" ;; + *) echo "install: this release has no asset for $arch (aarch64 and x86_64 only)." >&2 + echo "install: the published results are c8g.4xlarge, c8g.metal-48xl and c6a.4xlarge." >&2 + exit 1 ;; +esac + +url="${ELOSDB_URL:-}" +sha="${ELOSDB_SHA256:-}" +if [ -z "$url" ]; then + if [ -z "$pinned" ]; then + echo "install: release $tag pins no $arch asset yet." >&2 + echo "install: to run an unreleased build, set ELOSDB_URL and ELOSDB_SHA256 together." >&2 + exit 1 + fi + url="$(release_url "$arch" "$tag")"; sha="$pinned" +elif [ -z "$sha" ]; then + echo "install: ELOSDB_URL is set but ELOSDB_SHA256 is not." >&2 + echo "install: refusing to run a binary this box cannot verify." >&2 + exit 1 +fi + +mkdir -p bin +tmp="bin/.elosdb.download" +rm -f "$tmp" +echo "install: fetching $url" +case "$url" in + http://*|https://*) curl -fsSL --retry 3 -o "$tmp" "$url" ;; + s3://*) command -v aws >/dev/null 2>&1 || { echo "install: $url needs the aws CLI on PATH" >&2; exit 1; } + aws s3 cp "$url" "$tmp" --only-show-errors ;; + *) [ -f "$url" ] || { echo "install: no such file: $url" >&2; exit 1; } + cp -f "$url" "$tmp" ;; +esac +got="$(sha256sum "$tmp" | cut -d' ' -f1)" +if [ "$got" != "$sha" ]; then + rm -f "$tmp" + echo "install: sha256 mismatch for $url" >&2 + echo "install: expected $sha" >&2 + echo "install: got $got" >&2 + exit 1 +fi +chmod +x "$tmp" +# Replaced last, so an interrupted fetch leaves the previous binary in place rather +# than half of the next one. +mv -f "$tmp" bin/elosdb +echo "install: bin/elosdb — $(du -h bin/elosdb | cut -f1), sha256 ok" + +# psql is the only other thing this deployment needs: `load`, `query` and `check` +# all go through it. RUN it rather than look for it — a psql on PATH whose libpq is +# not loadable answers `command -v` and dies on every invocation. +if ! psql --version >/dev/null 2>&1; then + if command -v sudo >/dev/null 2>&1 && sudo -n true 2>/dev/null; then + export DEBIAN_FRONTEND=noninteractive + sudo apt-get update -y >/dev/null + sudo apt-get install -y postgresql-client + else + echo "install: no psql and no sudo to install one" >&2 + exit 1 + fi +fi + +# NEEDED entries, printed rather than assumed: this is the one place a reader can +# see that the file this box is about to run asks for nothing but libc, libm, +# libgcc_s and the loader. +command -v readelf >/dev/null 2>&1 && \ + echo "install: needs $(readelf -d bin/elosdb | sed -n 's/.*Shared library: \[\(.*\)\]/\1/p' | paste -sd' ')" +# The smoke test, and the build stamp: a truncated download or a binary for another +# machine fails here and not in `start`. +./bin/elosdb --version + +# THE PATH THIS WROTE AND THE PATH `start` LAUNCHES ARE ONE FACT, so it is asserted +# rather than assumed — common.sh is sourced only here, at the end, because it needs +# the psql that the block above may have just installed. +. ./common.sh +[ "$ELOSDB_BIN" -ef bin/elosdb ] || { + echo "install: common.sh points \$ELOSDB_BIN at $ELOSDB_BIN, not at the binary this installed" >&2 + exit 1 +} +echo "install: elosdb ready — nothing was compiled on this box" diff --git a/elosdb/load b/elosdb/load new file mode 100755 index 0000000000..f06d0e669e --- /dev/null +++ b/elosdb/load @@ -0,0 +1,36 @@ +#!/bin/bash +# load — hits.parquet (downloaded into this directory by ClickBench's driver) into +# elosdb's own column store, then the row count through the running server. +. "$(dirname "$0")/common.sh" +cd "$ELOSDB_HOME" + +mkdir -p data/clickbench +[ -f hits.parquet ] && mv hits.parquet data/clickbench/hits.parquet +[ -f data/clickbench/hits.parquet ] || { echo "load: no hits.parquet here or under data/clickbench" >&2; exit 1; } + +# THE LOAD IS TWO SQL STATEMENTS, through the server ClickBench already started. +# create.sql declares the 105 columns, their types and their nullability; the COPY +# reads the whole dataset in one statement, which is what lets the string +# dictionaries be global and every column's encoding be priced on that column's +# own values. Nothing is pre-built: the store is written inside the timed window. +rm -rf data/elosdb +"${PSQL[@]}" -tA -v ON_ERROR_STOP=1 -f "$ELOSDB_HOME/create.sql" +# An absolute path: the statement is resolved by the SERVER, whose working +# directory is not this script's. +copied=$("${PSQL[@]}" -tA -c "COPY hits FROM '$ELOSDB_HOME/data/clickbench/hits.parquet'") +echo "load: $copied" +case "$copied" in + "COPY "*) ;; + *) echo "load: the COPY did not report a row count: '$copied'" >&2; exit 1 ;; +esac + +# ClickBench's hits is exactly 99,997,497 rows; anything else is a partial load. +expected=99997497 +got=$("${PSQL[@]}" -tAq -c 'SELECT count(*) FROM hits') +if [ "$got" != "$expected" ]; then + echo "load: hits has '$got' rows, expected $expected" >&2 + exit 1 +fi + +rm -f data/clickbench/hits.parquet +sync diff --git a/elosdb/queries.sql b/elosdb/queries.sql new file mode 100644 index 0000000000..a0ef1cd5b9 --- /dev/null +++ b/elosdb/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(octet_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(octet_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::bigint), SUM(ResolutionWidth::bigint + 1), SUM(ResolutionWidth::bigint + 2), SUM(ResolutionWidth::bigint + 3), SUM(ResolutionWidth::bigint + 4), SUM(ResolutionWidth::bigint + 5), SUM(ResolutionWidth::bigint + 6), SUM(ResolutionWidth::bigint + 7), SUM(ResolutionWidth::bigint + 8), SUM(ResolutionWidth::bigint + 9), SUM(ResolutionWidth::bigint + 10), SUM(ResolutionWidth::bigint + 11), SUM(ResolutionWidth::bigint + 12), SUM(ResolutionWidth::bigint + 13), SUM(ResolutionWidth::bigint + 14), SUM(ResolutionWidth::bigint + 15), SUM(ResolutionWidth::bigint + 16), SUM(ResolutionWidth::bigint + 17), SUM(ResolutionWidth::bigint + 18), SUM(ResolutionWidth::bigint + 19), SUM(ResolutionWidth::bigint + 20), SUM(ResolutionWidth::bigint + 21), SUM(ResolutionWidth::bigint + 22), SUM(ResolutionWidth::bigint + 23), SUM(ResolutionWidth::bigint + 24), SUM(ResolutionWidth::bigint + 25), SUM(ResolutionWidth::bigint + 26), SUM(ResolutionWidth::bigint + 27), SUM(ResolutionWidth::bigint + 28), SUM(ResolutionWidth::bigint + 29), SUM(ResolutionWidth::bigint + 30), SUM(ResolutionWidth::bigint + 31), SUM(ResolutionWidth::bigint + 32), SUM(ResolutionWidth::bigint + 33), SUM(ResolutionWidth::bigint + 34), SUM(ResolutionWidth::bigint + 35), SUM(ResolutionWidth::bigint + 36), SUM(ResolutionWidth::bigint + 37), SUM(ResolutionWidth::bigint + 38), SUM(ResolutionWidth::bigint + 39), SUM(ResolutionWidth::bigint + 40), SUM(ResolutionWidth::bigint + 41), SUM(ResolutionWidth::bigint + 42), SUM(ResolutionWidth::bigint + 43), SUM(ResolutionWidth::bigint + 44), SUM(ResolutionWidth::bigint + 45), SUM(ResolutionWidth::bigint + 46), SUM(ResolutionWidth::bigint + 47), SUM(ResolutionWidth::bigint + 48), SUM(ResolutionWidth::bigint + 49), SUM(ResolutionWidth::bigint + 50), SUM(ResolutionWidth::bigint + 51), SUM(ResolutionWidth::bigint + 52), SUM(ResolutionWidth::bigint + 53), SUM(ResolutionWidth::bigint + 54), SUM(ResolutionWidth::bigint + 55), SUM(ResolutionWidth::bigint + 56), SUM(ResolutionWidth::bigint + 57), SUM(ResolutionWidth::bigint + 58), SUM(ResolutionWidth::bigint + 59), SUM(ResolutionWidth::bigint + 60), SUM(ResolutionWidth::bigint + 61), SUM(ResolutionWidth::bigint + 62), SUM(ResolutionWidth::bigint + 63), SUM(ResolutionWidth::bigint + 64), SUM(ResolutionWidth::bigint + 65), SUM(ResolutionWidth::bigint + 66), SUM(ResolutionWidth::bigint + 67), SUM(ResolutionWidth::bigint + 68), SUM(ResolutionWidth::bigint + 69), SUM(ResolutionWidth::bigint + 70), SUM(ResolutionWidth::bigint + 71), SUM(ResolutionWidth::bigint + 72), SUM(ResolutionWidth::bigint + 73), SUM(ResolutionWidth::bigint + 74), SUM(ResolutionWidth::bigint + 75), SUM(ResolutionWidth::bigint + 76), SUM(ResolutionWidth::bigint + 77), SUM(ResolutionWidth::bigint + 78), SUM(ResolutionWidth::bigint + 79), SUM(ResolutionWidth::bigint + 80), SUM(ResolutionWidth::bigint + 81), SUM(ResolutionWidth::bigint + 82), SUM(ResolutionWidth::bigint + 83), SUM(ResolutionWidth::bigint + 84), SUM(ResolutionWidth::bigint + 85), SUM(ResolutionWidth::bigint + 86), SUM(ResolutionWidth::bigint + 87), SUM(ResolutionWidth::bigint + 88), SUM(ResolutionWidth::bigint + 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; diff --git a/elosdb/query b/elosdb/query new file mode 100755 index 0000000000..471ac05b96 --- /dev/null +++ b/elosdb/query @@ -0,0 +1,27 @@ +#!/bin/bash +# Reads a SQL query from stdin and runs it through psql — the same script umbra +# and cedardb use, so the protocol's cost is the one they pay too. +# Stdout: query result. +# Stderr: query runtime in fractional seconds on the last line (parsed from psql's +# `\timing` "Time: ms" output). +# Exit non-zero on error. +. "$(dirname "$0")/common.sh" + +query=$(cat) + +raw=$("${PSQL[@]}" -v ON_ERROR_STOP=1 -t -c '\timing' -c "$query" 2>&1) && exit_code=0 || exit_code=$? + +if [ "$exit_code" -ne 0 ] || printf '%s\n' "$raw" | grep -qE '^(ERROR|FATAL|PANIC):|psql: error'; then + printf '%s\n' "$raw" >&2 + exit 1 +fi + +printf '%s\n' "$raw" | grep -v '^Time:' + +ms=$(printf '%s\n' "$raw" | grep -oP 'Time:\s*\K[0-9.]+' | tail -n1) +if [ -z "$ms" ]; then + echo "no Time: in psql output" >&2 + exit 1 +fi + +awk -v m="$ms" 'BEGIN { printf "%.3f\n", m / 1000 }' >&2 diff --git a/elosdb/results/20261001/c6a.2xlarge.json b/elosdb/results/20261001/c6a.2xlarge.json new file mode 100644 index 0000000000..ca9afd1b33 --- /dev/null +++ b/elosdb/results/20261001/c6a.2xlarge.json @@ -0,0 +1,60 @@ +{ + "system": "elosdb", + "date": "2026-10-01", + "machine": "c6a.2xlarge", + "cluster_size": 1, + "proprietary": "yes", + "hardware": "cpu", + "tuned": "no", + "tags": ["C++","Rust","column-oriented","PostgreSQL compatible"], + "load_time": 171, + "data_size": 7668470538, + "concurrent_qps": 0.492, + "concurrent_error_ratio": 0, + "result": [ + [0.014, 0.001, 0.001], + [0.046, 0.007, 0.007], + [0.172, 0.01, 0.01], + [0.23, 0.021, 0.022], + [0.315, 0.1, 0.1], + [0.189, 0.032, 0.032], + [0.04, 0.006, 0.006], + [0.05, 0.007, 0.007], + [0.623, 0.386, 0.384], + [0.75, 0.459, 0.452], + [0.33, 0.066, 0.066], + [0.358, 0.072, 0.073], + [0.357, 0.131, 0.135], + [0.659, 0.27, 0.279], + [0.447, 0.143, 0.145], + [0.824, 0.651, 0.543], + [1.15, 0.944, 0.916], + [0.544, 0.31, 0.307], + [2.032, 1.792, 1.777], + [0.16, 0.004, 0.004], + [2.188, 0.153, 0.153], + [2.452, 0.084, 0.082], + [4.717, 0.14, 0.139], + [4.354, 0.02, 0.019], + [0.064, 0.003, 0.003], + [0.151, 0.025, 0.025], + [0.084, 0.003, 0.003], + [3.587, 0.06, 0.06], + [2.273, 0.733, 0.739], + [0.162, 0.008, 0.007], + [0.695, 0.218, 0.202], + [3.011, 0.365, 0.361], + [4.148, 2.67, 2.434], + [0.975, 0.832, 0.833], + [0.998, 0.822, 0.852], + [0.753, 0.516, 0.516], + [0.118, 0.012, 0.013], + [0.107, 0.007, 0.006], + [0.096, 0.006, 0.006], + [0.163, 0.028, 0.036], + [0.136, 0.006, 0.006], + [0.131, 0.011, 0.01], + [0.086, 0.006, 0.005] +] + } + \ No newline at end of file diff --git a/elosdb/results/20261001/c6a.4xlarge.json b/elosdb/results/20261001/c6a.4xlarge.json new file mode 100644 index 0000000000..59e7556cc9 --- /dev/null +++ b/elosdb/results/20261001/c6a.4xlarge.json @@ -0,0 +1,60 @@ +{ + "system": "elosdb", + "date": "2026-10-01", + "machine": "c6a.4xlarge", + "cluster_size": 1, + "proprietary": "yes", + "hardware": "cpu", + "tuned": "no", + "tags": ["C++","Rust","column-oriented","PostgreSQL compatible"], + "load_time": 87, + "data_size": 7668470503, + "concurrent_qps": 3.517, + "concurrent_error_ratio": 0, + "result": [ + [0.013, 0.001, 0.001], + [0.051, 0.005, 0.005], + [0.121, 0.009, 0.008], + [0.15, 0.021, 0.021], + [0.203, 0.061, 0.06], + [0.131, 0.019, 0.019], + [0.067, 0.006, 0.006], + [0.059, 0.005, 0.005], + [0.4, 0.199, 0.199], + [0.495, 0.266, 0.241], + [0.266, 0.042, 0.042], + [0.295, 0.046, 0.046], + [0.251, 0.075, 0.073], + [0.501, 0.217, 0.223], + [0.35, 0.081, 0.08], + [0.506, 0.293, 0.29], + [0.706, 0.418, 0.413], + [0.333, 0.161, 0.16], + [1.237, 0.879, 0.882], + [0.109, 0.004, 0.004], + [2.188, 0.11, 0.112], + [2.449, 0.071, 0.071], + [4.722, 0.118, 0.116], + [4.32, 0.012, 0.012], + [0.068, 0.003, 0.005], + [0.121, 0.015, 0.015], + [0.069, 0.003, 0.005], + [3.432, 0.033, 0.034], + [2.202, 0.424, 0.422], + [0.103, 0.007, 0.007], + [0.488, 0.125, 0.129], + [2.939, 0.177, 0.186], + [3.8, 1.561, 1.562], + [0.582, 0.364, 0.346], + [0.585, 0.357, 0.341], + [0.441, 0.278, 0.276], + [0.101, 0.009, 0.009], + [0.111, 0.007, 0.006], + [0.101, 0.006, 0.006], + [0.157, 0.024, 0.024], + [0.134, 0.006, 0.006], + [0.13, 0.011, 0.011], + [0.086, 0.005, 0.006] +] + } + \ No newline at end of file diff --git a/elosdb/results/20261001/c6a.metal.json b/elosdb/results/20261001/c6a.metal.json new file mode 100644 index 0000000000..ea9ba98052 --- /dev/null +++ b/elosdb/results/20261001/c6a.metal.json @@ -0,0 +1,60 @@ +{ + "system": "elosdb", + "date": "2026-10-01", + "machine": "c6a.metal", + "cluster_size": 1, + "proprietary": "yes", + "hardware": "cpu", + "tuned": "no", + "tags": ["C++","Rust","column-oriented","PostgreSQL compatible"], + "load_time": 40, + "data_size": 7668470464, + "concurrent_qps": 10.633, + "concurrent_error_ratio": 0, + "result": [ + [0.019, 0.001, 0.001], + [0.04, 0.004, 0.004], + [0.073, 0.006, 0.006], + [0.173, 0.014, 0.013], + [0.149, 0.036, 0.036], + [0.092, 0.013, 0.012], + [0.042, 0.005, 0.004], + [0.038, 0.004, 0.003], + [0.268, 0.1, 0.099], + [0.324, 0.14, 0.14], + [0.205, 0.046, 0.045], + [0.239, 0.049, 0.047], + [0.137, 0.042, 0.042], + [0.445, 0.201, 0.202], + [0.178, 0.045, 0.044], + [0.318, 0.142, 0.139], + [0.422, 0.191, 0.185], + [0.208, 0.055, 0.053], + [0.963, 0.436, 0.426], + [0.091, 0.004, 0.004], + [2.19, 0.06, 0.059], + [2.42, 0.046, 0.046], + [4.718, 0.075, 0.075], + [4.316, 0.01, 0.009], + [0.061, 0.004, 0.003], + [0.074, 0.01, 0.009], + [0.064, 0.005, 0.003], + [2.311, 0.015, 0.014], + [2.196, 0.189, 0.19], + [0.058, 0.006, 0.005], + [0.319, 0.076, 0.077], + [2.89, 0.117, 0.118], + [3.4, 0.987, 0.972], + [0.376, 0.187, 0.174], + [0.403, 0.186, 0.179], + [0.289, 0.128, 0.124], + [0.082, 0.009, 0.009], + [0.081, 0.006, 0.005], + [0.071, 0.012, 0.005], + [0.112, 0.021, 0.021], + [0.093, 0.007, 0.005], + [0.101, 0.01, 0.01], + [0.068, 0.005, 0.005] +] + } + \ No newline at end of file diff --git a/elosdb/results/20261001/c6a.xlarge.json b/elosdb/results/20261001/c6a.xlarge.json new file mode 100644 index 0000000000..b71df9e023 --- /dev/null +++ b/elosdb/results/20261001/c6a.xlarge.json @@ -0,0 +1,60 @@ +{ + "system": "elosdb", + "date": "2026-10-01", + "machine": "c6a.xlarge", + "cluster_size": 1, + "proprietary": "yes", + "hardware": "cpu", + "tuned": "no", + "tags": ["C++","Rust","column-oriented","PostgreSQL compatible"], + "load_time": 2349, + "data_size": 7668470565, + "concurrent_qps": 0.232, + "concurrent_error_ratio": 0, + "result": [ + [0.016, 0.001, 0.001], + [0.05, 0.011, 0.012], + [0.237, 0.02, 0.02], + [0.373, 0.023, 0.023], + [0.524, 0.187, 0.187], + [0.283, 0.059, 0.06], + [0.045, 0.007, 0.007], + [0.054, 0.012, 0.012], + [1.073, 0.753, 0.755], + [1.293, 0.877, 0.873], + [0.526, 0.122, 0.122], + [0.562, 0.134, 0.135], + [0.622, 0.248, 0.25], + [1.148, 0.448, 0.445], + [0.572, 0.287, 0.268], + [1.376, 1.217, 1.235], + [2.059, 1.774, 1.8], + [0.935, 0.619, 0.61], + [44.951, 46.273, 58.362], + [0.264, 0.005, 0.005], + [2.277, 0.31, 0.311], + [2.509, 0.151, 0.167], + [5.145, 0.347, 0.238], + [4.327, 0.035, 0.035], + [0.086, 0.003, 0.004], + [0.229, 0.048, 0.048], + [0.099, 0.003, 0.007], + [28.639, 0.163, 0.125], + [3.507, 1.389, 1.383], + [0.221, 0.011, 0.011], + [1.068, 0.516, 0.525], + [3.196, 0.694, 0.711], + [89.511, 149.71, 157.625], + [1.839, 1.592, 1.591], + [1.79, 1.6, 1.577], + [1.29, 0.995, 0.972], + [0.128, 0.018, 0.017], + [0.112, 0.009, 0.009], + [0.102, 0.007, 0.006], + [0.178, 0.045, 0.045], + [0.141, 0.008, 0.007], + [0.131, 0.012, 0.011], + [0.087, 0.007, 0.007] +] + } + \ No newline at end of file diff --git a/elosdb/results/20261001/c7a.metal-48xl.json b/elosdb/results/20261001/c7a.metal-48xl.json new file mode 100644 index 0000000000..1a6df65818 --- /dev/null +++ b/elosdb/results/20261001/c7a.metal-48xl.json @@ -0,0 +1,60 @@ +{ + "system": "elosdb", + "date": "2026-10-01", + "machine": "c7a.metal-48xl", + "cluster_size": 1, + "proprietary": "yes", + "hardware": "cpu", + "tuned": "no", + "tags": ["C++","Rust","column-oriented","PostgreSQL compatible"], + "load_time": 37, + "data_size": 7668470483, + "concurrent_qps": 22.282, + "concurrent_error_ratio": 0, + "result": [ + [0.015, 0.001, 0.001], + [0.034, 0.005, 0.003], + [0.053, 0.002, 0.002], + [0.078, 0.003, 0.003], + [0.083, 0.012, 0.012], + [0.043, 0.008, 0.008], + [0.02, 0.002, 0.002], + [0.026, 0.003, 0.003], + [0.139, 0.066, 0.064], + [0.209, 0.093, 0.125], + [0.099, 0.045, 0.044], + [0.108, 0.088, 0.031], + [0.083, 0.023, 0.021], + [0.174, 0.082, 0.083], + [0.102, 0.023, 0.021], + [0.232, 0.061, 0.059], + [0.236, 0.084, 0.077], + [0.092, 0.02, 0.019], + [0.853, 0.147, 0.179], + [0.058, 0.004, 0.003], + [2.178, 0.017, 0.017], + [2.399, 0.018, 0.017], + [4.711, 0.038, 0.038], + [4.307, 0.01, 0.009], + [0.045, 0.005, 0.004], + [0.042, 0.005, 0.004], + [0.045, 0.005, 0.003], + [2.276, 0.008, 0.007], + [2.176, 0.073, 0.072], + [0.035, 0.003, 0.003], + [0.241, 0.032, 0.029], + [2.858, 0.04, 0.037], + [2.887, 0.185, 0.168], + [0.262, 0.102, 0.083], + [0.266, 0.083, 0.074], + [0.228, 0.056, 0.054], + [0.062, 0.008, 0.009], + [0.089, 0.006, 0.006], + [0.081, 0.007, 0.005], + [0.125, 0.017, 0.022], + [0.106, 0.006, 0.005], + [0.103, 0.011, 0.011], + [0.068, 0.005, 0.005] +] + } + \ No newline at end of file diff --git a/elosdb/results/20261001/c8g.4xlarge.json b/elosdb/results/20261001/c8g.4xlarge.json new file mode 100644 index 0000000000..1b09f21bb5 --- /dev/null +++ b/elosdb/results/20261001/c8g.4xlarge.json @@ -0,0 +1,60 @@ +{ + "system": "elosdb", + "date": "2026-10-01", + "machine": "c8g.4xlarge", + "cluster_size": 1, + "proprietary": "yes", + "hardware": "cpu", + "tuned": "no", + "tags": ["C++","Rust","column-oriented","PostgreSQL compatible"], + "load_time": 46, + "data_size": 7668470459, + "concurrent_qps": 7.465, + "concurrent_error_ratio": 0, + "result": [ + [0.009, 0.001, 0.001], + [0.027, 0.003, 0.003], + [0.113, 0.003, 0.003], + [0.2, 0.005, 0.005], + [0.187, 0.029, 0.029], + [0.12, 0.013, 0.013], + [0.026, 0.002, 0.002], + [0.029, 0.003, 0.003], + [0.314, 0.082, 0.082], + [0.435, 0.112, 0.11], + [0.233, 0.017, 0.017], + [0.255, 0.018, 0.018], + [0.182, 0.032, 0.031], + [0.377, 0.07, 0.07], + [0.271, 0.033, 0.034], + [0.323, 0.111, 0.109], + [0.432, 0.151, 0.148], + [0.303, 0.055, 0.056], + [0.924, 0.332, 0.32], + [0.143, 0.002, 0.002], + [2.178, 0.06, 0.059], + [2.467, 0.026, 0.026], + [4.716, 0.035, 0.035], + [4.317, 0.007, 0.007], + [0.068, 0.003, 0.002], + [0.115, 0.007, 0.006], + [0.068, 0.002, 0.003], + [2.235, 0.018, 0.018], + [2.164, 0.209, 0.209], + [0.105, 0.003, 0.002], + [0.442, 0.047, 0.047], + [2.88, 0.056, 0.062], + [3.154, 0.466, 0.42], + [0.34, 0.141, 0.138], + [0.339, 0.144, 0.135], + [0.248, 0.104, 0.102], + [0.086, 0.004, 0.004], + [0.085, 0.003, 0.003], + [0.074, 0.004, 0.004], + [0.115, 0.011, 0.01], + [0.107, 0.003, 0.003], + [0.104, 0.008, 0.007], + [0.065, 0.003, 0.003] +] + } + \ No newline at end of file diff --git a/elosdb/results/20261001/c8g.metal-48xl.json b/elosdb/results/20261001/c8g.metal-48xl.json new file mode 100644 index 0000000000..42a2b08437 --- /dev/null +++ b/elosdb/results/20261001/c8g.metal-48xl.json @@ -0,0 +1,60 @@ +{ + "system": "elosdb", + "date": "2026-10-01", + "machine": "c8g.metal-48xl", + "cluster_size": 1, + "proprietary": "yes", + "hardware": "cpu", + "tuned": "no", + "tags": ["C++","Rust","column-oriented","PostgreSQL compatible"], + "load_time": 35, + "data_size": 7668470462, + "concurrent_qps": 31.315, + "concurrent_error_ratio": 0, + "result": [ + [0.008, 0.001, 0.001], + [0.025, 0.003, 0.002], + [0.051, 0.002, 0.002], + [0.088, 0.003, 0.002], + [0.112, 0.009, 0.009], + [0.042, 0.006, 0.006], + [0.018, 0.001, 0.001], + [0.021, 0.002, 0.002], + [0.2, 0.041, 0.039], + [0.416, 0.081, 0.059], + [0.208, 0.04, 0.016], + [0.224, 0.066, 0.019], + [0.076, 0.017, 0.016], + [0.199, 0.063, 0.062], + [0.116, 0.017, 0.016], + [0.218, 0.038, 0.033], + [0.272, 0.049, 0.046], + [0.122, 0.016, 0.012], + [0.833, 0.159, 0.1], + [0.079, 0.002, 0.002], + [2.174, 0.013, 0.013], + [2.393, 0.013, 0.013], + [4.708, 0.03, 0.029], + [4.308, 0.006, 0.005], + [0.047, 0.003, 0.004], + [0.04, 0.004, 0.004], + [0.043, 0.003, 0.003], + [2.224, 0.006, 0.006], + [2.152, 0.052, 0.052], + [0.04, 0.002, 0.002], + [0.315, 0.026, 0.023], + [2.88, 0.029, 0.03], + [3.136, 0.172, 0.151], + [0.273, 0.059, 0.063], + [0.268, 0.059, 0.057], + [0.191, 0.034, 0.032], + [0.053, 0.005, 0.005], + [0.051, 0.004, 0.004], + [0.047, 0.005, 0.004], + [0.072, 0.012, 0.012], + [0.086, 0.004, 0.004], + [0.086, 0.009, 0.009], + [0.053, 0.004, 0.004] +] + } + \ No newline at end of file diff --git a/elosdb/results/20261002/c6a.2xlarge.json b/elosdb/results/20261002/c6a.2xlarge.json new file mode 100644 index 0000000000..4b03e4af1b --- /dev/null +++ b/elosdb/results/20261002/c6a.2xlarge.json @@ -0,0 +1,60 @@ +{ + "system": "elosdb", + "date": "2026-10-02", + "machine": "c6a.2xlarge", + "cluster_size": 1, + "proprietary": "yes", + "hardware": "cpu", + "tuned": "no", + "tags": ["C++","Rust","column-oriented","PostgreSQL compatible"], + "load_time": 156, + "data_size": 7668470699, + "concurrent_qps": 3.343, + "concurrent_error_ratio": 0, + "result": [ + [0.013, 0.001, 0.001], + [0.043, 0.007, 0.007], + [0.158, 0.011, 0.011], + [0.257, 0.025, 0.024], + [0.381, 0.101, 0.101], + [0.196, 0.033, 0.033], + [0.043, 0.006, 0.006], + [0.046, 0.008, 0.008], + [0.609, 0.378, 0.376], + [0.749, 0.452, 0.445], + [0.335, 0.06, 0.062], + [0.348, 0.067, 0.067], + [0.293, 0.114, 0.113], + [0.632, 0.268, 0.266], + [0.395, 0.124, 0.124], + [0.684, 0.441, 0.438], + [0.934, 0.659, 0.661], + [0.518, 0.28, 0.281], + [1.585, 1.143, 1.149], + [0.163, 0.004, 0.004], + [2.186, 0.147, 0.15], + [2.463, 0.088, 0.086], + [4.724, 0.137, 0.14], + [4.32, 0.021, 0.02], + [0.079, 0.003, 0.006], + [0.177, 0.024, 0.024], + [0.081, 0.003, 0.003], + [2.203, 0.074, 0.073], + [2.312, 0.745, 0.749], + [0.157, 0.008, 0.008], + [0.706, 0.178, 0.177], + [2.918, 0.199, 0.201], + [3.42, 1.368, 1.362], + [0.784, 0.535, 0.526], + [0.767, 0.525, 0.532], + [0.594, 0.422, 0.426], + [0.103, 0.012, 0.012], + [0.098, 0.007, 0.007], + [0.102, 0.006, 0.006], + [0.157, 0.035, 0.029], + [0.12, 0.006, 0.006], + [0.116, 0.011, 0.01], + [0.081, 0.006, 0.006] +] + } + \ No newline at end of file diff --git a/elosdb/results/20261002/c6a.4xlarge.json b/elosdb/results/20261002/c6a.4xlarge.json new file mode 100644 index 0000000000..1e2a7ae212 --- /dev/null +++ b/elosdb/results/20261002/c6a.4xlarge.json @@ -0,0 +1,60 @@ +{ + "system": "elosdb", + "date": "2026-10-02", + "machine": "c6a.4xlarge", + "cluster_size": 1, + "proprietary": "yes", + "hardware": "cpu", + "tuned": "no", + "tags": ["C++","Rust","column-oriented","PostgreSQL compatible"], + "load_time": 87, + "data_size": 7668470543, + "concurrent_qps": 4.778, + "concurrent_error_ratio": 0, + "result": [ + [0.015, 0.001, 0.001], + [0.046, 0.005, 0.004], + [0.111, 0.008, 0.008], + [0.345, 0.021, 0.021], + [0.24, 0.058, 0.058], + [0.142, 0.018, 0.018], + [0.063, 0.006, 0.006], + [0.054, 0.005, 0.005], + [0.393, 0.199, 0.196], + [0.476, 0.262, 0.235], + [0.268, 0.039, 0.039], + [0.286, 0.043, 0.042], + [0.22, 0.06, 0.061], + [0.463, 0.21, 0.212], + [0.299, 0.067, 0.067], + [0.419, 0.24, 0.24], + [0.605, 0.345, 0.347], + [0.896, 0.146, 0.14], + [1.129, 0.587, 0.589], + [0.165, 0.004, 0.004], + [2.186, 0.103, 0.104], + [2.451, 0.068, 0.068], + [4.732, 0.112, 0.113], + [4.323, 0.011, 0.011], + [0.074, 0.005, 0.004], + [0.13, 0.014, 0.014], + [0.069, 0.005, 0.003], + [3.37, 0.028, 0.028], + [2.207, 0.404, 0.403], + [0.105, 0.007, 0.007], + [0.452, 0.101, 0.101], + [2.89, 0.144, 0.143], + [3.422, 1.098, 1.077], + [0.473, 0.292, 0.285], + [0.466, 0.296, 0.286], + [0.37, 0.226, 0.226], + [0.113, 0.008, 0.008], + [0.107, 0.005, 0.005], + [0.092, 0.005, 0.005], + [0.141, 0.022, 0.022], + [0.117, 0.005, 0.005], + [0.115, 0.009, 0.009], + [0.079, 0.005, 0.004] +] + } + \ No newline at end of file diff --git a/elosdb/results/20261002/c6a.large.json b/elosdb/results/20261002/c6a.large.json new file mode 100644 index 0000000000..ac488fe245 --- /dev/null +++ b/elosdb/results/20261002/c6a.large.json @@ -0,0 +1,60 @@ +{ + "system": "elosdb", + "date": "2026-10-02", + "machine": "c6a.large", + "cluster_size": 1, + "proprietary": "yes", + "hardware": "cpu", + "tuned": "no", + "tags": ["C++","Rust","column-oriented","PostgreSQL compatible"], + "load_time": 2719, + "data_size": 7668470799, + "concurrent_qps": 0.14, + "concurrent_error_ratio": 0, + "result": [ + [0.014, 0.002, 0.002], + [0.058, 0.021, 0.021], + [0.224, 0.042, 0.042], + [0.517, 0.043, 0.043], + [0.806, 0.356, 0.358], + [0.39, 0.117, 0.117], + [0.048, 0.011, 0.01], + [0.065, 0.022, 0.022], + [1.946, 1.474, 1.468], + [2.392, 1.724, 1.728], + [0.779, 0.213, 0.213], + [0.823, 0.235, 0.234], + [0.681, 0.415, 0.416], + [1.419, 0.728, 0.727], + [0.851, 0.467, 0.466], + [2.014, 1.688, 1.693], + [3.029, 2.511, 2.499], + [1.528, 1.099, 1.093], + [47.332, 57.472, 37.518], + [0.396, 0.008, 0.007], + [4.977, 12.987, 13.575], + [20.035, 0.34, 0.261], + [19.674, 19.292, 0.45], + [8.203, 0.658, 0.07], + [0.117, 0.003, 0.013], + [0.402, 0.089, 0.089], + [0.117, 0.003, 0.003], + [3.092, 0.255, 0.256], + [10.175, 15.603, 14.572], + [0.199, 0.022, 0.021], + [1.414, 0.617, 0.619], + [3.213, 0.712, 0.712], + [93.393, 95.645, 93.501], + [2.436, 2.023, 2.023], + [2.387, 2.029, 1.999], + [1.916, 1.663, 1.662], + [0.14, 0.03, 0.031], + [0.114, 0.016, 0.015], + [0.094, 0.007, 0.007], + [0.205, 0.075, 0.074], + [0.128, 0.012, 0.012], + [0.121, 0.013, 0.013], + [0.083, 0.011, 0.011] +] + } + \ No newline at end of file diff --git a/elosdb/results/20261002/c6a.metal.json b/elosdb/results/20261002/c6a.metal.json new file mode 100644 index 0000000000..f3d46ddb5e --- /dev/null +++ b/elosdb/results/20261002/c6a.metal.json @@ -0,0 +1,60 @@ +{ + "system": "elosdb", + "date": "2026-10-02", + "machine": "c6a.metal", + "cluster_size": 1, + "proprietary": "yes", + "hardware": "cpu", + "tuned": "no", + "tags": ["C++","Rust","column-oriented","PostgreSQL compatible"], + "load_time": 41, + "data_size": 7668470477, + "concurrent_qps": 13.942, + "concurrent_error_ratio": 0, + "result": [ + [0.014, 0.002, 0.001], + [0.041, 0.005, 0.003], + [0.068, 0.007, 0.006], + [0.123, 0.014, 0.012], + [0.156, 0.037, 0.037], + [0.091, 0.013, 0.012], + [0.047, 0.005, 0.004], + [0.046, 0.004, 0.004], + [0.249, 0.096, 0.096], + [0.346, 0.138, 0.142], + [0.198, 0.046, 0.045], + [0.214, 0.048, 0.047], + [0.133, 0.031, 0.033], + [0.375, 0.2, 0.203], + [0.18, 0.036, 0.036], + [0.305, 0.112, 0.109], + [0.363, 0.144, 0.143], + [0.18, 0.048, 0.05], + [0.856, 0.293, 0.291], + [0.071, 0.004, 0.004], + [2.178, 0.059, 0.058], + [2.413, 0.045, 0.046], + [4.711, 0.075, 0.074], + [4.358, 0.009, 0.01], + [0.043, 0.004, 0.003], + [0.072, 0.01, 0.008], + [0.053, 0.003, 0.003], + [2.296, 0.014, 0.013], + [2.194, 0.184, 0.183], + [0.045, 0.006, 0.005], + [0.296, 0.06, 0.06], + [2.873, 0.091, 0.091], + [3.149, 0.691, 0.679], + [0.304, 0.139, 0.136], + [0.306, 0.139, 0.133], + [0.26, 0.106, 0.106], + [0.092, 0.009, 0.008], + [0.087, 0.007, 0.005], + [0.085, 0.007, 0.005], + [0.121, 0.021, 0.02], + [0.105, 0.006, 0.006], + [0.104, 0.011, 0.01], + [0.072, 0.005, 0.006] +] + } + \ No newline at end of file diff --git a/elosdb/results/20261002/c6a.xlarge.json b/elosdb/results/20261002/c6a.xlarge.json new file mode 100644 index 0000000000..f47487cfe8 --- /dev/null +++ b/elosdb/results/20261002/c6a.xlarge.json @@ -0,0 +1,60 @@ +{ + "system": "elosdb", + "date": "2026-10-02", + "machine": "c6a.xlarge", + "cluster_size": 1, + "proprietary": "yes", + "hardware": "cpu", + "tuned": "no", + "tags": ["C++","Rust","column-oriented","PostgreSQL compatible"], + "load_time": 257, + "data_size": 7668470703, + "concurrent_qps": 0.773, + "concurrent_error_ratio": 0, + "result": [ + [0.014, 0.001, 0.001], + [0.045, 0.011, 0.011], + [0.214, 0.021, 0.021], + [0.369, 0.022, 0.022], + [0.514, 0.183, 0.184], + [0.285, 0.06, 0.059], + [0.04, 0.006, 0.006], + [0.056, 0.012, 0.012], + [1.043, 0.734, 0.734], + [1.264, 0.854, 0.848], + [0.49, 0.109, 0.109], + [0.585, 0.121, 0.12], + [0.411, 0.209, 0.209], + [0.945, 0.403, 0.395], + [0.482, 0.238, 0.236], + [1.091, 0.842, 0.843], + [1.567, 1.261, 1.259], + [0.844, 0.552, 0.554], + [2.517, 2.072, 2.075], + [0.328, 0.005, 0.005], + [2.604, 0.3, 0.306], + [2.501, 0.132, 0.133], + [9.018, 14.685, 0.201], + [4.319, 0.035, 0.035], + [0.093, 0.004, 0.003], + [0.26, 0.047, 0.047], + [0.09, 0.003, 0.003], + [2.2, 0.127, 0.127], + [3.209, 1.387, 1.318], + [0.222, 0.012, 0.012], + [0.906, 0.311, 0.31], + [3.008, 0.358, 0.358], + [3.952, 2.312, 2.335], + [1.274, 0.987, 0.987], + [1.277, 1, 0.992], + [0.989, 0.818, 0.816], + [0.12, 0.016, 0.016], + [0.097, 0.009, 0.009], + [0.102, 0.006, 0.006], + [0.186, 0.042, 0.04], + [0.15, 0.007, 0.007], + [0.136, 0.011, 0.011], + [0.091, 0.007, 0.007] +] + } + \ No newline at end of file diff --git a/elosdb/results/20261002/c7a.metal-48xl.json b/elosdb/results/20261002/c7a.metal-48xl.json new file mode 100644 index 0000000000..6fbf98f8d6 --- /dev/null +++ b/elosdb/results/20261002/c7a.metal-48xl.json @@ -0,0 +1,60 @@ +{ + "system": "elosdb", + "date": "2026-10-02", + "machine": "c7a.metal-48xl", + "cluster_size": 1, + "proprietary": "yes", + "hardware": "cpu", + "tuned": "no", + "tags": ["C++","Rust","column-oriented","PostgreSQL compatible"], + "load_time": 39, + "data_size": 7668470482, + "concurrent_qps": 29.045, + "concurrent_error_ratio": 0, + "result": [ + [0.015, 0.001, 0.001], + [0.036, 0.005, 0.003], + [0.051, 0.002, 0.002], + [0.08, 0.003, 0.003], + [0.113, 0.012, 0.012], + [0.058, 0.008, 0.008], + [0.028, 0.002, 0.002], + [0.035, 0.003, 0.003], + [0.245, 0.065, 0.062], + [0.295, 0.118, 0.089], + [0.127, 0.045, 0.044], + [0.131, 0.046, 0.045], + [0.091, 0.016, 0.016], + [0.241, 0.082, 0.083], + [0.106, 0.017, 0.016], + [0.159, 0.06, 0.045], + [0.217, 0.076, 0.075], + [0.121, 0.02, 0.022], + [0.763, 0.105, 0.102], + [0.078, 0.004, 0.003], + [2.183, 0.017, 0.017], + [2.409, 0.018, 0.017], + [4.716, 0.039, 0.037], + [4.317, 0.009, 0.008], + [0.06, 0.005, 0.004], + [0.049, 0.005, 0.004], + [0.056, 0.005, 0.004], + [2.257, 0.007, 0.008], + [2.198, 0.07, 0.075], + [0.044, 0.003, 0.003], + [0.212, 0.022, 0.021], + [2.84, 0.024, 0.024], + [2.691, 0.117, 0.104], + [0.194, 0.072, 0.071], + [0.231, 0.073, 0.072], + [0.148, 0.043, 0.045], + [0.081, 0.007, 0.007], + [0.079, 0.006, 0.006], + [0.072, 0.008, 0.006], + [0.106, 0.016, 0.022], + [0.096, 0.005, 0.005], + [0.092, 0.011, 0.011], + [0.062, 0.005, 0.005] +] + } + \ No newline at end of file diff --git a/elosdb/results/20261002/c8g.4xlarge.json b/elosdb/results/20261002/c8g.4xlarge.json new file mode 100644 index 0000000000..e55746c2a7 --- /dev/null +++ b/elosdb/results/20261002/c8g.4xlarge.json @@ -0,0 +1,60 @@ +{ + "system": "elosdb", + "date": "2026-10-02", + "machine": "c8g.4xlarge", + "cluster_size": 1, + "proprietary": "yes", + "hardware": "cpu", + "tuned": "no", + "tags": ["C++","Rust","column-oriented","PostgreSQL compatible"], + "load_time": 46, + "data_size": 7668470502, + "concurrent_qps": 12.195, + "concurrent_error_ratio": 0, + "result": [ + [0.01, 0.001, 0], + [0.028, 0.003, 0.003], + [0.095, 0.003, 0.003], + [0.13, 0.005, 0.005], + [0.152, 0.029, 0.029], + [0.102, 0.013, 0.013], + [0.025, 0.001, 0.001], + [0.028, 0.003, 0.003], + [0.258, 0.081, 0.081], + [0.314, 0.111, 0.109], + [0.182, 0.017, 0.017], + [0.179, 0.018, 0.018], + [0.147, 0.028, 0.028], + [0.334, 0.069, 0.069], + [0.227, 0.03, 0.03], + [0.22, 0.096, 0.097], + [0.3, 0.135, 0.135], + [0.227, 0.057, 0.053], + [0.833, 0.224, 0.223], + [0.116, 0.002, 0.002], + [2.178, 0.059, 0.059], + [2.415, 0.025, 0.026], + [4.735, 0.035, 0.035], + [4.313, 0.007, 0.007], + [0.057, 0.002, 0.005], + [0.096, 0.007, 0.007], + [0.06, 0.003, 0.002], + [2.236, 0.017, 0.017], + [2.162, 0.21, 0.209], + [0.087, 0.003, 0.003], + [0.793, 0.04, 0.04], + [2.843, 0.046, 0.046], + [2.845, 0.265, 0.266], + [0.784, 0.12, 0.122], + [0.265, 0.123, 0.12], + [0.193, 0.093, 0.092], + [0.078, 0.005, 0.004], + [0.077, 0.003, 0.003], + [0.071, 0.004, 0.004], + [0.11, 0.012, 0.01], + [0.098, 0.003, 0.003], + [0.097, 0.007, 0.007], + [0.06, 0.003, 0.003] +] + } + \ No newline at end of file diff --git a/elosdb/results/20261002/c8g.metal-48xl.json b/elosdb/results/20261002/c8g.metal-48xl.json new file mode 100644 index 0000000000..a2323aac07 --- /dev/null +++ b/elosdb/results/20261002/c8g.metal-48xl.json @@ -0,0 +1,60 @@ +{ + "system": "elosdb", + "date": "2026-10-02", + "machine": "c8g.metal-48xl", + "cluster_size": 1, + "proprietary": "yes", + "hardware": "cpu", + "tuned": "no", + "tags": ["C++","Rust","column-oriented","PostgreSQL compatible"], + "load_time": 37, + "data_size": 7668470465, + "concurrent_qps": 38.665, + "concurrent_error_ratio": 0, + "result": [ + [0.01, 0.001, 0.001], + [0.026, 0.003, 0.002], + [0.043, 0.002, 0.002], + [0.066, 0.003, 0.002], + [0.08, 0.009, 0.009], + [0.04, 0.006, 0.006], + [0.02, 0.001, 0.001], + [0.022, 0.002, 0.002], + [0.12, 0.04, 0.04], + [0.179, 0.062, 0.062], + [0.102, 0.028, 0.027], + [0.107, 0.029, 0.029], + [0.066, 0.011, 0.011], + [0.161, 0.062, 0.062], + [0.076, 0.012, 0.011], + [0.121, 0.037, 0.026], + [0.143, 0.045, 0.044], + [0.088, 0.013, 0.011], + [0.736, 0.062, 0.059], + [0.093, 0.002, 0.002], + [2.176, 0.013, 0.013], + [2.393, 0.013, 0.012], + [4.708, 0.029, 0.029], + [4.305, 0.006, 0.005], + [0.042, 0.003, 0.003], + [0.034, 0.004, 0.004], + [0.044, 0.003, 0.003], + [2.223, 0.006, 0.006], + [2.168, 0.055, 0.055], + [0.032, 0.002, 0.002], + [0.144, 0.015, 0.015], + [2.828, 0.018, 0.018], + [2.706, 0.119, 0.117], + [0.142, 0.052, 0.052], + [0.147, 0.054, 0.05], + [0.1, 0.036, 0.036], + [0.054, 0.005, 0.005], + [0.052, 0.004, 0.004], + [0.052, 0.005, 0.005], + [0.08, 0.012, 0.012], + [0.09, 0.004, 0.004], + [0.09, 0.009, 0.009], + [0.055, 0.004, 0.004] +] + } + \ No newline at end of file diff --git a/elosdb/start b/elosdb/start new file mode 100755 index 0000000000..9a1d4c7d71 --- /dev/null +++ b/elosdb/start @@ -0,0 +1,33 @@ +#!/bin/bash +# start — one elosdb on 127.0.0.1:$ELOSDB_PORT. Returns at once; ./check is the +# readiness signal. +# +# `tuned: no` is a claim this script has to keep, so the only flags are the two +# facts that are about THIS deployment: which port to answer on and where the data +# is. Everything else is a default in the binary — every core, the workers pinned, +# and a memory ceiling read from the cgroup. +. "$(dirname "$0")/common.sh" +cd "$ELOSDB_HOME" +./check >/dev/null 2>&1 && exit 0 + +nohup "$ELOSDB_BIN" --port "$ELOSDB_PORT" --data-dir "$ELOSDB_DATA/elosdb" \ + --log "$ELOSDB_HOME/serve.tsv" >> "$ELOSDB_HOME/serve.log" 2>&1 & +echo $! > elosdb.pid + +# One banner line reports whether large allocations got 2 MB pages. When they do +# not, a quarter of the queries run several times slower with nothing else in the +# output saying so — so a run that cannot make that claim fails here, and a line +# that never arrives fails too, because a dead server would otherwise read as a pass. +seen="" +for _ in $(seq 1 40); do + grep -q "^ malloc:" serve.log && { seen=1; break; } + sleep 0.25 +done +if [ -z "$seen" ]; then + echo "start: elosdb printed no 'malloc:' banner line in 10 s — see serve.log" >&2 + exit 1 +fi +if grep -q "^ malloc: WARNING" serve.log; then + echo "start: elosdb could not get 2 MB pages — see serve.log" >&2 + exit 1 +fi diff --git a/elosdb/stop b/elosdb/stop new file mode 100755 index 0000000000..569b702ade --- /dev/null +++ b/elosdb/stop @@ -0,0 +1,12 @@ +#!/bin/bash +# stop — SIGTERM the server and wait until it is gone, so the driver's drop_caches +# finds no process still holding the store's pages mapped. +. "$(dirname "$0")/common.sh" +cd "$ELOSDB_HOME" +if [ -f elosdb.pid ]; then kill "$(cat elosdb.pid)" 2>/dev/null || true; fi +pkill -f "^$ELOSDB_BIN --port " 2>/dev/null || true +for _ in $(seq 1 60); do + pgrep -f "^$ELOSDB_BIN --port " >/dev/null 2>&1 || break + sleep 0.5 +done +rm -f elosdb.pid diff --git a/elosdb/template.json b/elosdb/template.json new file mode 100644 index 0000000000..c12605e87a --- /dev/null +++ b/elosdb/template.json @@ -0,0 +1,12 @@ +{ + "system": "elosdb", + "proprietary": "yes", + "hardware": "cpu", + "tuned": "no", + "tags": [ + "C++", + "Rust", + "column-oriented", + "PostgreSQL compatible" + ] +}