Skip to content
This repository has been archived by the owner on Dec 20, 2022. It is now read-only.

Use default numCompletionVectors if disni returns negative. #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/main/java/org/apache/spark/shuffle/rdma/RdmaNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,12 @@ private void initCpuArrayList() throws IOException {
};

final int maxCpu = Runtime.getRuntime().availableProcessors() - 1;
int numCompletionVectors = listenerRdmaCmId.getVerbs().getNumCompVectors();
if (numCompletionVectors <= 0) {
numCompletionVectors = 1;
}
final int maxUsableCpu = Math.min(Runtime.getRuntime().availableProcessors(),
listenerRdmaCmId.getVerbs().getNumCompVectors()) - 1;
numCompletionVectors) - 1;
if (maxUsableCpu < maxCpu - 1) {
logger.warn("IbvContext supports only " + (maxUsableCpu + 1) + " CPU cores, while there are" +
" " + (maxCpu + 1) + " CPU cores in the system. This may lead to under-utilization of the" +
Expand Down