Test: Load Durability
This page shows how to use -xld (load durability) with its test script and the logs of its runs.
The results are not official benchmark results. Exact performance depends on a number of parameters. You may get different results. These runs are solely to check that the feature works and to illustrate how to use bexhoma.
References:
Durability during the load: Prepare Testbeds
Settings per DBMS: Load durability (
-xld)Test script: test-docs-durability.sh, test-docs-durability.ps1
Load Durability
-xld durable|relaxed|unsafe sets how much durability the DBMS gives up while data is loaded:
durable: crash-safe, e.g. PostgreSQLsynchronous_commit,fsyncandfull_page_writeson, MySQLinnodb_flush_log_at_trx_commit=1relaxed(default): commits do not wait for the log flush, key checks are skipped, e.g. PostgreSQLsynchronous_commit=offunsafe: the strongest lever of the DBMS, e.g. PostgreSQLfsync=off, MySQL redo log off; a crash during the load can corrupt the data
The level applies to the load only.
Before the check script, the server returns to its configured state (template and --set), so the benchmark always runs as configured.
The summary shows the level in the workload (Load durability is relaxed (-xld; restored after the load).) and per connection (load_durability: relaxed).
Durability scripts exist for PostgreSQL (also used by PgDuckDB, PGBouncer and OrioleDB), MySQL, MariaDB and Citus. Other DBMS load as configured. See Prepare Testbeds for how the scripts are selected and DBMS for what they set per DBMS.
Example:
bexhoma tpch \
-dbms PostgreSQL \
-sf 1 \
-xii -xic -xis \
-xld unsafe \
run
This loads TPC-H SF 1 into PostgreSQL with fsync and full_page_writes off, then switches them on again, runs CHECKPOINT and a sync and creates indexes, constraints and statistics before the queries run.
Test Script
The test script runs one small experiment (SF 1, one client round) per benchmark, DBMS and level. The point is the loading phase. It covers TPC-H, TPC-DS, YCSB, HammerDB and Benchbase on PostgreSQL, PgDuckDB, PGBouncer, OrioleDB, MySQL, MariaDB, Citus and TiDB (no durability scripts), and in addition
durablewith--set(MySQL): durable during the load, back to the--setvalue afterwardsunsafeon persistent storage (-rst,-nc 2): repetition 2 finds the loaded volume and the data is completeschema tenancy (
-mtb schema): the scripts run once per tenant, the restore after all tenants
You will have to change the node selectors (to names of nodes, that exist in your cluster - or to leave out the corresponding parameters):
BEXHOMA_NODE_SUT="cl-worker11"
BEXHOMA_NODE_LOAD="cl-worker19"
BEXHOMA_NODE_BENCHMARK="cl-worker19"
LOG_DIR="./logs_tests"
BEXHOMA_MS=1
BEXHOMA_STORAGE_CLASS="shared"
mkdir -p $LOG_DIR
Run the script from the repository root:
bash scripts/test-docs-durability.sh
or in PowerShell
.\scripts\test-docs-durability.ps1
What to check per log:
load durability <level>, scripts [...]lists exactly the scripts of the level that the DBMS folder has (none for TiDB; Citusunsafe=relaxedscripts only)the summary shows
load_durability: <level>per configurationthe result folder has
bexhoma-loading-<config>-durability-*logs (before the load) and-restoredurability-*logs (after the load), with no errors in.stderrexcept documented NOTICEs and the mysql password warningthe
durability-*stdout logs show the values during the load, the restore and checkschema logs show the configured values againall tests pass, no SUT restarts
TPC-H
PostgreSQL durable
Synchronous_commit, fsync, full_page_writes on (= template): baseline loading time.
bexhoma tpch \
-dbms PostgreSQL \
-sf 1 \
-nc 1 \
-ne 1 \
-nlp 8 \
-nlt 8 \
-xii -xic -xis \
-xld durable \
-ms $BEXHOMA_MS \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
run &>$LOG_DIR/docs_durability_tpch_postgresql_durable.log
PostgreSQL relaxed
Synchronous_commit off during the load.
bexhoma tpch \
-dbms PostgreSQL \
-sf 1 \
-nc 1 \
-ne 1 \
-nlp 8 \
-nlt 8 \
-xii -xic -xis \
-xld relaxed \
-ms $BEXHOMA_MS \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
run &>$LOG_DIR/docs_durability_tpch_postgresql_relaxed.log
PostgreSQL unsafe
Also fsync and full_page_writes off; restore with CHECKPOINT and sync.
bexhoma tpch \
-dbms PostgreSQL \
-sf 1 \
-nc 1 \
-ne 1 \
-nlp 8 \
-nlt 8 \
-xii -xic -xis \
-xld unsafe \
-ms $BEXHOMA_MS \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
run &>$LOG_DIR/docs_durability_tpch_postgresql_unsafe.log
PostgreSQL unsafe on persistent storage
Sync must reach the volume; repetition 2 reuses it.
bexhoma tpch \
-dbms PostgreSQL \
-sf 1 \
-nc 2 \
-ne 1 \
-nlp 8 \
-nlt 8 \
-xii -xic -xis \
-xld unsafe \
-ms $BEXHOMA_MS \
-rsr \
-rss 10Gi \
-rst $BEXHOMA_STORAGE_CLASS \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
run &>$LOG_DIR/docs_durability_tpch_postgresql_unsafe_storage.log
PostgreSQL relaxed with schema tenancy
Durability scripts once per tenant, restore after all tenants.
bexhoma tpch \
-dbms PostgreSQL \
-sf 1 \
-nc 1 \
-ne 1 \
-nlp 8 \
-nlt 8 \
-xii -xic -xis \
-xld relaxed \
-ms $BEXHOMA_MS \
-mtb schema \
-mtn 2 \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
run &>$LOG_DIR/docs_durability_tpch_postgresql_tenants_schema.log
PgDuckDB unsafe
PostgreSQL scripts (path PostgreSQL).
bexhoma tpch \
-dbms PgDuckDB \
-sf 1 \
-nc 1 \
-ne 1 \
-nlp 8 \
-nlt 8 \
-xii -xic -xis \
-xld unsafe \
-ms $BEXHOMA_MS \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
run &>$LOG_DIR/docs_durability_tpch_pgduckdb_unsafe.log
MySQL durable
Flush 1 during the load, back to the –set value 2 afterwards.
bexhoma tpch \
-dbms MySQL \
-sf 1 \
-nc 1 \
-ne 1 \
-nlp 8 \
-nlt 8 \
-xii -xic -xis \
-xld durable \
--set deployment[bexhoma-deployment-mysql].container[dbms].innodb_flush_log_at_trx_commit=2 \
--set deployment[bexhoma-deployment-mysql].container[dbms].innodb_buffer_pool_size=10G \
-ms $BEXHOMA_MS \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
run &>$LOG_DIR/docs_durability_tpch_mysql_durable.log
MySQL relaxed
Flush 2, key checks and autocommit off (TPC-H variant).
bexhoma tpch \
-dbms MySQL \
-sf 1 \
-nc 1 \
-ne 1 \
-nlp 8 \
-nlt 8 \
-xii -xic -xis \
-xld relaxed \
-ms $BEXHOMA_MS \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
run &>$LOG_DIR/docs_durability_tpch_mysql_relaxed.log
MySQL unsafe
Also InnoDB redo log off during the load.
bexhoma tpch \
-dbms MySQL \
-sf 1 \
-nc 1 \
-ne 1 \
-nlp 8 \
-nlt 8 \
-xii -xic -xis \
-xld unsafe \
-ms $BEXHOMA_MS \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
run &>$LOG_DIR/docs_durability_tpch_mysql_unsafe.log
MariaDB relaxed
Durability-relaxed.sh as root: flush 2 during the load.
bexhoma tpch \
-dbms MariaDB \
-sf 1 \
-nc 1 \
-ne 1 \
-nlp 8 \
-nlt 8 \
-xii -xic -xis \
-xld relaxed \
-ms $BEXHOMA_MS \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
run &>$LOG_DIR/docs_durability_tpch_mariadb_relaxed.log
Citus unsafe
Only the relaxed scripts exist: coordinator and workers.
bexhoma tpch \
-dbms Citus \
-sf 1 \
-nc 1 \
-ne 1 \
-nlp 8 \
-nlt 8 \
-nw 3 \
-xii -xic -xis \
-xld unsafe \
-ms $BEXHOMA_MS \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
run &>$LOG_DIR/docs_durability_tpch_citus_unsafe.log
TPC-DS
PostgreSQL relaxed
Synchronous_commit off during the load.
bexhoma tpcds \
-dbms PostgreSQL \
-sf 1 \
-nc 1 \
-ne 1 \
-nlp 8 \
-nlt 8 \
-xii -xic -xis \
-xld relaxed \
-ms $BEXHOMA_MS \
-t 1200 \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
run &>$LOG_DIR/docs_durability_tpcds_postgresql_relaxed.log
MySQL relaxed
Flush 2, key checks off (reference MySQL variant).
bexhoma tpcds \
-dbms MySQL \
-sf 1 \
-nc 1 \
-ne 1 \
-nlp 8 \
-nlt 8 \
-xii -xic -xis \
-xld relaxed \
-ms $BEXHOMA_MS \
-t 1200 \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
run &>$LOG_DIR/docs_durability_tpcds_mysql_relaxed.log
MySQL unsafe
Also InnoDB redo log off during the load.
bexhoma tpcds \
-dbms MySQL \
-sf 1 \
-nc 1 \
-ne 1 \
-nlp 8 \
-nlt 8 \
-xii -xic -xis \
-xld unsafe \
-ms $BEXHOMA_MS \
-t 1200 \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
run &>$LOG_DIR/docs_durability_tpcds_mysql_unsafe.log
YCSB
PostgreSQL relaxed
Synchronous_commit off during the load.
bexhoma ycsb \
-dbms PostgreSQL \
-sf 1 \
-xwl a \
-xtb 16384 \
-xnbf 1 \
-xnlf 4 \
-nc 1 \
-ne 1 \
-nlp 8 \
-nlt 64 \
-nbp 1 \
-nbt 64 \
-xld relaxed \
-xop 1 \
-ms $BEXHOMA_MS \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
run &>$LOG_DIR/docs_durability_ycsb_postgresql_relaxed.log
PGBouncer unsafe
PostgreSQL scripts in the dbms container behind the pooler.
bexhoma ycsb \
-dbms PGBouncer \
-sf 1 \
-xwl a \
-xtb 16384 \
-xnbf 1 \
-xnlf 4 \
-nc 1 \
-ne 1 \
-nlp 8 \
-nlt 64 \
-nbp 1 \
-nbt 64 \
-xld unsafe \
-xop 1 \
-ms $BEXHOMA_MS \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
run &>$LOG_DIR/docs_durability_ycsb_pgbouncer_unsafe.log
OrioleDB durable
PostgreSQL scripts (path PostgreSQL), OrioleDB tables.
bexhoma ycsb \
-dbms OrioleDB \
-sf 1 \
-xwl a \
-xtb 16384 \
-xnbf 1 \
-xnlf 4 \
-nc 1 \
-ne 1 \
-nlp 8 \
-nlt 64 \
-nbp 1 \
-nbt 64 \
-xld durable \
-xop 1 \
-ms $BEXHOMA_MS \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
run &>$LOG_DIR/docs_durability_ycsb_orioledb_durable.log
OrioleDB unsafe
PostgreSQL scripts (path PostgreSQL), OrioleDB tables; full_page_writes only concerns the heap tables of the catalog.
bexhoma ycsb \
-dbms OrioleDB \
-sf 1 \
-xwl a \
-xtb 16384 \
-xnbf 1 \
-xnlf 4 \
-nc 1 \
-ne 1 \
-nlp 8 \
-nlt 64 \
-nbp 1 \
-nbt 64 \
-xld unsafe \
-xop 1 \
-ms $BEXHOMA_MS \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
run &>$LOG_DIR/docs_durability_ycsb_orioledb_unsafe.log
MySQL relaxed
Flush 0 and 1G log buffer (YCSB variant).
bexhoma ycsb \
-dbms MySQL \
-sf 1 \
-xwl a \
-xtb 16384 \
-xnbf 1 \
-xnlf 4 \
-nc 1 \
-ne 1 \
-nlp 8 \
-nlt 64 \
-nbp 1 \
-nbt 64 \
-xld relaxed \
-xop 1 \
-ms $BEXHOMA_MS \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
run &>$LOG_DIR/docs_durability_ycsb_mysql_relaxed.log
MySQL unsafe
Also InnoDB redo log off during the load.
bexhoma ycsb \
-dbms MySQL \
-sf 1 \
-xwl a \
-xtb 16384 \
-xnbf 1 \
-xnlf 4 \
-nc 1 \
-ne 1 \
-nlp 8 \
-nlt 64 \
-nbp 1 \
-nbt 64 \
-xld unsafe \
-xop 1 \
-ms $BEXHOMA_MS \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
run &>$LOG_DIR/docs_durability_ycsb_mysql_unsafe.log
Citus relaxed
Synchronous_commit off on coordinator and workers.
bexhoma ycsb \
-dbms Citus \
-sf 1 \
-xwl a \
-xtb 16384 \
-xnbf 1 \
-xnlf 4 \
-nc 1 \
-ne 1 \
-nlp 8 \
-nlt 64 \
-nbp 1 \
-nbt 64 \
-nw 3 \
-nwr 1 \
-nws 48 \
-xld relaxed \
-xop 1 \
-ms $BEXHOMA_MS \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
run &>$LOG_DIR/docs_durability_ycsb_citus_relaxed.log
TiDB relaxed
No durability scripts: loads as configured, scripts [].
bexhoma ycsb \
-dbms TiDB \
-sf 1 \
-xwl a \
-xtb 16384 \
-xnbf 1 \
-xnlf 1 \
-nc 1 \
-ne 1 \
-nlp 8 \
-nlt 64 \
-nbp 1 \
-nbt 64 \
-xnsr 3 \
-nw 3 \
-xnpd 3 \
-nwr 3 \
-xld relaxed \
-xop 1 \
-ms $BEXHOMA_MS \
run &>$LOG_DIR/docs_durability_ycsb_tidb_relaxed.log
HammerDB
PostgreSQL relaxed
Synchronous_commit off during the build.
bexhoma hammerdb \
-dbms PostgreSQL \
-sf 4 \
-xsd 2 \
-nc 1 \
-ne 1 \
-nlt 4 \
-nbp 1 \
-nbt 4 \
-xld relaxed \
-ms $BEXHOMA_MS \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
run &>$LOG_DIR/docs_durability_hammerdb_postgresql_relaxed.log
MySQL relaxed
Flush 0 and 1G log buffer (TPC-C variant).
bexhoma hammerdb \
-dbms MySQL \
-sf 4 \
-xsd 2 \
-nc 1 \
-ne 1 \
-nlt 4 \
-nbp 1 \
-nbt 4 \
-xld relaxed \
-ms $BEXHOMA_MS \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
run &>$LOG_DIR/docs_durability_hammerdb_mysql_relaxed.log
MySQL unsafe
Also InnoDB redo log off during the build.
bexhoma hammerdb \
-dbms MySQL \
-sf 4 \
-xsd 2 \
-nc 1 \
-ne 1 \
-nlt 4 \
-nbp 1 \
-nbt 4 \
-xld unsafe \
-ms $BEXHOMA_MS \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
run &>$LOG_DIR/docs_durability_hammerdb_mysql_unsafe.log
Citus relaxed
Synchronous_commit off on coordinator and workers.
bexhoma hammerdb \
-dbms Citus \
-sf 4 \
-xsd 2 \
-nc 1 \
-ne 1 \
-nlt 4 \
-nbp 1 \
-nbt 4 \
-nw 3 \
-xld relaxed \
-ms $BEXHOMA_MS \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
run &>$LOG_DIR/docs_durability_hammerdb_citus_relaxed.log
Benchbase
TPC-C PostgreSQL relaxed
Synchronous_commit off during the load.
bexhoma benchbase \
-dbms PostgreSQL \
-sf 4 \
-xsd 2 \
-xtb 1024 \
-xnbf 1 \
-nc 1 \
-ne 1 \
-nbp 1 \
-nbt 40 \
-xld relaxed \
-ms $BEXHOMA_MS \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
run &>$LOG_DIR/docs_durability_benchbase_postgresql_relaxed.log
TPC-C PGBouncer relaxed
PostgreSQL scripts in the dbms container behind the pooler.
bexhoma benchbase \
-dbms PGBouncer \
-sf 4 \
-xsd 2 \
-xtb 1024 \
-xnbf 1 \
-nc 1 \
-ne 1 \
-nbp 1 \
-nbt 40 \
-xnpp 1 \
-xnpi 128 \
-xnpo 64 \
-xld relaxed \
-ms $BEXHOMA_MS \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
run &>$LOG_DIR/docs_durability_benchbase_pgbouncer_relaxed.log
TPC-C MySQL relaxed
Flush 2, key checks off (reference MySQL variant).
bexhoma benchbase \
-dbms MySQL \
-sf 4 \
-xsd 2 \
-xtb 1024 \
-xnbf 1 \
-nc 1 \
-ne 1 \
-nbp 1 \
-nbt 40 \
-xld relaxed \
-ms $BEXHOMA_MS \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
run &>$LOG_DIR/docs_durability_benchbase_mysql_relaxed.log
TPC-C MySQL unsafe
Also InnoDB redo log off during the load.
bexhoma benchbase \
-dbms MySQL \
-sf 4 \
-xsd 2 \
-xtb 1024 \
-xnbf 1 \
-nc 1 \
-ne 1 \
-nbp 1 \
-nbt 40 \
-xld unsafe \
-ms $BEXHOMA_MS \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
run &>$LOG_DIR/docs_durability_benchbase_mysql_unsafe.log
TPC-C Citus relaxed
Synchronous_commit off on coordinator and workers.
bexhoma benchbase \
-dbms Citus \
-sf 4 \
-xsd 2 \
-xtb 1024 \
-xnbf 1 \
-nc 1 \
-ne 1 \
-nbp 1 \
-nbt 40 \
-nw 3 \
-nwr 1 \
-nws 48 \
-xld relaxed \
-ms $BEXHOMA_MS \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
run &>$LOG_DIR/docs_durability_benchbase_citus_relaxed.log
Twitter PostgreSQL unsafe
Scripts of a Benchbase benchmark other than tpcc.
bexhoma benchbase \
-dbms PostgreSQL \
-sf 4 \
-xbt twitter \
-xsd 2 \
-xtb 1024 \
-xnbf 1 \
-nc 1 \
-ne 1 \
-nbp 1 \
-nbt 40 \
-xld unsafe \
-ms $BEXHOMA_MS \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
run &>$LOG_DIR/docs_durability_benchbase_twitter_postgresql_unsafe.log
Result: docs_durability_benchbase_twitter_postgresql_unsafe.log