Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions hyrise/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
FROM ubuntu:25.04 AS build

ENV DEBIAN_FRONTEND=noninteractive
ENV HYRISE_HEADLESS_SETUP=1

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
autoconf \
bash-completion \
bc \
ca-certificates \
clang-19 \
clang-20 \
cmake \
curl \
dos2unix \
g++-13 \
g++-15 \
gcc-13 \
gcc-15 \
git \
libboost-all-dev \
libhwloc-dev \
libncurses-dev \
libnuma-dev \
libnuma1 \
libpq-dev \
libreadline-dev \
libsqlite3-dev \
libtbb-dev \
lld-20 \
llvm-20 \
lsb-release \
make \
ninja-build \
parallel \
postgresql-server-dev-all \
python3 \
python3-pip \
software-properties-common \
sudo \
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-15 90 --slave /usr/bin/g++ g++ /usr/bin/g++-15 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Pin a specific Hyrise revision for reproducibility (defaults to master).
ARG HYRISE_REF=master
# Set NO_LTO=TRUE to disable Link Time Optimization (much faster build, slightly
# lower runtime performance — useful for development/testing). Default: LTO on.
ARG NO_LTO=FALSE

WORKDIR /opt
RUN git clone https://github.com/hyrise/hyrise.git \
&& cd hyrise \
&& git checkout "${HYRISE_REF}" \
&& git submodule update --jobs 8 --init --recursive --depth 1

WORKDIR /opt/hyrise/cmake-build-release
RUN cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DNO_LTO=${NO_LTO} .. \
&& ninja hyriseServer

FROM ubuntu:25.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libboost-system1.83.0 \
libboost-thread1.83.0 \
libhwloc15 \
libnuma1 \
libsqlite3-0 \
libtbb12 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

COPY --from=build /opt/hyrise/cmake-build-release/hyriseServer /usr/local/bin/hyriseServer
COPY --from=build /opt/hyrise/cmake-build-release/lib/libhyrise_impl.so /usr/local/lib/
COPY --from=build /opt/hyrise/cmake-build-release/third_party/jemalloc/lib/libjemalloc.so.2 /usr/local/lib/
RUN ldconfig

EXPOSE 5432
ENTRYPOINT ["/usr/local/bin/hyriseServer"]
CMD ["5432"]
11 changes: 11 additions & 0 deletions hyrise/benchmark.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
# Thin shim — actual flow is in lib/benchmark-common.sh.
#
# Hyrise has no on-disk persistence: every restart resurfaces with an empty
# catalog and the dataset must be re-loaded into RAM. BENCH_DURABLE=no makes
# the driver re-run ./load on every cold cycle (and roll that wall-clock into
# the cold-try timing) so each "cold" number genuinely measures
# load+query against a fresh in-memory dataset.
export BENCH_DOWNLOAD_SCRIPT="download-hits-csv"
export BENCH_DURABLE=no
exec ../lib/benchmark-common.sh
4 changes: 4 additions & 0 deletions hyrise/check
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
set -e

psql -h 127.0.0.1 -p 5432 -U postgres -c 'SELECT 1' >/dev/null
10 changes: 10 additions & 0 deletions hyrise/data-size
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
set -eu

