Skip to content

Implement a Cast Highlight compliant "CO2 Emission Estimator" #142

@AMorgaut

Description

@AMorgaut

The Formula used by the Cast Highlight beta $CO_2$ Emission Estimator doesn't look at the nature of the issues but only at their number vs the project size and the project infrastructure

It uses default values for the project infrastucture if the user didn't provided those details

It is then easy to provide a first "compatible" version in the context of creedengo

Cast Highlight " $CO_2$ Emission Estimator " Formula

According to their published document, their beta "CO2 Emission Estimator" is defined this way:

$$𝐶𝑂_{2}~eq~emission reduction = \frac{𝑛_{𝐺𝐷}}{𝑀𝐿𝑂𝐶}.𝑓.(𝑛_{𝑠𝑒𝑟𝑣𝑒𝑟}.𝑡𝑠)~(\frac{𝑒_{𝑚𝑎𝑛𝑢𝑓𝑎𝑐𝑡𝑢𝑟𝑖𝑛𝑔}}{𝑙𝑖𝑓𝑒𝑡𝑖𝑚𝑒} + 𝑒𝑑 . 𝐶𝐼)$$

With the following definitions:

Parameter Description Source
$n_{GD}$ Number of "Green Deficiencies" detected Automatically calculated by CAST Highlight
MLOC Millions of lines of code Automatically calculated by CAST Highlight
f The "factor" to calculate potential reductions if green deficiencies are fixed as observed in the study conducted by CAST Research Labs Fixed value: 0.004 % . MLOC/deficiencies
$n_{server}$ Number of servers that the application utilizes to operate User supplied (default = 3)
ts The "Time Sharing" or percent utilization of the server resource capacity User supplied (default = 100%)
$e_{manufacturing}$ The $CO_{2eq}$ "Emissions" during manufacturing of servers User supplied (default = 320 $kgCO_{2eq}$ for a DELL PowerEdge R640)
lifetime The expected "lifetime" of the servers in years User supplied (default = 4)
ed The annual "Energy Demand" for each server User supplied (default = 1670 kWh/year for a DELL PowerEdge R640)
CI The "Carbon Intensity" of the environment where the application is running User supplied (default = 0.336 $kgCO_{2}$/kWh for North America)

Looking for a Standard from Green Software Foundation

CAST utilized the GSF’s Software Carbon Intensity (SCI) formula as a basis for our calculations.

Note: the GSF has submitted the Software Carbon Intensity (SCI) formula to ISO with expected approval as a standard in 2024.

  • $SCI = \frac{( O + M )}{R}$
    • O: operational emissions
    • M: embodied emissions
    • R: functional unit
  • $O = ( E \times I )$ (O is represented by the $n_{server}$ , ts, ed, and CI parameters in CAST’s implementation)
    • E: "Energy" consumed
    • I: location-based marginal carbon "Intensity"
  • $M = TE \times TS \times RS$ (M is represented by the $n_{server}$ , ts, $e_{manufacturing}$ , and lifetime parameters in CAST’s implementation)
    • TE: "Total embodied Emissions", across the whole lifecycle of the resource
    • TS: "Time-Share", in case the resource is not allocated to the software 100% of the time
    • RS: "Resource-Share", in case the resource is shared with other pieces of software
  • $R = the ~ entire ~ application ~ in ~ the ~ CAST ~ implementation$

Source

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions