Skip to content

Conversation

@akhinvasara-jumptrading
Copy link
Contributor

This PR switches the hash map in fib4 from slot_para to map_dynamic to avoid locking overhead. For this use case, occasional inconsistent/torn reads are acceptable (just misroute or drop a couple packets, rarely). They are mitigated by atomic operations on the core next_hop struct. This improves xdp tx perf by 10-20%, depending on the xdp mode / ZC.

@mmcgee-jump
Copy link
Contributor

Can we just switch this stuff to use message passing? Not sure why we need a custom concurrent shared memory structure for this

@github-actions
Copy link

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.076803 s 0.077098 s 0.384%
backtest mainnet-368528500-perf snapshot load 3.095 s 3.018 s -2.488%
backtest mainnet-368528500-perf total elapsed 76.803 s 77.098354 s 0.385%
firedancer mem usage with mainnet.toml 997.11 GiB 997.11 GiB 0.000%

@github-actions
Copy link

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.057988 s 0.050869 s -12.277%
backtest mainnet-368528500-perf snapshot load 2.576 s 1.669 s -35.210%
backtest mainnet-368528500-perf total elapsed 57.988409 s 50.868735 s -12.278%
firedancer mem usage with mainnet.toml 997.11 GiB 997.11 GiB 0.000%

@github-actions
Copy link

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.053201 s 0.053461 s 0.489%
backtest mainnet-368528500-perf snapshot load 2.546 s 1.795 s -29.497%
backtest mainnet-368528500-perf total elapsed 53.201319 s 53.461428 s 0.489%
firedancer mem usage with mainnet.toml 997.11 GiB 997.11 GiB 0.000%

@ripatel-fd
Copy link
Contributor

Can we just switch this stuff to use message passing? Not sure why we need a custom concurrent shared memory structure for this

Maintaining replicas of routing tables across different net tiles results in a significantly more complex control plane. The "custom concurrent" part is a single atomic read. Replication of netlink messages is ~hundreds of lines of code and inherently bug-prone due to possibility of dropped updates, and will further decrease performance due to having to poll additional input links.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants