RAM#

class impacthpc.RAM(embodied_impacts: Impacts | None = None, electric_power: ReplicableValue | str | None = None, peak_power: ReplicableValue | str | None = None, idle_power: ReplicableValue | str | None = None, size: ReplicableValue | str | None = None, density: ReplicableValue | str | None = None, engraving_process_thickness: ReplicableValue | str | None = None, manufacturer: str | None = None)#

Bases: HasConsumptionAndEmbodiedImpacts

Subclass of Component representing a RAM stick.

This class uses the same estimation as BoavitzAPI, described in

Thibault Simon, David Ekchajzer, Adrien Berthelot, Eric Fourboul, Samuel Rince, et al.. BoaviztAPI: a bottom-up model to assess the environmental impacts of cloud services. HotCarbon’24 - 3rd Workshop on Sustainable Computer Systems, Jul 2024, Santa Cruz, United States. hal-04621947v3"

See the documentation of BoavitzAPI : https://doc.api.boavizta.org/Explanations/components/ram/

size#

The RAM size. Defaults to the value in the config file under default_values_ram > size.

Type:

ReplicableValue | str | None, optional

density#

RAM density is the quantity of data (in gigabytes) that a cm² of RAM contains. This value is expressed in GB/cm². Defaults to an estimation made by _estimate_density().

Type:

ReplicableValue | None, optional

engraving_process_thickness#

The thickness of the engraving process for manufacturing this RAM stick. If density is provided, this attribute is ignored. Defaults to None.

Type:

ReplicableValue | str | None, optional

manufacturer#

The manufacturing company. If density is provided, this attribute is ignored. Defaults to None.

Type:

str | None, optional

Methods Summary

Methods Documentation

_estimate_density() ReplicableValue#

Estimate the RAM density of the RAM stick.

This estimation uses the manufacturer and the engraving_process_thickness. We first average the density of the RAM sticks in the file defined in the config file under csv > ram_manufacture that have the same manufacturer and the same engraving process thickness.

If there are no sticks like that, we average the density of sticks with the same manufacturer. If there are still no matching sticks, we average the density of the sticks with the same engraving process thickness. If no sticks match at all, we return the average density of all RAM sticks.

Returns:

The estimated RAM density of the RAM stick.

Return type:

ReplicableValue

estimate_electric_power() ReplicableValue#

Estimate the electric power of the RAM stick.

The estimation is based on the size and a factor indicating the consumption per gigabyte of RAM. This factor is defined in the config file under default_values_ram > electrical_consumption_per_gigabyte.

Returns:

The electric power of the RAM stick.

Return type:

ReplicableValue

estimate_embodied_impacts() Impacts#

Estimate the embodied impacts of the RAM.

The embodied impacts of the RAM are estimated using the formula: self._surface_impact_factor * surface + self._base_impact, where:

  • _surface_impact_factor is the impact of 1 cm² of RAM stick. It is defined in the config file under default_values_ram > surface_impact_factor.

  • surface is the surface of the RAM stick estimated from its size and its density.

  • _base_impact is a constant impact of every RAM stick, which includes packaging, transport, etc. It is defined in the config file under default_values_ram > base_impact.

Returns:

The embodied impacts of the RAM.

Return type:

Impact

estimate_idle_power() ReplicableValue | None#

Returns the minimum consumption of the component, the consumption it has when no job are running

estimate_peak_power()#

Estimate the peak (maximum) electric power of the CPU when the workload is 100%.

The CPU’s peak instant consumption is estimated using the estimate_electric_power() method with a workload of 100%.

Returns:

The electric power of the CPU.

Return type:

Impact