# Post warnings about nodes that are under-utilized.
for rc in summarizer._recommend_gen(lambda x: x):
- self.usage_report_notes.append(rc)
+ self.job_runtime.usage_report_notes.append(rc)
except Exception as e:
logger.warning("%s unable to generate resource usage report",
raise WorkflowException("Workflow did not return a result.")
if runtimeContext.usage_report_notes:
- logger.info("Resource report notifications:")
+ logger.info("Steps with low resource utilization (possible optimization opportunities):")
for x in runtimeContext.usage_report_notes:
logger.info(" %s", x)
'{} peak RAM usage was only {}% ({} MiB used / {} MiB requested)'
).format(
self.label,
- int(100*(used_mib / asked_mib)),
+ int(math.ceil(100*(used_mib / asked_mib))),
int(used_mib),
int(asked_mib))
if self.job_tot['net:keep0']['rx'] == 0:
return
+
+ miss_rate = (float(self.job_tot['keepcache']['miss']) /
+ float(self.job_tot['keepcalls']['get']))
+
utilization = (float(self.job_tot['blkio:0:0']['read']) /
float(self.job_tot['net:keep0']['rx']))
# FIXME: the default on this get won't work correctly
asked_cache = self.existing_constraints.get('keep_cache_ram') or self.existing_constraints.get('keep_cache_disk')
- if utilization < 0.5:
+ if utilization < 0.5 and miss_rate > .05:
yield recommendformat(
- '{} Keep cache utilization was {:.2f}% -- '
+ '{} Keep cache utilization was only {:.2f}% and miss rate was {:.2f}% -- '
'recommend increasing keep_cache'
).format(
self.label,
- utilization * 100.0)
+ utilization * 100.0,
+ miss_rate * 100.0)
def _recommend_temp_disk(self, recommendformat):