# Hyrise has no on-disk persistence; report the total in-memory segment
# size from meta_segments. Strip any whitespace so the driver's strict
# digits-only regex check passes.
psql -h 127.0.0.1 -p 5432 -U postgres -t -A \
-c "SELECT SUM(estimated_size_in_bytes) FROM meta_segments WHERE table_name = 'hits';" \
| tr -d '[:space:]'
echo
116 changes: 116 additions & 0 deletions hyrise/hits.csv.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
{
"config": {
"rfc_mode": true,
"separator": ",",
"quote": "\"",
"escape": "\"",
"delimiter": "\n"
},
"columns": [
{"name": "WatchID", "type": "long", "nullable": false},
{"name": "JavaEnable", "type": "int", "nullable": false},
{"name": "Title", "type": "string", "nullable": false},
{"name": "GoodEvent", "type": "int", "nullable": false},
{"name": "EventTime", "type": "string", "nullable": false},
{"name": "EventDate", "type": "string", "nullable": false},
{"name": "CounterID", "type": "int", "nullable": false},
{"name": "ClientIP", "type": "int", "nullable": false},
{"name": "RegionID", "type": "int", "nullable": false},
{"name": "UserID", "type": "long", "nullable": false},
{"name": "CounterClass", "type": "int", "nullable": false},
{"name": "OS", "type": "int", "nullable": false},
{"name": "UserAgent", "type": "int", "nullable": false},
{"name": "URL", "type": "string", "nullable": false},
{"name": "Referer", "type": "string", "nullable": false},
{"name": "IsRefresh", "type": "int", "nullable": false},
{"name": "RefererCategoryID", "type": "int", "nullable": false},
{"name": "RefererRegionID", "type": "int", "nullable": false},
{"name": "URLCategoryID", "type": "int", "nullable": false},
{"name": "URLRegionID", "type": "int", "nullable": false},
{"name": "ResolutionWidth", "type": "int", "nullable": false},
{"name": "ResolutionHeight", "type": "int", "nullable": false},
{"name": "ResolutionDepth", "type": "int", "nullable": false},
{"name": "FlashMajor", "type": "int", "nullable": false},
{"name": "FlashMinor", "type": "int", "nullable": false},
{"name": "FlashMinor2", "type": "string", "nullable": false},
{"name": "NetMajor", "type": "int", "nullable": false},
{"name": "NetMinor", "type": "int", "nullable": false},
{"name": "UserAgentMajor", "type": "int", "nullable": false},
{"name": "UserAgentMinor", "type": "string", "nullable": false},
{"name": "CookieEnable", "type": "int", "nullable": false},
{"name": "JavascriptEnable", "type": "int", "nullable": false},
{"name": "IsMobile", "type": "int", "nullable": false},
{"name": "MobilePhone", "type": "int", "nullable": false},
{"name": "MobilePhoneModel", "type": "string", "nullable": false},
{"name": "Params", "type": "string", "nullable": false},
{"name": "IPNetworkID", "type": "int", "nullable": false},
{"name": "TraficSourceID", "type": "int", "nullable": false},
{"name": "SearchEngineID", "type": "int", "nullable": false},
{"name": "SearchPhrase", "type": "string", "nullable": false},
{"name": "AdvEngineID", "type": "int", "nullable": false},
{"name": "IsArtifical", "type": "int", "nullable": false},
{"name": "WindowClientWidth", "type": "int", "nullable": false},
{"name": "WindowClientHeight", "type": "int", "nullable": false},
{"name": "ClientTimeZone", "type": "int", "nullable": false},
{"name": "ClientEventTime", "type": "string", "nullable": false},
{"name": "SilverlightVersion1", "type": "int", "nullable": false},
{"name": "SilverlightVersion2", "type": "int", "nullable": false},
{"name": "SilverlightVersion3", "type": "int", "nullable": false},
{"name": "SilverlightVersion4", "type": "int", "nullable": false},
{"name": "PageCharset", "type": "string", "nullable": false},
{"name": "CodeVersion", "type": "int", "nullable": false},
{"name": "IsLink", "type": "int", "nullable": false},
{"name": "IsDownload", "type": "int", "nullable": false},
{"name": "IsNotBounce", "type": "int", "nullable": false},
{"name": "FUniqID", "type": "long", "nullable": false},
{"name": "OriginalURL", "type": "string", "nullable": false},
{"name": "HID", "type": "int", "nullable": false},
{"name": "IsOldCounter", "type": "int", "nullable": false},
{"name": "IsEvent", "type": "int", "nullable": false},
{"name": "IsParameter", "type": "int", "nullable": false},
{"name": "DontCountHits", "type": "int", "nullable": false},
{"name": "WithHash", "type": "int", "nullable": false},
{"name": "HitColor", "type": "string", "nullable": false},
{"name": "LocalEventTime", "type": "string", "nullable": false},
{"name": "Age", "type": "int", "nullable": false},
{"name": "Sex", "type": "int", "nullable": false},
{"name": "Income", "type": "int", "nullable": false},
{"name": "Interests", "type": "int", "nullable": false},
{"name": "Robotness", "type": "int", "nullable": false},
{"name": "RemoteIP", "type": "int", "nullable": false},
{"name": "WindowName", "type": "int", "nullable": false},
{"name": "OpenerName", "type": "int", "nullable": false},
{"name": "HistoryLength", "type": "int", "nullable": false},
{"name": "BrowserLanguage", "type": "string", "nullable": false},
{"name": "BrowserCountry", "type": "string", "nullable": false},
{"name": "SocialNetwork", "type": "string", "nullable": false},
{"name": "SocialAction", "type": "string", "nullable": false},
{"name": "HTTPError", "type": "int", "nullable": false},
{"name": "SendTiming", "type": "int", "nullable": false},
{"name": "DNSTiming", "type": "int", "nullable": false},
{"name": "ConnectTiming", "type": "int", "nullable": false},
{"name": "ResponseStartTiming", "type": "int", "nullable": false},
{"name": "ResponseEndTiming", "type": "int", "nullable": false},
{"name": "FetchTiming", "type": "int", "nullable": false},
{"name": "SocialSourceNetworkID", "type": "int", "nullable": false},
{"name": "SocialSourcePage", "type": "string", "nullable": false},
{"name": "ParamPrice", "type": "long", "nullable": false},
{"name": "ParamOrderID", "type": "string", "nullable": false},
{"name": "ParamCurrency", "type": "string", "nullable": false},
{"name": "ParamCurrencyID", "type": "int", "nullable": false},
{"name": "OpenstatServiceName", "type": "string", "nullable": false},
{"name": "OpenstatCampaignID", "type": "string", "nullable": false},
{"name": "OpenstatAdID", "type": "string", "nullable": false},
{"name": "OpenstatSourceID", "type": "string", "nullable": false},
{"name": "UTMSource", "type": "string", "nullable": false},
{"name": "UTMMedium", "type": "string", "nullable": false},
{"name": "UTMCampaign", "type": "string", "nullable": false},
{"name": "UTMContent", "type": "string", "nullable": false},
{"name": "UTMTerm", "type": "string", "nullable": false},
{"name": "FromTag", "type": "string", "nullable": false},
{"name": "HasGCLID", "type": "int", "nullable": false},
{"name": "RefererHash", "type": "long", "nullable": false},
{"name": "URLHash", "type": "long", "nullable": false},
{"name": "CLID", "type": "int", "nullable": false}
]
}
17 changes: 17 additions & 0 deletions hyrise/install
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
set -eu

