geopm  3.1.1.dev296+g5916b956
GEOPM - Global Extensible Open Power Manager
Public Member Functions | Static Public Member Functions | List of all members
geopm::PowerBalancer Class Referenceabstract

Stay within a power cap but redistribute power to optimize performance. An average per compute node power maximum is maintained, but individual nodes will be allowed above or below this average. More...

#include <PowerBalancer.hpp>

Inheritance diagram for geopm::PowerBalancer:
Inheritance graph
[legend]

Public Member Functions

 PowerBalancer ()=default
 Construct a IPowerBalancer object. More...
 
virtual ~PowerBalancer ()=default
 Destroy a IPowerBalancer object. More...
 
virtual void power_cap (double cap)=0
 Should be called at the start of application execution with the average power cap across compute nodes. Should be called at the end of the second phase of execution to note that the power savings made across all compute nodes has been evenly redistributed. More...
 
virtual double power_cap (void) const =0
 The current power cap which cannot be exceeded without breaking contract that the average power budget across all compute nodes is maintained. More...
 
virtual double power_limit (void) const =0
 Returns the current power limit prescribed for this node. More...
 
virtual void power_limit_adjusted (double limit)=0
 Notify power balancer that a new limit has been set with the governor. More...
 
virtual bool is_runtime_stable (double measured_runtime)=0
 Update the object with a runtime measured under the current power limit and test if the current runtime sample is reliable such that a call runtime_sample() can be made. More...
 
virtual double runtime_sample (void) const =0
 Return the expected execution time of an application epoch under the current power limit. More...
 
virtual void calculate_runtime_sample (void)=0
 Sample the measured runtimes under the current power cap in the first phase of execution. This measurement will be aggregated across all compute nodes to find the largest runtime measured. More...
 
virtual void target_runtime (double largest_runtime)=0
 
virtual bool is_target_met (double measured_runtime)=0
 During the second phase of execution the power limit is decreased until the epoch runtime on the compute node under management has increased to the runtime of the slowest compute node. This method is used to update the object with a new measurement and also test if the current power limit meets the requirements. If the method returns false, then the value returned by power_limit() may have been updated. The new power limit should be enforced for the next epoch execution. More...
 
virtual double power_slack (void)=0
 Query the difference between the last power cap setting and the current power limit. If this method is called and it returns zero then the trial delta used to lower the power limit is reduced by a factor of two. More...
 

Static Public Member Functions

static std::unique_ptr< PowerBalancermake_unique (double ctl_latency)
 Returns a unique_ptr to a concrete object constructed using the underlying implementation. More...
 
static std::shared_ptr< PowerBalancermake_shared (double ctl_latency)
 Returns a shared_ptr to a concrete object constructed using the underlying implementation. More...
 

Detailed Description

Stay within a power cap but redistribute power to optimize performance. An average per compute node power maximum is maintained, but individual nodes will be allowed above or below this average.

Constructor & Destructor Documentation

◆ PowerBalancer()

geopm::PowerBalancer::PowerBalancer ( )
default

Construct a IPowerBalancer object.

◆ ~PowerBalancer()

virtual geopm::PowerBalancer::~PowerBalancer ( )
virtualdefault

Destroy a IPowerBalancer object.

Member Function Documentation

◆ calculate_runtime_sample()

virtual void geopm::PowerBalancer::calculate_runtime_sample ( void  )
pure virtual

Sample the measured runtimes under the current power cap in the first phase of execution. This measurement will be aggregated across all compute nodes to find the largest runtime measured.

Implemented in geopm::PowerBalancerImp.

◆ is_runtime_stable()

virtual bool geopm::PowerBalancer::is_runtime_stable ( double  measured_runtime)
pure virtual

Update the object with a runtime measured under the current power limit and test if the current runtime sample is reliable such that a call runtime_sample() can be made.

Parameters
measured_runtimeMost recent measurement of the execution time for an epoch on the node being managed under the current power limit.
Returns
True if a stable measurement of expected runtime for an epoch can be made with the runtime_sample() method, and false otherwise.

Implemented in geopm::PowerBalancerImp.

◆ is_target_met()

virtual bool geopm::PowerBalancer::is_target_met ( double  measured_runtime)
pure virtual

During the second phase of execution the power limit is decreased until the epoch runtime on the compute node under management has increased to the runtime of the slowest compute node. This method is used to update the object with a new measurement and also test if the current power limit meets the requirements. If the method returns false, then the value returned by power_limit() may have been updated. The new power limit should be enforced for the next epoch execution.

Parameters
measured_runtimeMost recent measurement of the execution time for an epoch on the node being managed under the current power limit.
Returns
True if the current power limit is reliably close to the target runtime and excess power should be sent up to the root to be redistributed, and false if more trials are required.

Implemented in geopm::PowerBalancerImp.

◆ make_shared()

std::shared_ptr< PowerBalancer > geopm::PowerBalancer::make_shared ( double  ctl_latency)
static

Returns a shared_ptr to a concrete object constructed using the underlying implementation.

◆ make_unique()

std::unique_ptr< PowerBalancer > geopm::PowerBalancer::make_unique ( double  ctl_latency)
static

Returns a unique_ptr to a concrete object constructed using the underlying implementation.

◆ power_cap() [1/2]

virtual void geopm::PowerBalancer::power_cap ( double  cap)
pure virtual

Should be called at the start of application execution with the average power cap across compute nodes. Should be called at the end of the second phase of execution to note that the power savings made across all compute nodes has been evenly redistributed.

Parameters
power_capThe new maximum power limit equal to the current power limit plus the amount of power saved that is being redistributed.

Implemented in geopm::PowerBalancerImp.

◆ power_cap() [2/2]

virtual double geopm::PowerBalancer::power_cap ( void  ) const
pure virtual

The current power cap which cannot be exceeded without breaking contract that the average power budget across all compute nodes is maintained.

Returns
The current value of the power cap.

Implemented in geopm::PowerBalancerImp.

◆ power_limit()

virtual double geopm::PowerBalancer::power_limit ( void  ) const
pure virtual

Returns the current power limit prescribed for this node.

Returns
The current power limit in units of Watts.

Implemented in geopm::PowerBalancerImp.

◆ power_limit_adjusted()

virtual void geopm::PowerBalancer::power_limit_adjusted ( double  limit)
pure virtual

Notify power balancer that a new limit has been set with the governor.

Parameters
limitlimit that was set.

Implemented in geopm::PowerBalancerImp.

◆ power_slack()

virtual double geopm::PowerBalancer::power_slack ( void  )
pure virtual

Query the difference between the last power cap setting and the current power limit. If this method is called and it returns zero then the trial delta used to lower the power limit is reduced by a factor of two.

Returns
The difference between the last power cap and the current power limit in units of Watts.

Implemented in geopm::PowerBalancerImp.

◆ runtime_sample()

virtual double geopm::PowerBalancer::runtime_sample ( void  ) const
pure virtual

Return the expected execution time of an application epoch under the current power limit.

Implemented in geopm::PowerBalancerImp.

◆ target_runtime()

virtual void geopm::PowerBalancer::target_runtime ( double  largest_runtime)
pure virtual
Parameters
Setthe target runtime which is the largest epoch execution time measured by any compute node since the application began or the last global increase to the power budget.
largest_runtimeThe largest expected runtime for one epoch across all compute nodes under the current power budget.

Implemented in geopm::PowerBalancerImp.


The documentation for this class was generated from the following files: