The eShop Web application is a web application built on Asp.Net .It is built with monolithic architecture and follows MVC Design pattern
The application uses a relational database for storing data
The business use cases built demonstrates a simplified eCommerce site.
The case study focuses on calculating the Software Carbon Intensity (SCI) value of the application using the formula as defined in the latest version of the specification
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:
E = Energy consumed by a software system
I = Location-based marginal carbon emissions
M = Embodied emissions of a software system
R = Functional unit (e.g. carbon per additional user, API-call, ML job, etc)
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
App server for the Web application
Database server
Excluded
The following components and their carbon emissions have been excluded from the SCI calculation for now.
Front end browser .This is the browser client on the device that is displaying the application to the end users on their desktop/mobile/laptop etc. (Will be added in the next version)
Network traffic between browser client and application server. _We have the numbers in terms of the byte size that travelled across the network but don’t have the reference multiplication factor in terms of carbon emissions associated per byte. We have requested this info from SCI open data project_
Network traffic between application servers and databases. We have the numbers in terms of the byte size that travelled across the network but don’t have the reference multiplication factor in terms of carbon emissions associated per byte. We have requested this info from SCI open data project_
Test infrastructure: These include the load test resources that were used to simulate virtual users and http requests to the web server. Since the infrastructure and the associated energy usage do not fit into the same functional unit scale as defined in the SCI formula, these components will be excluded from the software’s SCI calculation.
(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
From specs, we found that Power consumed by 4GB memory is close to 1.45 W and that by 8 GB memory is approximately 2.45 W. Since the energy values for memory are much lower than the calculated energy values for processors or CPUs, we consider these values negligible. Pr ~0
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.
Server utilization = 18.3922%
Number of hours = 1
Number of cores = 2
TDP = 205W
TDP Coefficient = 0.32
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)
TE = 1205.52 kgCo2e
TR = 1 hour
EL = 35040
RR = 2
TR = 16
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
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 = 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