Skip to content

Commit

Permalink
wb: separate node heap limit from nomad values
Browse files Browse the repository at this point in the history
  • Loading branch information
mgmeier committed May 8, 2024
1 parent a26fb90 commit 53d2e25
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions nix/workbench/profile/prof0-defaults.jq
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def era_defaults($era):

, node:
{ rts_flags_override: []
, heap_limit: null ## optional: heap limit in MB (translates to RTS flag -M)
, shutdown_on_slot_synced: null
, shutdown_on_block_synced: null
, tracing_backend: "trace-dispatcher" ## or "iohk-monitoring"
Expand Down
4 changes: 3 additions & 1 deletion nix/workbench/profile/prof1-variants.jq
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,9 @@ def all_profile_variants:
, genesis:
{ utxo: (12 * $M)
}
, cluster: nomad_memory_limit(16384)
, node:
{ heap_limit: 16384
}
}

## Model value variant: 7 epochs (128GB RAM needed; 16GB for testing locally)
Expand Down
6 changes: 3 additions & 3 deletions nix/workbench/profile/prof3-derived.jq
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ def add_derived_params:
| .era as $era
| .node as $node
| .genesis.shelley.protocolParams as $pparams
| .cluster.nomad as $nomad

## The perf-ssd machines have abundant physical RAM, and Nomad uses cgroups to constrain resources.
## To also influence RTS / GC behaviour, -M needs to be used, as the RTS infers a heap limit from
## the system's ulimit, not the cgroup limit.
| $node.rts_flags_override as $rtsflags
| (if $nomad.class == "perf-ssd"
then $rtsflags + [("-M" + ($nomad.resources.producer.memory_max | tostring) + "M")]
| $node.heap_limit as $heap_limit
| (if $heap_limit | type == "number"
then $rtsflags + [("-M" + ($heap_limit | tostring) + "m")]
else $rtsflags
end) as $rtsflags_derived

Expand Down

0 comments on commit 53d2e25

Please sign in to comment.