Boavizta / boaviztapi

🛠 Giving access to BOAVIZTA reference data and methodologies trough a RESTful API
GNU Affero General Public License v3.0
68 stars 23 forks source link

Adding overcommit in cloud instance equations #69

Open da-ekchajzer opened 2 years ago

da-ekchajzer commented 2 years ago

Problem

In some cases, some cloud providers doesn't reserve the resources paid for the cloud instances. The resource is shared between several instances. Thus, we shouldn't allocate 100% of the configuration of the scope3 impact of the instance configuration.

Solution

We consider that only CPUs are shared, thus we should allocate only a part of the CPU scope3 impacts to the instance. We should take into consideration how many instances are sharing one CPU : nb_instances_per_CPU

Instance Scope3 = BoaviztaScope3 – (BoaviztaScope3CPU * [(nb_instances_per_CPU-1) / nb_instances_per_CPU])

We should give a default value to nb_instances_per_CPU let's say 4 (i.e. we allocate the scope3 impacts of 1/4)

Question