sudo apt-get update -y
sudo apt-get install -y docker.io postgresql-client gzip

# Hyrise has no upstream binary distribution and the build requires a
# recent toolchain (gcc-15 / clang-20). Build inside Docker on top of
# Ubuntu 25.04, then ship just the binary and its runtime libs in a slim
# image.
sudo docker build -t clickbench-hyrise .

# The bind-mounted /data dir must exist before docker run (created here
# instead of in ./load so ./start can be called before the first ./load
# without erroring on a missing mount source).
mkdir -p data
chmod 777 data
22 changes: 22 additions & 0 deletions hyrise/load
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
set -eu

# Stage hits.csv next to hits.csv.json under data/. The bind mount on
# the container exposes this dir as /data:ro.
#
# Idempotent: BENCH_DURABLE=no triggers ./load again on every cold cycle.
# The first invocation moves hits.csv (delivered into cwd by
# download-hits-csv) into data/; subsequent invocations reuse the staged
# file because the dataset is many GB and re-downloading it per cycle
# would blow up the run time without changing the measurement.
if [ -f hits.csv ]; then
cp hits.csv.json data/
mv -f hits.csv data/hits.csv
fi

# COPY into a not-yet-existing table works because hits.csv.json next to
# the data file tells Hyrise's CSV parser the column types — running
# CREATE TABLE first and then COPY trips an internal Hyrise assertion.
psql -h 127.0.0.1 -p 5432 -U postgres -v ON_ERROR_STOP=1 -q \
-c "COPY hits FROM '/data/hits.csv' WITH (FORMAT CSV);"
sync
Loading