Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion workflow/src/clustering.tpl.tengo
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@ self.body(func(inputs) {
run()

// get split memory limit based on real system ram
memLimit := "{int(ceil(system.ram.gb * 0.8))}" + "G"
// --split-memory-limit controls only the prefilter database splitting;
// actual peak usage is ~125% of this value, plus uncontrolled memory
// from clustering and alignment steps; 60% leaves headroom for all of that
memLimit := "{int(max(system.ram.gb*60/100,1))}" + "G"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For better readability and consistency with the previous code that used 0.8, it's clearer to use the floating-point literal 0.6 instead of the expression 60/100. While Tengo's division should handle this correctly, using 0.6 avoids any potential confusion about integer division for future maintainers.

	    memLimit := "{int(max(system.ram.gb * 0.6, 1))}" + "G"


mem := "32GiB" // @TODO: set based on the size of the input
cpu := 16
Expand Down
Loading