Workload#

The workload command runs a built-in workload without needing a config file. Sixteen benchmarks are embedded in the binary. Each workload supports all six lifecycle commands (up, seed, run, deseed, down, all) and selects the correct config for the --driver automatically.

Built-in workloads#

WorkloadDescription
bankBank account operations for contention and correctness testing
ch-benchmarkCH-benCHmark mixed OLTP+OLAP (TPC-C transactions + TPC-H analytical queries)
consistencyConcurrency anomaly stress test (dirty reads, phantoms, write skew, lost updates)
kvSimple key-value read/write benchmark
movrVehicle-sharing application with rides, vehicles, and users
seatsAirline reservation system with flight booking contention
sysbench-insertSysbench oltp_insert pure insert micro-benchmark
sysbench-point-selectSysbench oltp_point_select pure read micro-benchmark
sysbench-read-writeSysbench oltp_read_write mixed read-write micro-benchmark
sysbench-update-indexSysbench oltp_update_index indexed column update micro-benchmark
tatpTelecom Application Transaction Processing (80% reads, 20% writes)
tpccFull TPC-C benchmark with all 5 transaction profiles
tpchTPC-H decision-support benchmark with analytical queries
ttlbenchInsert throughput under row-level TTL garbage collection pressure
ttlloggerStructured log ingestion with TTL-based expiry
ycsbYahoo! Cloud Serving Benchmark with configurable workload profiles

Supported drivers#

DriverConfig used
pgx, dsqlCockroachDB/PostgreSQL variant
mysqlMySQL variant
oracleOracle variant
mssqlSQL Server variant
spannerGoogle Cloud Spanner variant (GoogleSQL)
mongodbMongoDB variant (BSON/JSON commands)
cassandraCassandra variant (CQL)

Examples#

# Create the bank schema
edg workload bank up \
--driver pgx \
--url "postgres://root@localhost:26257?sslmode=disable"

# Seed and run in one step
edg workload bank all \
--driver pgx \
--url "postgres://root@localhost:26257?sslmode=disable" \
-w 10 \
-d 5m

# Run consistency anomaly stress test
edg workload consistency all \
--driver pgx \
--url "postgres://root@localhost:26257?sslmode=disable" \
-w 16 \
-d 30s

# Run consistency without transactions (compare anomaly behaviour)
edg workload consistency all \
--driver pgx \
--url "postgres://root@localhost:26257?sslmode=disable" \
-w 16 \
-d 30s \
--no-atomic-tx

# Run KV benchmark
edg workload kv all \
--driver pgx \
--url "postgres://root@localhost:26257?sslmode=disable" \
-w 20 \
-d 5m

# Run MovR ride-sharing workload
edg workload movr all \
--driver pgx \
--url "postgres://root@localhost:26257?sslmode=disable" \
-w 10 \
-d 5m

# Run TPC-C against MySQL
edg workload tpcc all \
--driver mysql \
--url "root:password@tcp(localhost:3306)/tpcc?parseTime=true" \
-w 50 \
-d 10m

# Run TPC-H analytical queries
edg workload tpch all \
--driver pgx \
--url "postgres://root@localhost:26257?sslmode=disable" \
-w 4 \
-d 5m

# TTL benchmarks (CockroachDB native TTL)
edg workload ttlbench all \
--driver pgx \
--url "postgres://root@localhost:26257?sslmode=disable" \
-w 10 \
-d 5m

edg workload ttllogger all \
--driver pgx \
--url "postgres://root@localhost:26257?sslmode=disable" \
-w 10 \
-d 5m

# Run YCSB against MSSQL
edg workload ycsb all \
--driver mssql \
--url "sqlserver://sa:P4ssw0rd@localhost:1433?database=ycsb&encrypt=disable" \
-w 20 \
-d 5m

# Run KV benchmark against Spanner
edg workload kv all \
--driver spanner \
--url "projects/my-project/instances/my-instance/databases/my-db" \
--license "$EDG_LICENSE" \
-w 10 \
-d 5m

# Run bank workload against MongoDB
edg workload bank all \
--driver mongodb \
--url "mongodb://localhost:27017/edg" \
-w 10 \
-d 5m

# Run YCSB against Cassandra
edg workload ycsb all \
--driver cassandra \
--url "localhost:9042" \
-w 10 \
-d 5m

The --config flag is not required (and ignored) for workload commands. All other flags (--duration, --workers, --print-interval, --rng-seed, --license) work as normal.

The init command (for generating configs from existing database schemas) has its own page: Init.