-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80 from Green-Software-Foundation/impls
Adds impl spec and examples
- Loading branch information
Showing
10 changed files
with
955 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
src/**/*.js | ||
src/**/*.d.ts | ||
lib/**/*.js | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,179 @@ | ||
name: accenture | ||
description: sci calculation for accenture model (note need to add app gateway SCI to final calculation) | ||
tags: | ||
initialize: | ||
models: | ||
- name: add-obs # a model that just copies some values into every observation. | ||
kind: builtin | ||
path: '' | ||
- name: teads-cpu | ||
kind: builtin | ||
verbose: false | ||
path: '' | ||
- name: e-mem # model that calculates e for ram memory usage | ||
kind: builtin | ||
verbose: false | ||
path: '' | ||
- name: pue | ||
kind: builtin | ||
verbose: false | ||
path: '' | ||
config: | ||
pue: 1.125 | ||
- name: sci-m # a model that calculates m from te, tir, el, rr and rtor | ||
kind: builtin | ||
verbose: false | ||
path: '' | ||
- name: sci-o # a model that given e, i and m calculates a carbon value (e * i) + m | ||
kind: builtin | ||
verbose: false | ||
path: '' | ||
- name: sci # a model that sums sci-o + sci-m | ||
kind: builtin | ||
verbose: false | ||
path: '' | ||
graph: | ||
vm: | ||
pipeline: | ||
- teads-cpu # converts cpu-util to energy based on a tdp and a built in set of coeff. | ||
- e-mem # converts ram-util to energy based on a tdp and a built in set of coeff. | ||
- pue # multiplies every energy by a pue coeff. | ||
- sci-m # adds embodied to the observation. | ||
- sci-o # calculates carbon for this obervation (energy * grid-ci) + embodied. | ||
- sci # calculates sci by dividing carbon by `r` | ||
- sci-accenture # multiplies sci value by 1.05 to account for the "app-gateway" | ||
config: | ||
sci-m: | ||
te: 458 #kgCo2 @ 4yr lifespan | ||
tir: "duration" | ||
el: 126144000 | ||
rr: 1 | ||
tor: 1 | ||
teads-cpu: | ||
tdp: ??? # what's the TDP for this server | ||
add-obs: | ||
grid-ci: 350.861 # Just copies any values under here to the observation as is. | ||
sci: | ||
time: hour # signal to convert /s -> /hr | ||
factor: 89000 # factor to convert per time to per f.unit | ||
children: | ||
vm1: | ||
observations: | ||
- timestamp: 2023-07-06T00:00 | ||
duration: 2419200 # seconds in a month (7 days * 4 weeks) | ||
cpu-util: 15 | ||
ram-util: 75 | ||
e: 4.26 #kwh/month | ||
vm2: | ||
observations: | ||
- timestamp: 2023-07-06T00:00 | ||
duration: 2419200 # seconds in a month (7 days * 4 weeks) | ||
cpu-util: 12 | ||
ram-util: 72 | ||
e: 4.26 # kwh/month | ||
vm3: | ||
observations: | ||
- timestamp: 2023-07-06T00:00 | ||
duration: 2419200 # seconds in a month (7 days * 4 weeks) | ||
cpu-util: 10 | ||
ram-util: 65 | ||
e: 4.21 # kwh/month | ||
vm4: | ||
observations: | ||
- timestamp: 2023-07-06T00:00 | ||
duration: 2419200 # seconds in a month (7 days * 4 weeks) | ||
cpu-util: 9 | ||
ram-util: 70 | ||
e: 4.21 # kwh/month | ||
vm5: | ||
observations: | ||
- timestamp: 2023-07-06T00:00 | ||
duration: 2419200 # seconds in a month (7 days * 4 weeks) | ||
cpu-util: 9 | ||
ram-util: 70 | ||
e: 4.21 # kwh/month | ||
vm6: | ||
observations: | ||
- timestamp: 2023-07-06T00:00 | ||
duration: 2419200 # seconds in a month (7 days * 4 weeks) | ||
cpu-util: 8 | ||
ram-util: 65 | ||
e: 3.29 # kwh/month | ||
vm7: | ||
observations: | ||
- timestamp: 2023-07-06T00:00 | ||
duration: 2419200 # seconds in a month (7 days * 4 weeks) | ||
cpu-util: 7 | ||
ram-util: 72 | ||
e: 3.29 # kwh/month | ||
vm8: | ||
observations: | ||
- timestamp: 2023-07-06T00:00 | ||
duration: 2419200 # seconds in a month (7 days * 4 weeks) | ||
cpu-util: 6 | ||
ram-util: 70 | ||
e: 3.29 # kwh/month | ||
db: | ||
pipeline: | ||
- add-obs # add common values to every observertion | ||
- teads-cpu # converts cpu-util to energy based on a tdp and a built in set of coeff. | ||
- e-mem # converts ram-util to energy | ||
- pue # multiplies every energy by a pue coeff. | ||
- sci-m # adds embodied to the observeation. | ||
- sci-o # calculates carbon for this obervation (energy * grid-ci) + embodied. | ||
- sci # calculates sci by dividing carbon by `r` | ||
config: | ||
sci-m: | ||
te: 458 #kgCo2 @ 4yr lifespan | ||
tir: "duration" | ||
el: 126144000 | ||
rr: 1 | ||
tor: 1 | ||
teads-cpu: | ||
tdp: ??? # what's the TDP for this server | ||
add-obs: | ||
grid-ci: 350.861 # Just copies any values under here to the observation as is. | ||
sci: | ||
time: hour # signal to convert /s -> /hr | ||
factor: 89000 # factor to convert per time to per f.unit | ||
observations: | ||
- timestamp: 2023-07-06T00:00 | ||
duration: 2419200 # seconds in a month (7 days * 4 weeks) | ||
cpu-util: 4 | ||
ram-util: 40 | ||
e: 2.68 # kwh/month | ||
monitoring: | ||
pipeline: | ||
- add-obs # add common values to every observertion | ||
- teads-cpu # converts cpu-util to energy | ||
- e-mem # conmverts ram-util to energy | ||
- pue # multiplies every energy by a pue coeff. | ||
- sci-m # adds embodied to the observeation. | ||
- sci-o # calculates carbon for this obervation (energy * grid-ci) + embodied. | ||
- sci # calculates sci by dividing carbon by `r` | ||
config: | ||
sci-m: | ||
te: 458 #kgCo2 @ 4yr lifespan | ||
tir: "duration" | ||
el: 126144000 | ||
rr: 1 | ||
tor: 1 | ||
teads-cpu: | ||
tdp: ??? # what's the TDP for this server | ||
add-obs: | ||
grid-ci: 350.861 # Just copies any values under here to the observation as is. | ||
sci: | ||
time: hour # signal to convert /s -> /hr | ||
factor: 89000 # factor to convert per time to per f.unit | ||
observations: | ||
- timestamp: 2023-07-06T00:00 | ||
duration: 2419200 # seconds in a month (7 days * 4 weeks) | ||
cpu-util: 20 | ||
ram-util: 0 | ||
e: 4.62 # kwh/month | ||
app-gateway: # note that the app gateway does not have observations, its SCI is assumed equal to 5% of the total emissions | ||
pipeline: | ||
- sci-accenture | ||
config: | ||
sci_accenture: | ||
factor: 1.05 # multiply sum of other sci components by this value to get overall total SCI in gCO2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: aveva | ||
description: https://github.com/Green-Software-Foundation/sci-guide/blob/dev/use-case-submissions/AVEVA_case_study.md | ||
tags: | ||
kind: web | ||
complexity: moderate | ||
category: on-premise | ||
initialize: | ||
models: | ||
- name: sci-aveva # a model that takes in power observations and returns e. | ||
kind: plugin | ||
path: '' | ||
- name: sci-o # a model that given e, i and m calculates a carbon value (e * i) + m | ||
kind: builtin | ||
verbose: false | ||
path: '' | ||
- name: sci-m # a model that calculates m from te, tir, el, rr and rtor. | ||
kind: builtin | ||
verbose: false | ||
path: '' | ||
- name: sci # sums SCI components and converts to f.unit | ||
kind: builtin | ||
verbose: false | ||
path: '' | ||
graph: | ||
pc: | ||
config: | ||
sci-m: | ||
te: 350 # kgCO2eq | ||
tir: 31536000 # 1 year in seconds | ||
el: 157680000 # 5 years in seconds | ||
rr: 1 | ||
tor: 1 | ||
sci-o: | ||
i: 474.8 #gCo2/kWh | ||
sci: | ||
time: year | ||
factor: 1 | ||
observations: | ||
timestamp: 2023-07-06T00:00 | ||
pl: 16.009 # average over timespan | ||
pb: 11.335 # average over timespan | ||
t: 8322 # (hours in year * average uptime e.g. 95%) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: azure-metrics | ||
description: "https://github.com/yelghali/imapct-engine-framework/blob/main/src/lib/components/azure_vm.py" | ||
tags: | ||
initialize: | ||
models: | ||
- name: metrics-exporter # model that grabs Azure metrics and uses them to enrich confg and obs in impl | ||
kind: plugin | ||
verbose: false | ||
path: /usr/local/bin | ||
- name: teads-cpu # a model that returns an embodied value given the sci embodied attribution equation. | ||
kind: builtin | ||
verbose: false | ||
path: '' | ||
- name: e-mem # a model that calculates e for memory utilization (0.38 * mem_util) | ||
kind: builtin | ||
path: '' | ||
- name: sci-e # sums e components (can be e_cpu, e_gpu, e_mem, e_network) - in this case e-mem and e_cpu from teads | ||
kind: builtin | ||
path: '' | ||
- name: sci-m # a model that calculates m from te, tir, el, rr and rtor | ||
kind: builtin | ||
verbose: false | ||
path: '' | ||
- name: sci-o # takes in total e and outputs operational emissions | ||
kind: builtin | ||
verbose: false | ||
path: '' | ||
- name: sci # a model that sums sci-o + sci-m and applies functional unit | ||
kind: builtin | ||
verbose: false | ||
path: '' | ||
# Single observation | ||
graph: | ||
backend: # an advanced grouping node | ||
pipeline: | ||
- metrics-exporter - # grabs obs from azure-sdk and enriches impl | ||
- teads-cpu # tdp & cpu -> energy | ||
- e-mem # calculates energy used by memory as component of sci-m | ||
- sci-m # duration & config -> embodied | ||
- sci-e # sums e components (can be e_cpu, e_gpu, e_mem, e_network) - in this case e-mem and e_cpu from teads | ||
- sci-o # takes in total e and outputs operational emissions | ||
- sci # sum sci-m and sci-o and apply functional unit | ||
config: | ||
vendor: azure | ||
region: east-us # lookup carbon intensity from region | ||
e-mem: | ||
mem_allocation: 32 # GB | ||
mem-energy: 0.38 # kwh/GB | ||
sci-m: | ||
te: 1200 # kgCO2eq | ||
tr: 3600 # 1hr in s | ||
el: 126144000 # 4 years in seconds | ||
rr: 2 | ||
tor: 16 | ||
sci-e: | ||
i: 100 # gCO2e/kWh | ||
sci: | ||
time: hour # signal to convert /s -> /hr | ||
factor: 32000 | ||
observations: | ||
- timestamp: 2023-07-06T00:00 | ||
duration: 86400 # 1 day | ||
subscription-id: c60d99da-0c45-4dfa-bc21-87e3c4cb4716 | ||
resource-group: my-application | ||
name: batch-servers | ||
observation-window: 3600 # 1 min buckets | ||
|
Oops, something went wrong.