ofi: merge the default ctx and target endpoints #1200
Merged
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.
SOS currently opens 2 libfabric endpoints (EPs) per process, which can lead to Rx/TX resource exhaustion in scale-up scenarios (like with 1 process per core, when there are more cores on the CPU than there are contexts on the NIC - see #1127). This PR merges those 2 endpoints, which benefits scaling (i.e., it improves the maximum PPN by 2x in typical cases), and seems to improve overall performance due to better runtime progress.
In this PR I propose we make single-EP the default behavior for SOS over OFI transport. The optimization can be disabled by setting the new env var
SHMEM_OFI_DISABLE_SINGLE_EP
.This also has the benefit of enabling
FI_MANUAL_PROGRESS
for a few providers, like OPX, TCP, and sockets - when SOS is configured with--enable-ofi-manual-progress
and--enable-manual-progress
.