-
Notifications
You must be signed in to change notification settings - Fork 30
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 #325 from Green-Software-Foundation/dev
Publish 2 new Cloud Patterns
- Loading branch information
Showing
2 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
docs/catalog/cloud/reduce-network-traversal-between-VMs.md
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,40 @@ | ||
--- | ||
version: 1.0 | ||
submitted_by: yelghali | ||
published_date: 2024-07-30 | ||
category: cloud | ||
tags: | ||
- cloud | ||
- network | ||
- compute | ||
- kubernetes | ||
- role:cloud-engineer | ||
- size:medium | ||
--- | ||
|
||
# Reduce network traversal between VMs | ||
|
||
## Description | ||
Placing VMs in a single region or a single availability zone reduces the physical distance between the instances. | ||
|
||
## Solution | ||
Choose the VM placement that is best for your workload. | ||
|
||
Most cloud providers provide various options, like | ||
- https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html | ||
- https://cloud.google.com/compute/docs/instances/define-instance-placement | ||
- https://learn.microsoft.com/en-us/azure-stack/hci/manage/vm-affinity | ||
|
||
## SCI Impact | ||
`SCI = (E * I) + M per R` | ||
[Software Carbon Intensity Spec](https://grnsft.org/sci) | ||
|
||
Regarding the SCI equation, reducing network traversal between VMs will impact: | ||
|
||
- `E`: By reducing network travel distance, we reduce the amount of energy consumed. | ||
|
||
## Assumptions | ||
- VM placement options provided by cloud providers are adequate for this workload, | ||
|
||
## Considerations | ||
- For business critical workloads, you need to ensure your workload is spread across multiple availability-zones, which may result in more network traversal and increase in your carbon footprint. |
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,48 @@ | ||
--- | ||
version: 1.0 | ||
submitted_by: markus-ntt-seidl | ||
published_date: 2024-07-30 | ||
category: cloud | ||
tags: | ||
- cloud | ||
- role:cloud-engineer | ||
- size:small | ||
- programming-language | ||
|
||
--- | ||
|
||
# Use compiled languages | ||
|
||
## Description | ||
|
||
Interpreted languages need to be parsed, compiled and executed when the application starts or a workload arrives. This tends to be more energy heavy then when a compiled language is used. The compilation is then only done once, saving on resources. | ||
|
||
## Solution | ||
|
||
Use compiled languages (like Go, Rust, Java or others) whenever possible or compile interpreted languages. | ||
|
||
|
||
## SCI Impact | ||
|
||
`SCI = (E * I) + M per R` | ||
[Software Carbon Intensity Spec](https://grnsft.org/sci) | ||
|
||
Concerning the SCI equation, use compiled languages will impact as follows: | ||
|
||
- `E`: Running compiled binaries is more energy efficient and uses less energy which outweighs the energy consumed in compiling it to binary upfront | ||
- `M`: The embodied carbon emissions will be reduced, as compiled binaries tend to be smaller then the sources they are compiled from | ||
|
||
## Assumptions | ||
|
||
- There is the assumption that the execution environment allows usage of compiled languages, this is not always the case (for example web browsers) | ||
- Use benchmarks to determine if the application use case benefits from using a compiled language. | ||
|
||
## Considerations | ||
|
||
- Some interpreted languages provide ways to be compiled into binary (for example GraalVM for Java, Python and more) | ||
- Consider factoring in compile time when doing benchmarks | ||
|
||
## References | ||
|
||
- [One Carbon intensity benchmark](https://greenlab.di.uminho.pt/wp-content/uploads/2017/10/sleFinal.pdf) | ||
|