Add NIC IRQ affinity tuning support (#528)#528
Open
charles-typ wants to merge 4 commits intofacebookresearch:v2-betafrom
Open
Add NIC IRQ affinity tuning support (#528)#528charles-typ wants to merge 4 commits intofacebookresearch:v2-betafrom
charles-typ wants to merge 4 commits intofacebookresearch:v2-betafrom
Conversation
|
@charles-typ has exported this pull request. If you are a Meta employee, you can view the originating Diff in D96763816. |
added 3 commits
March 24, 2026 15:25
) Summary: Pull Request resolved: facebookresearch#518 The cachelib_num_shards parameter was parsed from gflags and stored in UcacheBenchConfig but never actually applied to the CacheAllocator::Config. This meant the config value was silently ignored and CacheLib used its default of 8192 shards. Now call setNumShards() when cachelib_num_shards > 0, allowing the benchmark to match production shard counts for more accurate CPU utilization profiling. Differential Revision: D96087814
Summary: Add support for configuring ThriftServer's socketMaxReadsPerEvent via CLI flag. This controls how many reads a single connection can perform per event loop iteration, which affects multi-client scalability. Changes: - Add rpc_socket_max_reads_per_event gflag to UcacheBenchRpcServer.cpp - Apply flag value to thriftServer_->setSocketMaxReadsPerEvent() - Add parameter to benchmark configs (debug/large/medium/small) with default value of 1 matching production ucache - Add --rpc-socket-max-reads-per-event CLI arg in jobs_internal.yml - Add parameter to ALLOWED_PARAMS in ucache_bench_benchmark.py Differential Revision: D96763733
Summary: Add support for fiber-based request processing and verbose error logging in ucache_bench server and client. Fiber configuration changes: - Add enable_fibers flag to enable fiber-based request processing - Add fiber_stack_size for configuring IO thread fiber stack size (default 64KB) - Add fiber_max_pool_size for max preallocated free fibers (default 1000) - Add fiber_pool_resize_period_ms for fiber pool resize period (default 1000ms) Verbose logging changes: - Add verbose parameter to server and client configs (default 0) - Print detailed error messages for SET/GET failures when verbose is enabled - Include carbon::Result error codes in log output for debugging Files modified: - Config JSON files: Added verbose parameter to server configs - ucache_bench_benchmark.py: Added fiber params to ALLOWED_PARAMS - jobs_internal.yml: Added CLI args for fiber config and verbose flag - run.py: Added fiber and verbose CLI argument parsing - UcacheBenchClient.cpp: Added verbose error logging for warmup and benchmark ops Differential Revision: D96763783
0e4a046 to
e9db79f
Compare
charles-typ
added a commit
to charles-typ/DCPerf
that referenced
this pull request
Mar 24, 2026
Summary: Add NIC IRQ affinity configuration to ucache_bench, ported from TaoBench. This feature distributes network interrupt processing across CPUs to prevent IRQ handling from bottlenecking on a few cores. New parameters: - nic_channel_ratio: Ratio of NIC channels to logical cores (0.0 = disabled) - interface_name: Network interface for IRQ affinity tuning (default: eth0) - hard_binding: Hard bind NIC channels to specific CPU cores (default: 0) Changes: - Add affinitize_nic() function to configure NIC channels via ethtool and redistribute IRQ affinity using affinitize_nic.py script - Add new CLI arguments to server: --nic-channel-ratio, --interface-name, --hard-binding - Update install script to copy affinitize_nic scripts for OSS builds - Add NIC affinity params to benchmark configs and jobs_internal.yml - Add ucache_bench_debug_nic_affinity_configs.json for testing Differential Revision: D96763816
Summary: Pull Request resolved: facebookresearch#528 Add NIC IRQ affinity configuration to ucache_bench, ported from TaoBench. This feature distributes network interrupt processing across CPUs to prevent IRQ handling from bottlenecking on a few cores. New parameters: - nic_channel_ratio: Ratio of NIC channels to logical cores (0.0 = disabled) - interface_name: Network interface for IRQ affinity tuning (default: eth0) - hard_binding: Hard bind NIC channels to specific CPU cores (default: 0) Changes: - Add affinitize_nic() function to configure NIC channels via ethtool and redistribute IRQ affinity using affinitize_nic.py script - Add new CLI arguments to server: --nic-channel-ratio, --interface-name, --hard-binding - Update install script to copy affinitize_nic scripts for OSS builds - Add NIC affinity params to benchmark configs and jobs_internal.yml - Add ucache_bench_debug_nic_affinity_configs.json for testing Differential Revision: D96763816
e9db79f to
5565c20
Compare
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.
Summary:
Add NIC IRQ affinity configuration to ucache_bench, ported from TaoBench.
This feature distributes network interrupt processing across CPUs to prevent
IRQ handling from bottlenecking on a few cores.
New parameters:
Changes:
redistribute IRQ affinity using affinitize_nic.py script
--hard-binding
Differential Revision: D96763816