UCP/PROTO: Prefer interfaces closer to memory #10932
Open
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.
What?
Prefer interfaces that are closer to the memory to send. We go from 15GB/s to 357GB/s in some cases.
Why?
Some systems have HCAs and a GPU under the same PCI bridge. In that case, although all interfaces have same bandwidth, protocol selection should first select those. This is particularly true when using multiple GPUs with pairwise traffic (GPUx to remote GPUx), where traffic should remain on sibling interfaces.
How?
The code fetches the interfaces bandwidth and checks if it needs to further restrict it due to system topology (three values infinite/17GBs/0.2GBs/). In case of slower interfaces (11GBs) this does not work and we cannot discriminate interfaces under same PCI bridge or not.
Proposal is to boost bandwidth in such case but ideally bw/lat/distance and even partitioning of the traffic should be taken into account. We could also have proto selection not rely only on raw bw.