Skip to content

Commit 5924e5d

Browse files
authored
Merge pull request #536 from Boavizta/532-document-how-cloud-scanner-provides-estimations-for-block-storage-ebs
535 and 532 Support AWS io1 io2 and standard EBS volumes, update doc.
2 parents b7c2d00 + 3a105ef commit 5924e5d

File tree

8 files changed

+81
-20
lines changed

8 files changed

+81
-20
lines changed

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
_This paragraph may describe WIP/unreleased features. They are merged to main branch but not tagged._
1111

12-
- https://github.com/Boavizta/cloud-scanner/issues/520 JSON inventory: move the execution statistics to the metadata section
13-
- https://github.com/Boavizta/cloud-scanner/issues/519 Add cloud-scanner version to inventory metadata
12+
- [JSON inventory: move the execution statistics to the metadata section. · Issue #520 · Boavizta/cloud-scanner](https://github.com/Boavizta/cloud-scanner/issues/520)
13+
- [Add cloud-scanner version to inventory metadata · Issue #519 · Boavizta/cloud-scanner](https://github.com/Boavizta/cloud-scanner/issues/519)
14+
- [Document how cloud scanner provides estimations for Block storage (EBS) · Issue #532 · Boavizta/cloud-scanner](https://github.com/Boavizta/cloud-scanner/issues/532)
15+
- [Support AWS io1 io2 and standard EBS volumes · Issue #535 · Boavizta/cloud-scanner](https://github.com/Boavizta/cloud-scanner/issues/535)
1416

1517
## [3.0.0]-2024-06-05
1618

cloud-scanner-cli/src/aws_cloud_provider.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,6 @@ mod tests {
511511
let aws: AwsCloudProvider = AwsCloudProvider::new("eu-west-1").await.unwrap();
512512
let filtertags: Vec<String> = Vec::new();
513513
let res = aws.list_volumes(&filtertags).await.unwrap();
514-
assert_eq!(4, res.len());
514+
assert_eq!(6, res.len());
515515
}
516516
}

cloud-scanner-cli/src/boavizta_api_v1.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ impl BoaviztaApiV1 {
9292
};
9393

9494
match storage_type.as_str() {
95-
"st1" | "sc1" => {
95+
"st1" | "sc1" | "standard" => {
9696
// This is a HDD
9797
let res = component_api::disk_impact_bottom_up_v1_component_hdd_post(
9898
&self.configuration,
@@ -107,14 +107,14 @@ impl BoaviztaApiV1 {
107107
Ok(res) => Some(res),
108108
Err(e) => {
109109
warn!(
110-
"Warning: Cannot get HHD impact from API for type {}: {}",
110+
"Warning: Cannot get HHD impact from API for storage type {}: {}",
111111
storage_type, e
112112
);
113113
None
114114
}
115115
}
116116
}
117-
"gp2" | "gp3" => {
117+
"gp2" | "gp3" | "io1" | "io2" => {
118118
// Use impacts of an SSD
119119
let res = component_api::disk_impact_bottom_up_v1_component_ssd_post(
120120
&self.configuration,
@@ -129,7 +129,7 @@ impl BoaviztaApiV1 {
129129
Ok(res) => Some(res),
130130
Err(e) => {
131131
warn!(
132-
"Warning: Cannot get SSD impact from API for type {}: {}",
132+
"Warning: Cannot get SSD impact from API for storage type {}: {}",
133133
storage_type, e
134134
);
135135
None
@@ -138,7 +138,7 @@ impl BoaviztaApiV1 {
138138
}
139139
_ => {
140140
warn!(
141-
"Unknown disk type ({:?}), we use impacts of an ssd {:?}",
141+
"Unknown storage type ({:?}), defaulting to using impacts of an SSD {:?}",
142142
storage_type.as_str(),
143143
disk
144144
);

docs/src/SUMMARY.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
- [Methodology](explanations/methodology.md)
1313
- [How we process workload](explanations/processing-workload.md)
14+
- [Estimating Block Storage ](explanations/block-storage.md)
1415

1516
# How-to guides
1617

@@ -24,7 +25,7 @@
2425
- [Filtering by tags](how-to/filter-by-tags.md)
2526
- [Using a private instance of Boavizta API](how-to/using-private-boaviztapi.md)
2627

27-
# Reference
28+
# Referen
2829

2930
- [FAQ 💡](reference/FAQ.md)
3031
- [Common issues 🧰](reference/common-issues.md)
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Estimating impacts of block storage
2+
3+
Block storage volumes are approximated either as SSD or HDD depending on cloud provider specific storage type.
4+
5+
This is a basic estimation. It takes into account the size of the block storage volume.
6+
7+
⚠ Only the **manufacture** impacts of the Block storage are returned. The impacts of the **use** phase are returned as zero (mainly because we lack the related data in current version of Boavizta API).
8+
9+
## Block storage (EBS) estimation (AWS)
10+
11+
### What is considered in estimation:
12+
13+
- storage type (HDD vs SSD)
14+
- storage size
15+
- duration of use
16+
17+
| AWS EBS volume type | Boavizta storage used for estimation | comments |
18+
| :------------------ | :----------------------------------- | :------- |
19+
| st1 | HDD | |
20+
| sc1 | HDD | |
21+
| magnetic (standard) | HDD | |
22+
| gp2 | SSD | |
23+
| gp3 | SSD | |
24+
| io1 | SSD | |
25+
| io2 | SSD | |
26+
| unknown type | SSD | If it cannot identify the type of storage (like when a new type is introduced, cloud scanner uses SSD as an approximation) |
27+
28+
### What is not considered for the estimation
29+
30+
- If the storage offers provisioned IOPS or not.
31+
- Implicit redundancy related to storage type.
32+
- Any other infrastructure (network, backup, supervision or redundancy) that may allow the cloud provider to offer EBS service.
33+
34+
## Block storage estimations (Azure)
35+
36+
Not yet implemented.

docs/src/explanations/methodology.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,35 @@
11
# Methodology and source of data
22

3-
Cloud scanner uses the Boavizta methodology to estimate the impacts of cloud resources.
3+
Cloud scanner relies on the Boavizta methodology and data to estimate the impacts of cloud resources.
44

5-
## Source of impact data
5+
It performs an inventory of the resources used in a cloud account. It then returns impacts of the *use* phase but also impacts related to the *manufacture* of the identified resources (*embodied* impacts).
6+
7+
## The source of impact data
68

79
Impact data is retrieved from [BOAVIZTA reference data API](https://github.com/Boavizta/boaviztapi/) v1.2.x.
810

11+
## General approach and limits
12+
13+
Cloud scanner estimates impacts according to the duration of use of cloud resources. It also considers the "intensity" of use (like the type of instance and CPU load for a VM or size of a disk for storage). The region of use is also considered to take into account the electricity mix of the region (carbon intensity).
14+
15+
The general approach is to map cloud vendor specific ressources, either to Boavizta *cloud resources* (like for VM instances) or to more generic components (Block storage volumes are approximated as Boavizta HDD or SSD).
16+
17+
But this approach means that **a large portion** of the cloud provider infrastructure **is excluded from the estimation**.
18+
19+
⚠ Cloud scanner **underestimates the impacts of a cloud account**. Because it only considers the _instances_ and _block storage_, many additional sources of impacts (network, potential redundancy, cloud control plan, buildings...) are not included in the estimation.
20+
21+
![A diagram that show that only VM's and Block storage are considered](../images/cloud-scanner-perimeter-aws.excalidraw.png)
22+
23+
See also [other limits](../reference/limits.md).
24+
925
## Methodology
1026

11-
The general approach of Boavizta is described in [Digital &amp; environment : How to evaluate server manufacturing footprint, beyond greenhouse gas emissions? | Boavizta](https://boavizta.org/en/blog/empreinte-de-la-fabrication-d-un-serveur)
27+
The Boavizta methodology is described in [Digital &amp; environment : How to evaluate server manufacturing footprint, beyond greenhouse gas emissions? | Boavizta](https://boavizta.org/en/blog/empreinte-de-la-fabrication-d-un-serveur)
1228

1329
The impacts (use and embedded) are attributed according to the principles described in [Cloud instances - Boavizta API documentation](https://doc.api.boavizta.org/Explanations/services/cloud/).
1430

15-
The results are similar to what you can visualize in [Datavizta](http://datavizta.boavizta.org/cloudimpact), but with automated inventory.
31+
The results of cloud scanner are similar to what you can visualize in [Datavizta](http://datavizta.boavizta.org/cloudimpact), but with automated inventory.
1632

17-
⚠ Cloud scanner **underestimates the impacts of the cloud resources**. Because it only considers the _instances_ and _block storage_ a several sources of impacts (network, potential redundancy, cloud control plan) are not included in the estimation.
1833

19-
See also [other limits](../reference/limits.md).
34+
- Boavizta website: <https://www.boavizta.org/en>
2035

21-
- https://www.boavizta.org/en
Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
1-
# How we process workload
1+
# How we estimate instance workload
22

3-
Workload of instances are estimated using AWS cloudwatch CPU metrics summary.
3+
Workload (or intensity of use) of instances is estimated using CPU load level as a proxy.
4+
5+
## Estimating instances workload for AWS
6+
7+
The CPU load of AWS instances is retrieved using _AWS Cloudwatch CPU metrics summary_.
48

59
Cloud scanner uses a sampling period of 15 minutes, but impacts metrics are returned as impacts equivalent to one hour of use.
610

711
This means that instance impacts metrics data returned can be understood as: `impact for one hour of use (considering the CPU workload of 15 last minutes)`.
812

913
Why this default sampling period of 15 minutes ?
1014

11-
- It seems sufficient for our current monitoring needs (but maybe we can make it configurable in the future).
12-
- It seems hard to go below 10 minutes (because default period of AWS instance metrics is 5 minutes. You need to activate `detailed monitoring` (extra feature) for 1 minute granularity: [List the available CloudWatch metrics for your instances - Amazon Elastic Compute Cloud](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/viewing_metrics_with_cloudwatch.html#ec2-cloudwatch-metrics)).
15+
- It is sufficient for our current monitoring needs (but maybe we may make this setting configurable in the future).
16+
- It is hard to go below 10 minutes. Default (and free) period of AWS instance metrics is 5 minutes. You need to activate `detailed monitoring` (extra feature) for 1 minute granularity: [List the available CloudWatch metrics for your instances - Amazon Elastic Compute Cloud](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/viewing_metrics_with_cloudwatch.html#ec2-cloudwatch-metrics)).
17+
18+
## Estimating instances workload for Azure
19+
20+
Not implemented.
Loading

0 commit comments

Comments
 (0)