Skip to content
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

Prioritize memory shuffles over cpu #2049

Merged
merged 2 commits into from
Dec 20, 2019
Merged

Prioritize memory shuffles over cpu #2049

merged 2 commits into from
Dec 20, 2019

Conversation

ssalinas
Copy link
Member

Memory ones are generally more urgent, take care of them first

@ssalinas ssalinas added this to the 1.2.0 milestone Dec 11, 2019
Comment on lines +162 to +168
if (mostOverusedResource1.resourceType != mostOverusedResource2.resourceType) {
if (mostOverusedResource1.resourceType == Type.MEMORY) {
return -1;
} else {
return 1;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, this short circuits all resource comparisons when the two resources being compared aren't the same. So like, if we're comparing DISK vs CPU, whichever one is mostOverusedResource1 would always sort as higher. Is that the intent? Should we scope this logic to the specific scenario when one of the resources being compared is MEMORY?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have shuffles for disk so far. Type can only be MEM or CPU

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahhh, derp. cool

@baconmania
Copy link
Contributor

🚢

@ssalinas ssalinas merged commit db7ecb9 into master Dec 20, 2019
@ssalinas ssalinas deleted the mem_shuffles branch December 20, 2019 14:27
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