forked from bersler/OpenLogReplicator
-
Notifications
You must be signed in to change notification settings - Fork 0
test: add Debezium OLR vs LogMiner performance and validation framework #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
c3859bf
test: add Debezium OLR vs LogMiner performance benchmark
rophy baff8aa
chore: disable firewall in RAC VM setup
rophy 74b38c0
test: add continuous data validation framework
rophy 300c50d
fix: address CodeRabbit review findings on PR #9
rophy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| [tools] | ||
| java = "21" | ||
| python = "3.12" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| # Debezium Performance Test: OLR vs LogMiner | ||
|
|
||
| ## Goal | ||
|
|
||
| Compare Debezium CDC throughput and latency when using the **OLR adapter** vs the | ||
| **LogMiner adapter**, both running against the same Oracle RAC instance under | ||
| sustained DML pressure. | ||
|
|
||
| ## What We're Measuring | ||
|
|
||
| | Metric | Definition | How | | ||
| |--------|-----------|-----| | ||
| | **Throughput (events/sec)** | Events delivered to HTTP receiver per second | Receiver timestamps each event; compute rate over time windows | | ||
| | **End-to-end latency** | Oracle commit → event arrival at receiver | `source.ts_ms` (commit time) vs receiver arrival time | | ||
| | **Catch-up time** | Time from connector start to "caught up" (lag < 1s) | Monitor lag over time after cold start with backlog | | ||
| | **Sustained lag** | Steady-state lag under continuous pressure | Average latency once caught up | | ||
|
|
||
| ## Architecture | ||
|
|
||
| ``` | ||
| Oracle RAC (2 nodes) | ||
| └── PL/SQL DML generator (DBMS_SCHEDULER jobs on both nodes) | ||
| └── continuous INSERT/UPDATE/DELETE on BENCH table | ||
|
|
||
| OLR (on RAC VM) | ||
| └── reads redo logs → TCP → Debezium OLR adapter → HTTP sink → receiver | ||
|
|
||
| LogMiner adapter | ||
| └── queries redo via SQL → HTTP sink → receiver | ||
|
|
||
| Receiver (Python) | ||
| └── timestamps each event, computes throughput/latency, exposes /metrics | ||
| ``` | ||
|
|
||
| ## DML Generator | ||
|
|
||
| PL/SQL job running inside Oracle on both RAC nodes simultaneously: | ||
|
|
||
| - Table: `OLR_TEST.BENCH` (id NUMBER, val VARCHAR2(200), node_id NUMBER, created TIMESTAMP) | ||
| - Operations: 70% INSERT, 20% UPDATE, 10% DELETE (realistic CDC mix) | ||
| - Target rate: configurable, start with ~500 rows/sec per node (1000 total) | ||
| - Commit frequency: every 10-50 rows (variable batch size) | ||
| - Duration: configurable (default 5 minutes) | ||
|
|
||
| No external tools needed — pure PL/SQL with `DBMS_SCHEDULER`. | ||
|
|
||
| ## Test Scenarios | ||
|
|
||
| ### 1. Sustained throughput (primary) | ||
| - Start DML generator at steady rate | ||
| - Let both adapters run for 5 minutes | ||
| - Compare: events/sec, average latency, p95 latency | ||
|
|
||
| ### 2. Burst + catch-up | ||
| - Generate 100K rows with both adapters stopped | ||
| - Start both adapters simultaneously | ||
| - Measure time to process full backlog | ||
|
|
||
| ### 3. Scaling test | ||
| - Increase DML rate in steps: 500, 1000, 2000, 5000 rows/sec | ||
| - Find the throughput ceiling for each adapter | ||
|
|
||
| ## Receiver Enhancements | ||
|
|
||
| Current `debezium-receiver.py` needs: | ||
| - Per-event timestamp recording (arrival time) | ||
| - Extract `source.ts_ms` from Debezium events for latency calculation | ||
| - `/metrics` endpoint returning: event count, events/sec (last 10s window), | ||
| avg latency, p50/p95/p99 latency, per-adapter breakdown | ||
| - `/metrics/reset` to clear stats between test runs | ||
|
|
||
| ## Deliverables | ||
|
|
||
| 1. `tests/debezium/perf-test.sh` — orchestrates the full benchmark | ||
| 2. Enhanced `debezium-receiver.py` — adds latency/throughput metrics | ||
| 3. PL/SQL generator scripts (run inside Oracle, no external tools) | ||
| 4. Results output: JSON summary + human-readable table | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - RAC VM running with Oracle operational | ||
| - OLR image loaded on VM | ||
| - Debezium services (docker-compose) configured | ||
| - Both adapters configured to consume from same Oracle PDB | ||
|
|
||
| ## Open Questions | ||
|
|
||
| - Should we test single-instance (Oracle XE) as well, or RAC only? | ||
| - Do we need Kafka in the path, or is HTTP sink sufficient for comparison? | ||
| - Should the generator run for a fixed duration or fixed row count? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.