0

Parallelism from 1 to 8: Which Stage Gets Faster, and Which Gets Slower?

When a replication pipeline is slow, the most common move is to raise parallelism from 1 to 8. After watching for a while, the snapshot does read faster, so the number stays. Yet the time until an order can actually be queried downstream has not shortened much.

The problem is that "faster" is too vague. A single replication has at least three distinct moments: the stored data has been read, the incremental changes have caught up, and the downstream can query the new value. Parallelism may push only the first, do nothing for the other two, or even backfire — the faster you read, the earlier the target starts queuing. Only by recording the three moments separately do you know whether the parameter is worth keeping.

First, State Clearly What Parallelism Promises

Raising parallelism from 1 to 8 is easily misread as "8 readers read 8 tables." It is not. Parallelism describes how many units of reading work can happen at once; it promises neither how many different tables that work comes from, nor that the work is evenly divided.

A single large table can fully occupy 8 readers. Whether it can depends on whether the table can be split, and whether the resulting splits are enough to go around. That is a matter of splits, not of table names.

Whether a Table Can Be Split Decides If Parallelism Means Anything

In Apache SeaTunnel 3.1.0, the snapshot phase splits a table by ranges of a split column's values, in the form orders:[1,1000) and orders:[1000,2000). Each split is an independent unit of reading that can be assigned to a different reader. So 8 readers reading the same large orders table at once is normal — they are reading different fragments of that table, not duplicating work.

The real boundary is the split column. The split column is preferably the first column of the primary key, then the first column of a unique key, and it must be non-null and suitable for range splitting. Because a range comparison predicate fails on NULL: if the only unique index allows NULL, those rows are silently skipped by the snapshot. So:

  • When concurrent reading is on and a suitable split column is found, a table produces multiple splits and can be read concurrently by multiple readers.
  • When concurrent reading is off, no matter what the parallelism is, the table has only one full-table split.
  • When no split column is found, exactly_once = false degrades to a single full-table split; exactly_once = true raises an error outright rather than degrading.

The last one is the most worth remembering: turn on the consistency switch and give a table with no usable split column a high parallelism, and what you get is not "a bit slower" but a job that will not start.

Record the Three Moments Separately; Do Not Cover Them with One Average

This is the key to judging whether parallelism is worth it. A replication has three independent moments:

Moment Question it answers Mainly affected by
Snapshot end Is the stored data fully read? Split column, number of splits, reader count, source connections and CPU
Incremental caught up Have changes during the snapshot been filled in? binlog reading, handoff from splits to the log, incremental processing
Target visible Can the downstream query the new value? Target batch size, connection count, lock waits, write throughput

Raising parallelism from 1 to 8 may clearly shorten the first moment, have little effect on the second, and slow down the third — because 8 readers pouring in at once make the target start queuing earlier. If you look only at "snapshot time," you reach the wrong conclusion of "8 times faster"; if you look only at "total job time," you cannot see where the bottleneck moved.

A faster capture stage does not mean a faster pipeline as a whole. That sentence is the backbone of this article. The goal of parallelism tuning is not to make one stage fastest, but to move the slowest stage forward as a whole.

What Must Be Fixed First in an Experiment That Can Produce Numbers

An experiment without a control explains nothing, no matter how many numbers it produces. Before running, fix the following variables; if any one of them changes between two settings, the result cannot be attributed to parallelism.

Fixed item What to lock down
Data The same table data, the same key distribution, the same row count
Source Database connection limit, machine spec, container CPU/memory limits
Write The same output semantics, the same target batch size, the same connection count
Job The same SeaTunnel version, the same checkpoint interval
Observation The same timing method, the same timing origin

Also fix the output semantics: what is compared is the same data and a result with a consistent final state. If one setting enables upsert and the other does not, or the primary key is changed between settings, then what you are comparing is not parallelism but two different jobs.

Grouping, Interleaving, and Keeping the Slower Results

Group into three settings — 1, 4, and 8 — run several rounds per setting, and interleave the runs: do not finish all of 1, then 4, then 8. Machine warmth, source load, and target-side background tasks all drift; running in sequence counts that drift against parallelism.

What to record in each round must answer the three rows of the table in the previous section:

  • Snapshot time: from job start to the end of the snapshot phase.
  • Incremental catch-up time: record the source binlog position at snapshot completion. Measure from snapshot completion until the CDC reader reaches that recorded position.
  • Target-visible time: based on querying the new value by primary key on the target, not on the job printing some log line.
  • Source metrics: CPU, active connection count.
  • Zeta metrics: peak heap memory.
  • Final result: compare key by key by primary key, listing three kinds of differences — missing, extra, and inconsistent fields.

Slower results must be kept. Keeping only the round where "8 beat 1" turns the experiment into a proof. If the 8 setting is slower in some round, that is exactly the row with the most information — it usually points to target-side queuing or source connection contention, where parallelism is genuinely starting to backfire.

The Current Evidence Boundary of This Piece

This has to be stated plainly: this article uses a single run of 100,000 rows with snapshot and incremental key-by-key reconciliation, and that run was functional acceptance — it proved "not a row missing, deletes effective, fields consistent," covering correctness at a single parallelism. It cannot support any performance conclusion across the three settings of 1, 4, and 8.

Therefore this article gives no numbers such as "how much faster the 8 setting was." The tables above are an experiment design, a skeleton to be filled in, not results already produced. To obtain publishable numbers, you still need to run the three-setting matrix under this method and make the raw data, workload, and reproduction configuration public as well — so readers can explain for themselves why two tests differ, instead of accepting one average.

That is also the most worth borrowing from Fivetran's benchmark article: it lays out the data, workload, measurement method, and reproduction code together, rather than reporting a single throughput number. Numbers without a method have no reproducibility.

Conclusion

Back to the move at the start — raising parallelism from 1 to 8.

It is not wrong in itself, but it answers only one question: can reading be faster. What actually matters on call are the other two: did the incremental catch up, and exactly when can the downstream query it. Parallelism may answer neither, and may even trade a faster first half for a more congested second half.

So next time you change this number, do not record only the snapshot time. Record the three moments — snapshot end, incremental caught-up, target visible — separately, then reconcile by primary key once more. If only one of the three moments improves, you know which stage the parameter changed, and whether to look at the source, the engine, or the target.

Tuning is not about making one stage faster; it is about confirming that the slowest stage has moved forward as a whole. Without those three moments, all you hold is a changed parameter and a "seems faster" whose cause you cannot explain.


All Rights Reserved

Viblo
Let's register a Viblo Account to get more interesting posts.