Performance Tuning (ACE)
ACE parallelizes work across multiple processes, hashing blocks of rows and only drilling into blocks that differ. ACE performance on your system will depend on a number of tunable factors:
Hardware and host capacity impacts performance: Having more cores and memory improves processing time; ensure ACE’s CPU cap is consistent with your resources.
Table architecture can speed hashing: Tables with very wide rows and large JSON/BLOB/embedded columns slow hashing; design tables for efficiency, and ensure that VACUUM/ANALYZE functions are performed regularly.
Network distribution impacts diff distribution: Keep ACE close to your databases. Many small, scattered mismatches force more data movement across the network than a few concentrated ones.
Note
We recommend you experiment with the suggestions on this page on a non-production system.
If you notice a pronounced change in a node's performance:
- Review your ACE commands; experiment with the table-diff tuning flags such as
--block-size,--concurrency-factor, and--compare-unit-size. - Confirm that your table has been
ANALYZEd recently. - Use
--table-filterand--nodesto target hot ranges. - If you're using ACE on huge tables, use Merkle trees.
- After repairing differences, run
table-rerunto validate the results.
Command Options that Impact Performance
When invoking ACE commands, review the available command options; many of the options are designed to improve performance. For example:
-
--block-sizeControls the number of rows hashed per block. Larger blocks reduce round-trips but can increase memory usage or hash time. Defaults to100000, and respects the guardrails defined inace.yamlunless--override-block-sizeis set. -
--concurrency-factorIncreases the number of workers per node (1–10). Higher values improve throughput on machines with spare CPU, but can create contention on smaller hosts. Default is1. -
--compare-unit-sizeSets the minimum block size used when ACE recursively drills into mismatched blocks. Smaller values provide more granular comparisons at the cost of additional round-trips. Default is10000. -
--override-block-sizeOverride the safety limits defined inace.yaml. Use cautiously: extremely large blocks can lead toarray_aggmemory pressure. -
--table-filterUse a table filter clause to narrow the comparison scope for large tables. -
--nodes
Compare a subset (e.g.,n1,n2) of your cluster's nodes to reduce cross-node IO.
Improving Performance with Merkle Trees
Using a Merkle tree can improve performance when your tables are very large by storing statistics so you can avoid a full rescan between diff activities. To improve performance when using Merkle trees:
- Keep your statistics fresh (
ANALYZE) for accurate range estimation. - For huge tables(billion-row/terabyte), parallelize builds.
- Use
mtree listen(CDC) or rely on the pre-diff update thatmtree table-diffperforms automatically to keep your data fresh automatically. - Tune
--max-cpu-ratioon Merkle commands (mtree build,mtree table-diff,mtree update) to control worker parallelism per host.
Note
Merkle tree initialization adds triggers; measure the impact of this addition on write-heavy workloads.