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

Adding device usage component (scope 2) #21

Closed
da-ekchajzer opened this issue Dec 10, 2021 · 6 comments
Closed

Adding device usage component (scope 2) #21

da-ekchajzer opened this issue Dec 10, 2021 · 6 comments
Assignees

Comments

@da-ekchajzer
Copy link
Collaborator

da-ekchajzer commented Dec 10, 2021

Epic

Usage

US

As an external user
I can retrieve the scope2 impact of devices
With device usage and characteristics

Usage object

  • The Usage object is the default component describing the usage and impacts of devices

usage attributes

{
"max_power": float,
"yearly_electrical_consumption": float
"life_duration": int,
"usage_location": string,
"idle_time_ratio": float,
"workload_ratio": float,
"carbon_intensity": float,
"adp_factor": float
}

Yearly electrical consumption

yearly_electrical_consumption is given by the user or smart complete depending on the type of component or device (see below)

GWP

  • The GWP impact is measured with the carbon intensity factor depending on the location of the device (country mean)
  • The user can give its own carbon intensity in case it has been provided by his own electricity provider, for example

gwp = yearly_electrical_consumption*life_duration*carbon_intensity_factor

PE

  • The PE impact is measured with the primary emission factor depending on the location of the device (country mean)
  • The user can give its own primary emission factor in case it has been provided by his own electricity provider, for example

pe = (yearly_electrical_consumption*life_duration) * primary_energy_factor

ADP

adp = (yearly_electrical_consumption*life_duration) * abiotic_depletion_potential_factor

@da-ekchajzer
Copy link
Collaborator Author

da-ekchajzer commented Dec 14, 2021

Impact factors

Carbon intensity

https://ourworldindata.org/grapher/carbon-intensity-electricity from
https://www.bp.com/en/global/corporate/energy-economics/statistical-review-of-world-energy.html (BP)
TODO : Validate data

Primary energy factor

TODO : Find electricity primary energy factor by country (per year)

ADP energy factor

TODO : Find electricity abiotic depletion potential factor by country (per year)

@da-ekchajzer da-ekchajzer pinned this issue Dec 14, 2021
da-ekchajzer pushed a commit that referenced this issue Dec 15, 2021
@da-ekchajzer
Copy link
Collaborator Author

da-ekchajzer commented Jan 3, 2022

Device yearly consumption

Electrical consumption

  • If yearly_electrical_consumption is given by the user, use this value.

  • If not, yearly_electrical_consumption is measured as follows :

yearly_electrical_consumption = ((max_power*(1-idle_time_ratio)*medium_workload) + (idle_time_ratio * idle_power))*365*24

  • If power is unknown, the attributes is smart complete
    • It can be found from power_supply component
    • It can be set has a default value

Default server data

From Dell R640 LCA

Capture

_DEFAULT_IDLE_RATIO = 2.4/24 = 10%

_DEFAULT_IDLE_PERCENTAGE_MAX_POWER = 201/510 = 40%

_DEFAULT_MEDIUM_WORKLOAD = (100*3.6 + 50*13.2 + 10*4.8)/(24-2.4) = 50%

_DEFAULT_MAX_POWER = 510

if we apply the formula to the Dell R740:

yearly_electrical_consumption_dellR740 

= ((_DEFAULT_MAX_POWER *(1-_DEFAULT_IDLE_RATIO )*medium_workload) +
(_DEFAULT_IDLE_RATIO * (_DEFAULT_IDLE_PERCENTAGE_MAX_POWER *_DEFAULT_MAX_POWER))
)*365*24

= 2189 kwh/year < 3081 kwh/year (Dell data)

@github-benjamin-davy
Copy link
Collaborator

I'm wondering what would be the most common situation from an API user POV when not having the electrical consumption (that would be most of the cases):

  • I know the average load my resource runs at (is this the workload_ratio attribute?) and the idle_time_ratio if any + a number of hours/days it has run (it can be 365 days for on-prem always-on resources or something different for cloud resources)
  • I only can guess the average load my resource runs at (low, medium, high) and a time window
  • I have no idea about the load but want an average estimation for a time window

I think the ideal for us would be to compute for each server configuration the P (power consumption) values we see in the Dell example and then simply calculate the consumption based on the parameters or fall back to something we can define (365 days running an average load).

@da-ekchajzer
Copy link
Collaborator Author

da-ekchajzer commented Jan 6, 2022

For cloud we will do an other process with a bottom-up approach per component #29 but the same problems occurs with the load

For server something like that :

Power per load

LOAD high (100%) medium (50%) low (10%) idle off
Power (W) X X X X 0

1 - I have the different power per load -> Use it
2 - I only have the max power -> Can medium, low and idle be retrieve has function of max power ?
3 - I have nothing -> Use Dell R740 power per load

Time ratio per load

LOAD high (100%) medium (50%) low (10%) idle off
Time_ratio (% of day per year or hour per day) X X X X X

1 - I have the different time ratio per load -> Use it
2 - I only have the medium workload -> what can we do ?
3 - I have nothing -> Use Dell R740 power per load

Equation

yearly_electrical_consumption = [power(high) * time_ratio(high) + power(medium) * time_ratio(medium) + power(low) * time_ratio(low) + power(idle) * time_ratio(idle) + power(off) * time_ratio(off)]*24*365

Future dev

I think it is ok to use Dell R740 for now because in the future you will be able to select an archetype (#1). All the missing datas will be set with the value of this archetype and not the value of the default configuration.

@github-benjamin-davy
Copy link
Collaborator

Thanks,

For: "2 - I only have the max power -> Can medium, low and idle be retrieved as function of max power ?" we can define some heuristics based on existing data (to be discussed), maybe @bpetit would have some interesting thoughts on this from Scaphandre and we can reuse AWS bare-metal power profiles data on top of Dell's.

For: "3 - I have nothing -> Use Dell R740 power per load" Ok to use Dell as a first step and then the closest archetype profile available, to be discussed in (#1) but we can easily generate profiles like for example: 1 low TDP (<100W) CPU + 128 Gb memory etc.

@da-ekchajzer da-ekchajzer changed the title Adding usage component (scope 2) Adding device usage component (scope 2) Jan 7, 2022
@da-ekchajzer
Copy link
Collaborator Author

da-ekchajzer commented Jan 10, 2022

Following today's meeting

  • We reach the same points (2 & 3)

  • We have identified the same problems with the time and affectation issues : When the user request the impacts for a specific time window how to affect the scope3 (linearly, all the impact, …)

  • Temporary decisions :

    • Don't aggregate scope 2 & 3
    • Returns the total of manufacture impacts
    • Returns the impact of usage for the time given by the user (or, by default, a year)
  • Power per load should be set as a percentage of max_power

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants