Class: AWSCDK::Batch::CfnSchedulingPolicy::FairsharePolicyProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Batch::CfnSchedulingPolicy::FairsharePolicyProperty
- Defined in:
- batch/cfn_scheduling_policy.rb
Overview
The fair-share scheduling policy details.
Instance Attribute Summary collapse
-
#compute_reservation ⇒ Numeric?
readonly
A value used to reserve some of the available maximum vCPU for share identifiers that aren't already used.
-
#share_decay_seconds ⇒ Numeric?
readonly
The amount of time (in seconds) to use to calculate a fair-share percentage for each share identifier in use.
-
#share_distribution ⇒ AWSCDK::IResolvable, ...
readonly
An array of
SharedIdentifierobjects that contain the weights for the share identifiers for the fair-share policy.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(compute_reservation: nil, share_decay_seconds: nil, share_distribution: nil) ⇒ FairsharePolicyProperty
constructor
A new instance of FairsharePolicyProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(compute_reservation: nil, share_decay_seconds: nil, share_distribution: nil) ⇒ FairsharePolicyProperty
Returns a new instance of FairsharePolicyProperty.
561 562 563 564 565 566 567 568 |
# File 'batch/cfn_scheduling_policy.rb', line 561 def initialize(compute_reservation: nil, share_decay_seconds: nil, share_distribution: nil) @compute_reservation = compute_reservation Jsii::Type.check_type(@compute_reservation, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "computeReservation") unless @compute_reservation.nil? @share_decay_seconds = share_decay_seconds Jsii::Type.check_type(@share_decay_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "shareDecaySeconds") unless @share_decay_seconds.nil? @share_distribution = share_distribution Jsii::Type.check_type(@share_distribution, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guQ2ZuU2NoZWR1bGluZ1BvbGljeS5TaGFyZUF0dHJpYnV0ZXNQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "shareDistribution") unless @share_distribution.nil? end |
Instance Attribute Details
#compute_reservation ⇒ Numeric? (readonly)
A value used to reserve some of the available maximum vCPU for share identifiers that aren't already used.
The reserved ratio is ( *computeReservation* /100)^ *ActiveFairShares* where *ActiveFairShares* is the number of active share identifiers.
For example, a compute_reservation value of 50 indicates that AWS Batch reserves 50% of the maximum available vCPU if there's only one share identifier. It reserves 25% if there are two share identifiers. It reserves 12.5% if there are three share identifiers. A compute_reservation value of 25 indicates that AWS Batch should reserve 25% of the maximum available vCPU if there's only one share identifier, 6.25% if there are two fair share identifiers, and 1.56% if there are three share identifiers.
The minimum value is 0 and the maximum value is 99.
580 581 582 |
# File 'batch/cfn_scheduling_policy.rb', line 580 def compute_reservation @compute_reservation end |
#share_decay_seconds ⇒ Numeric? (readonly)
The amount of time (in seconds) to use to calculate a fair-share percentage for each share identifier in use.
A value of zero (0) indicates the default minimum time window (600 seconds). The maximum supported value is 604800 (1 week).
The decay allows for more recently run jobs to have more weight than jobs that ran earlier. Consider adjusting this number if you have jobs that (on average) run longer than ten minutes, or a large difference in job count or job run times between share identifiers, and the allocation of resources doesn't meet your needs.
589 590 591 |
# File 'batch/cfn_scheduling_policy.rb', line 589 def share_decay_seconds @share_decay_seconds end |
#share_distribution ⇒ AWSCDK::IResolvable, ... (readonly)
An array of SharedIdentifier objects that contain the weights for the share identifiers for the fair-share policy.
Share identifiers that aren't included have a default weight of 1.0 .
596 597 598 |
# File 'batch/cfn_scheduling_policy.rb', line 596 def share_distribution @share_distribution end |
Class Method Details
.jsii_properties ⇒ Object
598 599 600 601 602 603 604 |
# File 'batch/cfn_scheduling_policy.rb', line 598 def self.jsii_properties { :compute_reservation => "computeReservation", :share_decay_seconds => "shareDecaySeconds", :share_distribution => "shareDistribution", } end |
Instance Method Details
#to_jsii ⇒ Object
606 607 608 609 610 611 612 613 614 |
# File 'batch/cfn_scheduling_policy.rb', line 606 def to_jsii result = {} result.merge!({ "computeReservation" => @compute_reservation, "shareDecaySeconds" => @share_decay_seconds, "shareDistribution" => @share_distribution, }) result.compact end |