-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
[STORM-2770] Add fragmentation metrics for CPU and Memory #2358
Conversation
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.
+1 once a nit is addressed.
@@ -934,7 +942,7 @@ public void setStatusMap(Map<String, String> statusMap) { | |||
public Map<String, SupervisorResources> getSupervisorsResourcesMap() { | |||
Map<String, SupervisorResources> ret = new HashMap<>(); | |||
for (SupervisorDetails sd : supervisors.values()) { | |||
ret.put(sd.getId(), new SupervisorResources(sd.getTotalMemory(), sd.getTotalMemory(), 0, 0)); | |||
ret.put(sd.getId(), new SupervisorResources(sd.getTotalMemory(), sd.getTotalCPU(), 0, 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.
Nice catch.
@@ -1825,6 +1844,11 @@ private void mkAssignments(String scratchTopoId) throws Exception { | |||
|
|||
if (!newAssignments.equals(existingAssignments)) { | |||
LOG.debug("RESETTING id->resources and id->worker-resources cache!"); | |||
LOG.info("Fragmentation after scheduling is: {} MB, {} PCore CPUs", fragmentedMemory(), fragmentedCpu()); | |||
//map.forEach((x, y) -> System.out.println(x + ": " + y)); |
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.
Let's remove the comment.
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.
+1 looks good to me.
The patch addresses following:
-- fragmented_memory
-- fragmented_cpu
-- available_memory
-- available_cpu
-- total_memory
-- total_cpu