Skip to content

Conversation

ofirfarjun7
Copy link

Distribute cores evenly between SPDK process

gleon99 and others added 30 commits February 2, 2023 12:02
@ofirfarjun7
Copy link
Author

ofirfarjun7 commented Aug 23, 2023

It's running without errors from what I see but please check again.
Please take it from here if need to improve/change.

private var executerLocalIdMap = new TrieMap[InetSocketAddress, Int]

private def getExecuterLocalId(key: InetSocketAddress): Int = {
val executerLocalId = executerLocalIdMap.replace(key, executerLocalIdMap(key)+1)
Copy link
Owner

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.

Copy link
Author

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})
Copy link
Owner

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 (?)

Copy link
Author

@ofirfarjun7 ofirfarjun7 Aug 24, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants