Skip to content

Commit

Permalink
fix: fvm: set default max lanes to num CPUs
Browse files Browse the repository at this point in the history
  • Loading branch information
Stebalien committed Jun 19, 2024
1 parent a60b80e commit 9d8ec0a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions chain/vm/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package vm
import (
"context"
"os"
"runtime"
"strconv"
"sync"

Expand All @@ -14,16 +15,15 @@ import (
"github.com/filecoin-project/lotus/metrics"
)

const (
// DefaultAvailableExecutionLanes is the number of available execution lanes; it is the bound of
// concurrent active executions.
// This is the default value in filecoin-ffi
DefaultAvailableExecutionLanes = 4
// DefaultPriorityExecutionLanes is the number of reserved execution lanes for priority computations.
// This is purely userspace, but we believe it is a reasonable default, even with more available
// lanes.
DefaultPriorityExecutionLanes = 2
)
// DefaultPriorityExecutionLanes is the number of reserved execution lanes for priority computations.
// This is purely userspace, but we believe it is a reasonable default, even with more available
// lanes.
const DefaultPriorityExecutionLanes = 2

// DefaultAvailableExecutionLanes is the number of available execution lanes; it is the bound of
// concurrent active executions.
// This is the default value in filecoin-ffi
var DefaultAvailableExecutionLanes = runtime.NumCPU()

// the execution environment; see below for definition, methods, and initialization
var execution *executionEnv
Expand Down

0 comments on commit 9d8ec0a

Please sign in to comment.