Use less memory for constraint lookup radix cache#860
Merged
phillip-stephens merged 2 commits intozmap:mainfrom Apr 29, 2024
Merged
Use less memory for constraint lookup radix cache#860phillip-stephens merged 2 commits intozmap:mainfrom
phillip-stephens merged 2 commits intozmap:mainfrom
Conversation
Reduce size of precomputed array of prefixes from 4 MB to 1 MB in order to fit into the cache of CPUs with lower amounts of cache. Improves send rate on systems where send rate is CPU/memory-bound.
Contributor
Author
|
Test failures look unrelated to change under test. |
Member
|
Sounds fairly reasonable. @phillip-stephens can you confirm whether there are any performance implications on more resourced systems (e.g., one of our boxes)? |
Contributor
|
@zakird Doesn't look like any negative performance implications on my VM with plenty of cores/RAM and a large bandwidth uplink. main Branch Results
Pull Request #860 Results
|
phillip-stephens
approved these changes
Apr 29, 2024
Contributor
phillip-stephens
left a comment
There was a problem hiding this comment.
Tested on a more resourced VM, (not using netmap), doesn't seem to negatively impact performance there.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Reduce the size of the precomputed array of prefixes from 4 MB to 1 MB in order to fit into the cache of CPUs with lower amounts of cache. Improves send rate on systems where send rate is CPU/memory-bound and cache is limited.
With the default blocklist, this changes the array/tree tradeoff from 3702243328 IPs in radix array, 15104 IPs in tree to 3702194176 IPs in radix array, 64256 IPs in tree. That seems like a reasonable price to pay for the perf boost of reducing the memory footprint to one fourth. On a system with 8 core Intel Atom, 8*2 MB L2 cache, 10 GbE NIC, netmap, AES-NI, before this change, send rate was 11% below what the NIC can do, while with this change, zmap pushes packets faster than the NIC can send them. You may want to test this change on higher end systems before merging, to assert that it does not perform substantially worse on different system configurations.