Skip to content

Paimon byte-backed STRING boundary

PaimonByteStringSinkBenchmark measures a complete bounded row source, standard CONCAT and partitioned Paimon Parquet append job in streaming mode. It keeps RowData-to-Arrow conversion, JNI, partition routing, file encoding and end-of-input commit inside the elapsed job time. Cluster setup and stock readback happen outside that timer. This is a controlled connector diagnostic, not an SLS benchmark or an explanation of differences between Flink distributions.

Each source row contains an integer ID, a configurable-width STRING and an integer partition. One in 17 payloads contains 0xff. CONCAT must append ! without normalizing the raw bytes. There are four partitions, one source/writer subtask, bucket-unaware append mode and write-only=true. Every run reads the committed rows through stock Paimon, verifies each ID exactly once, compares every payload byte and partition, and requires native Calc consumption and parquet-rs output for the native route.

Run only on a controlled host with release native libraries; do not add this benchmark to CI:

SF_PAIMON_BYTE_STRING_BENCHMARK=true mvn -Pbench -pl streamfusion-paimon -am test \
  -Dtest=PaimonByteStringSinkBenchmark -Dsurefire.failIfNoSpecifiedTests=false \
  '-Dsf.extraJvmArgs=-Dsf.paimon.bytes.engine=native -Dsf.paimon.bytes.rows=1048576 -Dsf.paimon.bytes.width=384 -Dsf.paimon.bytes.warmups=1 -Dsf.paimon.bytes.trials=3'

sf.paimon.bytes.engine=stock disables StreamFusion. previous requires the same harness with the unmodified byte-string planner from the issue's base commit 50498f1f6b017a3390bf574290d3474e0732b227; it asserts the original unverified-STRING rejection. The measured previous control overlays only that planner class on the same candidate Java/native runtime. It is a boundary ablation, not a comparison with another historical engine distribution. Do not call the current planner with the native Paimon sink disabled a previous-version control: that configuration can keep native Calc and has a different execution boundary.

Alternate engine order across repeated trials, retain warmups and all measured results, and compare identical data widths, row counts, release libraries and CPU/memory allocations. The benchmark prints the engine, input shape, trial, job elapsed time and rows per second. Include startup-dominated results and measured variability when reporting a speedup. Recovering native planning alone is not performance evidence.

Measured complete jobs

The structured observations retain every warmup and measured job, source fingerprints, library checksums and the execution checks. All 54 benchmark jobs passed exact stock readback. The focused correctness selection separately passed 33 Java scenarios across Flink 2.2/Paimon 2.1, Flink 1.18/Paimon 2.0 and Paimon 1.0, plus 22 Rust Parquet encoder tests. The unchanged base fails the positive submitted-graph test with the unverified-STRING rejection.

Linux x86_64 measurements use release/mimalloc libraries on an Intel Xeon E5-2682 v4 host. Each process has a four-CPU container quota, four active JVM processors, 10 GiB container memory, a 5 GiB heap and 1 GiB task off-heap budget. Each engine/shape has three independent JVM forks, one warmup followed by one measured job in each fork. Engine order rotates between stock/previous/native, previous/native/stock and native/stock/previous. The 384-byte payloads include unique ID prefixes and malformed bytes in one of every 17 rows.

The table reports seconds as median (minimum - maximum), retaining every measured sample.

Flink / Paimon / JDK Rows Stock Previous boundary Native Stock / native
2.2.1 / 2.1.0 / Corretto 17.0.21.1 262,144 2.491 (2.154 - 2.557) 2.203 (1.555 - 2.359) 1.280 (1.212 - 1.296) 1.95x
2.2.1 / 2.1.0 / Corretto 17.0.21.1 1,048,576 3.888 (3.877 - 6.233) 4.915 (4.799 - 6.761) 3.458 (3.438 - 3.484) 1.12x
1.18.1 / 2.0.0 / HotSpot 11.0.22 1,048,576 3.966 (3.869 - 4.010) 4.189 (4.003 - 4.224) 3.592 (3.536 - 3.633) 1.10x

Native is 1.72x, 1.42x and 1.17x faster than the previous boundary in those respective cohorts. Cold warmup jobs remain in the report: their stock/native medians are 7.77/6.47 s, 11.56/9.33 s and 14.37/13.74 s. Startup and JVM compilation are substantial parts of these bounded runs; the smaller cohort's larger warm gain must not be extrapolated to sustained SLS throughput. The million-row Flink 1.18 result is a modest complete-job gain, not a claim of a multiple-fold production improvement. No live SLS service, network or internal connector is part of this benchmark.