solana-with-rpc-optimizations/core/benches
behzad nouri 9b866d79fb
shards crds values based on their hash prefix (#12187)
filter_crds_values checks every crds filter against every hash value:
https://github.com/solana-labs/solana/blob/ee646aa7/core/src/crds_gossip_pull.rs#L432
which can be inefficient if the filter's bit-mask only matches small
portion of the entire crds table.

This commit shards crds values into separate tables based on shard_bits
first bits of their hash prefix. Given a (mask, mask_bits) filter,
filtering crds can be done by inspecting only relevant shards.

If CrdsFilter.mask_bits <= shard_bits, then precisely only the crds
values which match (mask, mask_bits) bit pattern are traversed.
If CrdsFilter.mask_bits > shard_bits, then approximately only
1/2^shard_bits of crds values are inspected.

Benchmarking on a gce cluster of 20 nodes, I see ~10% improvement in
generate_pull_responses metric, but with larger clusters, crds table and
2^mask_bits are both larger, so the impact should be more significant.
2020-09-17 14:05:16 +00:00
..
banking_stage.rs Address latest nightly clippy lints, but globally disable stable_sort_primitive 2020-08-17 22:36:10 -07:00
blockstore.rs Clippy cleanup for all targets and nighly rust (also support 1.44.0) (#10445) 2020-06-09 09:38:14 +09:00
cluster_info.rs Clippy cleanup for all targets and nighly rust (also support 1.44.0) (#10445) 2020-06-09 09:38:14 +09:00
crds_gossip_pull.rs uses rust intrinsics to convert hashes to u64 (#12097) 2020-09-09 15:28:17 +00:00
crds_shards.rs shards crds values based on their hash prefix (#12187) 2020-09-17 14:05:16 +00:00
gen_keys.rs Rename solana to solana-core (#5583) 2019-08-21 10:23:33 -07:00
poh.rs Add solana-ledger crate (#6415) 2019-10-18 09:28:51 -07:00
poh_verify.rs Simd poh (#10604) 2020-06-16 23:03:26 -07:00
retransmit_stage.rs Address latest nightly clippy lints, but globally disable stable_sort_primitive 2020-08-17 22:36:10 -07:00
shredder.rs Bench RaptorQ (#10886) 2020-07-02 18:31:32 -07:00
sigverify_stage.rs Clippy cleanup for all targets and nighly rust (also support 1.44.0) (#10445) 2020-06-09 09:38:14 +09:00