Class: Temporalio::Worker::Tuner::ResourceBasedTunerOptions
- Inherits:
-
Struct
- Object
- Struct
- Temporalio::Worker::Tuner::ResourceBasedTunerOptions
- Defined in:
- lib/temporalio/worker/tuner.rb
Overview
Options for create_resource_based or SlotSupplier::ResourceBased.
Instance Attribute Summary collapse
-
#target_cpu_usage ⇒ Float
A value between 0 and 1 that represents the target (system) CPU usage.
-
#target_memory_usage ⇒ Float
A value between 0 and 1 that represents the target (system) memory usage.
Instance Attribute Details
#target_cpu_usage ⇒ Float
Returns A value between 0 and 1 that represents the target (system) CPU usage. This can be set to 1.0 if desired, but it’s recommended to leave some headroom for other processes.
49 50 51 52 53 |
# File 'lib/temporalio/worker/tuner.rb', line 49 ResourceBasedTunerOptions = Struct.new( :target_memory_usage, :target_cpu_usage, keyword_init: true ) |
#target_memory_usage ⇒ Float
Returns A value between 0 and 1 that represents the target (system) memory usage. It’s not recommended to set this higher than 0.8, since how much memory a workflow may use is not predictable, and you don’t want to encounter OOM errors.
49 50 51 52 53 |
# File 'lib/temporalio/worker/tuner.rb', line 49 ResourceBasedTunerOptions = Struct.new( :target_memory_usage, :target_cpu_usage, keyword_init: true ) |