Green-Software-Foundation / sci

A specification that describes how to calculate a carbon intensity for software applications.
Other
252 stars 51 forks source link

Eshoppen case study second draft including Database server #246

Closed srini1978 closed 2 years ago

srini1978 commented 2 years ago

eShoppen - SCI Case Study

Overview

The Software Carbon Intensity (SCI) is a rate, carbon emissions per one unit of R. The equation used to calculate the SCI value of a software system is:

SCI = ((E * I) + M) per R

Where:

All the elements in the SCI equation scale by the same functional unit of “R”

Architecture

The architecture consists of the following components. App Service plan: An App Service plan provides the managed virtual machines (VMs) that host your app. All apps associated with a plan run on the same VM instances.

App Service app: Azure App Service is a fully managed platform for creating and deploying cloud applications.

Azure SQL Database: SQL Database is a relational database-as-a-service in the cloud. SQL Database shares its code base with the Microsoft SQL Server database engine. Depending on your application requirements, you can also use Azure Database for MySQL or Azure Database for PostgreSQL. These are fully managed database services based on the open-source MySQL Server and Postgres database engines.

We did Load Test runs with Azure App service Premium configuration with 2 core – 7 GB RAM and database server of Gen 5 Processor and calculated the power consumed in these runs. The tests are meant to be a model only and can be extended to more infrastructure configurations. Database power and embodied emissions values of the database were not included in calculations .

(What) Software boundary

Describe the components that are included in the software systems, if any major components are not included then please provide reasons for exclusion.

Included

Excluded

The following components and their carbon emissions have been excluded from the SCI calculation for now.

(Scale) Functional Unit

Describe the functional unit that best controls the scaling of the software system.

The choice of functional unit applies to all components in your software boundary.

R is 500 Users over a 1 hour period with 50 concurrent users

(How) Quantification method

For each software component in your software boundary, decide whether you are going to measure using real-world data or calculate an estimate via models, provide a reason and any useful details for each choice.

App server for Web application

Energy (E)

The Quantification method used for calculating energy value is Calculate. We are measuring CPU utilization of the app servers and then using a model based on the Thermal Design Power (TDP) of the processors, number of cores etc to estimate the power consumption.

The equation used to model the energy consumption is:

P[kwH] = (Power consumed by CPU or Pc Number of cores + Power consumed by Memory or Pr + Power consumed by GPU or Pg Number of GPUs)/1000

Carbon Intensity (I)

Embodied Carbon (M)

The equation to calculate M = TE * (TR/EL) * (RR/TR)

Where:

For this component:

(Quantify) SCI Value Calculation

Show your work! For each of the components of your software system, show how you arrived at the SCI value. Guidance for this is available in the Methodology summary section.

App server for Web application

Energy (E)

The workings of E, include raw numbers and calculations.

E = Server utilization * Number of hours * Number of cores * TDP * TDP co-efficient
  = (0.18 * 1 hour * 2 cores * 205 TDP * 0.32 TDP co-efficient)/1000
  = 0.023

E = 0.023 KwH

Carbon Intensity (I)

I = 951 gCO2e/kWh

Embodied Carbon (M)

M = TE * (TR/EL) * (RR/TR)

M = 1205.52 (1/35040) (2/16) = 0.004305 KG =~ 4.305 gCO2e

SCI

The sum of the SCI calculation.

SCI = (E I) + M = (0.02394 KwH 951 gCO2e/kwH) + 4.305 gCO2e = 26.178 gCO2e

SCI Total

The total SCI for the whole application.

SCI = SCI(App server for Web application) = 26.178 gCO2e