Class: Temporalio::Worker::Tuner::ResourceBasedTunerOptions

Inherits:
Struct
  • Object
show all
Defined in:
lib/temporalio/worker/tuner.rb

Overview

Instance Attribute Summary collapse

Instance Attribute Details

#target_cpu_usageFloat

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.

Returns:

  • (Float)

    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_usageFloat

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.

Returns:

  • (Float)

    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
)