Skip to content

Latest commit

 

History

History
91 lines (65 loc) · 3.04 KB

README.md

File metadata and controls

91 lines (65 loc) · 3.04 KB

Teads' AWS Estimation Model

Note

Teads-AWS is a community model, not part of the IF standard library. This means the IF core team are not closely monitoring these models to keep them up to date. You should do your own research before implementing them!

Teads Engineering Team built a model for estimating AWS instances energy usage. This model creates a power curve on a correlation to SPEC Power database. This allows the model to generate a power curve for any AWS EC2 instance type based on publicly available AWS EC2 Instance CPU data.

The main benefit of this model is that it accounts for all the components involved in an instance's compute capacity.

Model name

IF recognizes the Teads AWS model as teads-aws

Parameters

Model config

  • interpolation: the interpolation method to apply to the TDP curve
  • instance-type: the name of the instance type, e.g. t2.micro

Observations

  • cpu-util: percentage CPU usage for the given time period
  • timestamp: a timestamp for the observation
  • duration: the amount of time, in seconds, that the observation covers.

Returns

  • energy: The energy used in operating the application, in kWh
  • embodied-carbon: The carbon used in manufacturing and disposing of the device

Implementation

IEF implements this plugin based on the data gathered from the CCF (Cloud Carbon Footprint) dataset.

Spline interpolation is implemented as the default method of estimating the usage using the power curve provided by IDLE, 10%, 50%, 100% values in the dataset.

Resulting values are an estimate based on the testing done by Teads' Engineering Team. Further information can be found in the following links.

  1. TEADS Engineering: Building An AWS EC2 Carbon Emissions Dataset
  2. TEADS Engineering: Estimating AWS EC2 Instances Power Consumption

Example

import {TeadsAWS} from '@grnsft/if-unofficial-models';

const teads = new TeadsAWS();
teads.configure({
  instance_type: 'c6i.large'
})
const results = teads.execute([
  {
    duration: 3600, // duration institute
    cpu: 0.1, // CPU usage as a value between 0 and 1 in floating point number
    datetime: '2021-01-01T00:00:00Z', // ISO8601 / RFC3339 timestamp
  }
]);

Example impl

name: teads-aws
description: simple demo invoking sci-m
tags:
initialize:
  models:
    - name: teads-aws
      model: TeadsAWS
      path: '@grnsft/if-unofficial-models'
graph:
  children:
    child:
      pipeline:
        - teads-aws # duration & config -> embodied
      config:
      inputs:
        - timestamp: 2023-07-06T00:00
          duration: 3600

You can run this by passing it to impact-engine. Run impact using the following command run from the project root:

npm i -g @grnsft/if
npm i -g @grnsft/if-unofficial-models
impact-engine --impl ./examples/impls/teads-aws.yml --ompl ./examples/ompls/teads-aws.yml