Skip to content

Take system usage into account when scoring offers#1711

Merged
ssalinas merged 7 commits into
masterfrom
rebalance
Feb 15, 2018
Merged

Take system usage into account when scoring offers#1711
ssalinas merged 7 commits into
masterfrom
rebalance

Conversation

@ssalinas

Copy link
Copy Markdown
Contributor
  • Also collect system usage for mesos slaves
  • Ability to score on system vs task usage on the slave
  • fix a missing lock in drainPendingQueue
  • fix bug in grabbing slave usage by id

case SPREAD_SYSTEM_USAGE:
default:
double systemCpuFreeScore = Math.max(0, 1 - slaveUsage.getSystemLoad15Min());
double systemMemFreeScore = 1 - (slaveUsage.getSystemMemTotalBytes() - slaveUsage.getSystemMemTotalBytes()) / slaveUsage.getSystemMemTotalBytes();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this should be slaveUsage.getSystemMemTotalBytes() - slaveUsage.getSystemMemFreeBytes()

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

thanks, fixed

@ssalinas ssalinas added the hs_qa label Feb 15, 2018
@ssalinas ssalinas added this to the 0.19.0 milestone Feb 15, 2018
@matush-v

Copy link
Copy Markdown
Contributor

lgtm 🚢

@ssalinas
ssalinas merged commit 500c283 into master Feb 15, 2018
@ssalinas
ssalinas deleted the rebalance branch February 15, 2018 17:14
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