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

Create consumption profile based on punctual measure #85

Closed
4 tasks done
da-ekchajzer opened this issue May 11, 2022 · 1 comment
Closed
4 tasks done

Create consumption profile based on punctual measure #85

da-ekchajzer opened this issue May 11, 2022 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@da-ekchajzer
Copy link
Collaborator

da-ekchajzer commented May 11, 2022

Context

Today, usage impacts are measured by multiplying a duration, an impact factor, and an electrical consumption : impact = electrical_consumption*duration*impact_factor

We focus in this issue on how to identify electrical_consumption.
There are 2 ways today in the API :

  1. Given by the user, in case the user has a sensor like boagent, scaphandre or a wattmeter. We should keep this behavior.

  2. Using a Workload object which links a percentage of workload to an electrical consumption. See doc for more info.

If the user have the electrical consumption he can use this type of query :

"max_power": 510,
"workload": {
      "100": {
        "time": 0.15,
        "power": 1.0
      },
      "50": {
        "time": 0.55,
        "power": 0.7235
      },
      "10": {
        "time": 0.2,
        "power": 0.5118
      },
      "idle": {
        "time": 0.1,
        "power": 0.3941
      }
    }

This is kind of dump since the user could directly provide the electrical consumption following the first method.

If the user doesn't have his electrical consumption (which is the normal case), he can provide a workload object without power. The power will be smart completed. We use this behavior in the case of AWS instances with Teads punctual consumption profile.

"workload": {
      "100": {
        "time": 0.15,
      },
      "50": {
        "time": 0.55,
      },
      "10": {
        "time": 0.2,
      },
      "idle": {
        "time": 0.1,
      }
    }

Limits

With such behavior :

  1. We can only use a specific load repartition : [idle, 10, 50, 100] (In some cases, we only have min and max value, we could have more precise repartition in the case of stress test for instance)
  2. We cannot give a specific workload (for example My server have been running at 34% for 2 hours)
  3. The workload object is hard to understand and manipulate

Solution

Instead of having punctual workload objects we should use functions generated from the regression of punctual measures.

The idea is to use a functions : workload_to_electrical_conso which returns an electrical consumption from a given workload :
workload_to_electrical_conso(workload(%)) = electrical_consumption

TODO

Since this problem is complex it will be divided into several issues

@da-ekchajzer
Copy link
Collaborator Author

Implemented in #113

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant