From 49f58c8f33388c6075f0fb48cb29f754f219d516 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Thu, 1 Sep 2016 17:49:17 +0200 Subject: [PATCH] document another possible way to model the energy --- src/surf/plugins/energy.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/surf/plugins/energy.cpp b/src/surf/plugins/energy.cpp index 1c60ba4233..028b8af65b 100644 --- a/src/surf/plugins/energy.cpp +++ b/src/surf/plugins/energy.cpp @@ -77,8 +77,15 @@ void HostEnergy::update() else cpu_load = lmm_constraint_get_usage(surf_host->cpu_->getConstraint()) / surf_host->cpu_->speed_.peak; - if (cpu_load > 1) // A machine with a load > 1 consumes as much as a fully loaded machine, not mores + if (cpu_load > 1) // A machine with a load > 1 consumes as much as a fully loaded machine, not more cpu_load = 1; + /* The problem with this model is that the load is always 0 or 1, never something less. + * Another possibility could be to model the total energy as + * + * X/(X+Y)*W_idle + Y/(X+Y)*W_burn + * + * where X is the amount of ideling cores, and Y the amount of computing cores. + */ double previous_energy = this->total_energy; -- 2.20.1