Bring memory back down.
authorTom Clegg <tom@tomclegg.ca>
Tue, 25 May 2021 13:40:21 +0000 (09:40 -0400)
committerTom Clegg <tom@tomclegg.ca>
Tue, 25 May 2021 13:40:21 +0000 (09:40 -0400)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curii.com>

export.go

index 311ed9ffe68c4422018cc27c571328f0f91d471b..44030671490dc334f1269c3238add048b39da876 100644 (file)
--- a/export.go
+++ b/export.go
@@ -12,6 +12,7 @@ import (
        _ "net/http/pprof"
        "os"
        "path"
+       "runtime"
        "sort"
        "strings"
        "sync"
@@ -97,7 +98,7 @@ func (cmd *exporter) RunCommand(prog string, args []string, stdin io.Reader, std
                        Name:        "lightning export",
                        Client:      arvados.NewClientFromEnv(),
                        ProjectUUID: *projectUUID,
-                       RAM:         1600000000000,
+                       RAM:         700000000000,
                        VCPUs:       64,
                        Priority:    *priority,
                }
@@ -342,7 +343,7 @@ func (cmd *exporter) export(out, bedout io.Writer, librdr io.Reader, gz bool, ti
                merge(bedout, bedw, "bed")
        }
 
-       throttle := throttle{Max: 8}
+       throttle := throttle{Max: runtime.NumCPU()}
        log.Infof("assembling %d sequences in %d goroutines", len(seqnames), throttle.Max)
        for seqidx, seqname := range seqnames {
                seqidx, seqname := seqidx, seqname