-
Notifications
You must be signed in to change notification settings - Fork 1
Topic/distribute according to NUMA #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Topic/distribute according to NUMA #2
Conversation
It's running without errors from what I see but please check again. |
private var executerLocalIdMap = new TrieMap[InetSocketAddress, Int] | ||
|
||
private def getExecuterLocalId(key: InetSocketAddress): Int = { | ||
val executerLocalId = executerLocalIdMap.replace(key, executerLocalIdMap(key)+1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If my understanding is correct, this function increases the "local id" each time it is called. Meaning, a getter function is not idempotent, but instead modifies data structs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed name is confusing,getAndSet
or other name implies that this function also change the value in the map will be better
executorToDpuAddress += executorId -> dpuSockAddress | ||
|
||
nvkvLock.getOrElseUpdate(SerializationUtils.deserializeInetAddress(dpuSockAddress.value), {0}) | ||
executerLocalIdMap.getOrElseUpdate(SerializationUtils.deserializeInetAddress(dpuSockAddress.value), {0}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the key is DPU sock addr. but in other places above seems the key is the executor address (?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I always use the local DPU address to detect executers from the same node because it's already passed to the driver EP for advertising purposes.
I'm not using the host address at all, Check receiveAndReply
, But you are right, in some place I declared vars with the name execAdd
and it's wrong, need to change it to execDpuAdd
or similar
Distribute cores evenly between SPDK process