Sign inSign up

bexhoma/loader_tpch_refresh_mysql

By bexhoma

•Updated about 5 hours ago

Image
0

7.3K

bexhoma/loader_tpch_refresh_mysql repository overview

⁠TPC-H Refresh Loader - MySQL

Applies TPC-H RF1 (INSERT) and RF2 (DELETE) operations to a MySQL database. Reads pre-generated update files from /data/tpch-refresh/SF<SF>/ on the PVC. Runs as the main container (benchmark_run=2) of the refresh benchmarker job, in parallel with the query-stream benchmarker (benchmark_run=1).

See images/tpch_refresh/README.md⁠ for the shared refresh-stream pipeline design.

⁠Environment variables

VariableDefaultDescription
SF1TPC-H scaling factor
TPCH_REFRESH_STREAMS1Number of RF1+RF2 pairs to apply
TPCH_REFRESH_STREAM_OFFSET0Start from set OFFSET+1
STORE_RAW_DATA11 = read from /data/tpch-refresh/SF<SF>/; 0 = /tmp/...
BEXHOMA_HOSTwww.example.comMySQL host
BEXHOMA_PORT3306MySQL port
BEXHOMA_USERrootMySQL user
BEXHOMA_PASSWORDrootMySQL password
BEXHOMA_VOLUMEtpchDatabase name (overrides BEXHOMA_DATABASE at runtime)
BEXHOMA_CONNECTIONmysqlConnection name (Redis counter key)
BEXHOMA_EXPERIMENT12345Experiment identifier
BEXHOMA_EXPERIMENT_RUN1Run number within experiment
BEXHOMA_CLIENT1Client round number
BEXHOMA_BENCHMARK_RUN2Parallel benchmark index (2 = refresh stream)

⁠Execution flow

  1. Set BEXHOMA_DATABASE=$BEXHOMA_VOLUME.
  2. Compute FIRST_SET = OFFSET+1, LAST_SET = OFFSET+STREAMS; determine destination_raw.
  3. Sync: decrement job counter bexhoma-benchmarker-podcount-job-<CONNECTION>-<EXPERIMENT>, poll until ? 0.
  4. Sync: decrement round counter bexhoma-benchmarker-podcount-round-<EXPERIMENT_RUN>-<CLIENT>-<CONFIGURATION>-<EXPERIMENT>, poll until ? 0. This ensures the refresh stream starts at the same moment as the parallel query stream (benchmark_run=1).
  5. For each set K from FIRST_SET to LAST_SET:
    • RF1: LOAD DATA LOCAL INFILE (column-mapped with NULLIF) for orders.tbl.uK and lineitem.tbl.uK
    • RF2: create temp table, load delete.K, bulk DELETE l FROM lineitem l WHERE ... + same for orders, drop temp table
  6. Emit BEXHOMA_DURATION, BEXHOMA_START, BEXHOMA_END.

Tag summary

Content type

Image

Digest

sha256:7a6b8aa1f…

Size

190.6 MB

Last updated

about 5 hours ago

docker pull bexhoma/loader_tpch_refresh_mysql