Skip to main content

Synthesizing Databases for your Workload

Project description

SynnoDB

SynnoDB Repository (internal)

CMDs at the moment:

# gen storage plan
python run_gen_storage_plan.py --model anthropic/claude-sonnet-4-6 --queries 1-22 --benchmark tpch --auto_finish --disable_openai_tracing --notify --db_storage ssd --auto_u

# run gen base
python run_gen_base_impl.py --model anthropic/claude-sonnet-4-6 --benchmark tpch --bespoke_storage --storage_plan_run_id 8xn0t04p --queries 1-22 --auto_finish --disable_openai_tracing --notify --db_storage ssd --auto_u

# run optim
python run_optim_loop.py --model anthropic/claude-sonnet-4-6 --benchmark tpch --bespoke_storage --base_impl_run_id q45vm9fz --queries 1-22 --disable_openai_tracing --auto_u --auto_finish --notify --db_storage ssd

# test correctness at larger SF
python run_check_sf_correctness.py --model anthropic/claude-sonnet-4-6 --benchmark tpch --bespoke_storage --source_run_id 0br4bjqb --queries 1-22 --disable_openai_tracing --auto_u --auto_finish --notify --db_storage ssd --target_sf 50

# add multi-threading
python run_add_multi_threading.py --model anthropic/claude-sonnet-4-6 --benchmark tpch --bespoke_storage --optim_run_id 0br4bjqb --queries 1-22 --disable_openai_tracing --auto_u --auto_finish --notify --db_storage ssd

Prerequisites

  • Linux (x86-64)
  • C++ toolchain (gcc / clang)
  • Python 3.10+
  • uv package manager
  • Apache Arrow and Parquet development libraries
  • cloc (used to track generated code size)

Installation

1. Install uv

curl -LsSf https://astral.sh/uv/install.sh | sh

Optional: Setup Weights & Biases (wandb) account and API key for experiment tracking. You can sign up for free at https://wandb.ai/.

2. Install Arrow and Parquet libraries

wget https://packages.apache.org/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
sudo apt install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
sudo apt update
sudo apt install -y libarrow-dev libparquet-dev parquet-tools

3. Install cloc

sudo apt install -y cloc

4. Install Python dependencies

uv sync

5. Configure environment

Create a .env file with your API keys:

OPENAI_API_KEY=...
WANDB_ENTITY=... # Optional, e.g. "my-team"
WANDB_PROJECT=... # Optional, e.g. "bespoke-olap"

6. Prepare Parquet data

Place TPC-H or CEB Parquet files in your artifacts directory (default: /mnt/labstore/bespoke_olap/). The path can be overridden with --base_parquet_dir.

Development

Inspect running engine processes

watch -n1 -d ./misc/get_db_procs.sh

Remote snapshot cache (optional)

To share snapshots across machines, set up a bare git repository and start a git daemon:

git init --bare synno_cache.git
touch synno_cache.git/git-daemon-export-ok

git daemon \
    --base-path=./ \
    --export-all \
    --enable=receive-pack \
    --reuseaddr \
    --verbose

The cache URL is git://<hostname>/synno_cache.git. Pass it via the .env file, or leave it unset to use only the local snapshot cache (with --disable_repo_sync).

Delete snapshot:

git -C /home/jwehrstein/bespoke_olap/output --git-dir=/home/jwehrstein/bespoke_olap/output/.git update-ref -d
      refs/snapshots/snapshot-<hash>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

synnodb-0.1.0.tar.gz (447.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

synnodb-0.1.0-py3-none-any.whl (516.0 kB view details)

Uploaded Python 3

File details

Details for the file synnodb-0.1.0.tar.gz.

File metadata

  • Download URL: synnodb-0.1.0.tar.gz
  • Upload date:
  • Size: 447.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for synnodb-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fd1b40a75a42b693b8f8e786fcb257b933d108fd9af6d49d3772580036c36dfd
MD5 d89f1980abdd6f86da8addc834af2522
BLAKE2b-256 8586cd4fd28c89e4662b8a3c190cbb025dc9dec39ea6f144959633945a5d1cb1

See more details on using hashes here.

Provenance

The following attestation bundles were made for synnodb-0.1.0.tar.gz:

Publisher: publish-to-pypi.yml on SynnoDB/SynnoDB

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file synnodb-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: synnodb-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 516.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for synnodb-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5e599205fe2e1906211f05ad6d5099a2d3d46c0994ccfe90f63af783b72d4e63
MD5 4189c963778d88ddde4f922e35956060
BLAKE2b-256 4ead1efb62a3ff9b418d57f60c42e4c02ddb969ebacdb66ca7450452aedfbc6a

See more details on using hashes here.

Provenance

The following attestation bundles were made for synnodb-0.1.0-py3-none-any.whl:

Publisher: publish-to-pypi.yml on SynnoDB/SynnoDB

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page