Skip to content

Commit

Permalink
Merge pull request #6 from filecoin-project/feat/relax-testing-sector…
Browse files Browse the repository at this point in the history
…-constraints

loosen constraints on 8MiB and 2KiB sectors (for testing)
  • Loading branch information
laser authored Apr 1, 2020
2 parents c4b928d + 0730ece commit 7c07e34
Showing 1 changed file with 81 additions and 8 deletions.
89 changes: 81 additions & 8 deletions resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,22 @@ var ResourceTable = map[sealtasks.TaskType]map[abi.RegisteredProof]Resources{

BaseMinMemory: 1 << 30,
},
abi.RegisteredProof_StackedDRG2KiBSeal: Resources{
MaxMemory: 1 << 11,
MinMemory: 1 << 11,

MultiThread: false,

BaseMinMemory: 1 << 11,
},
abi.RegisteredProof_StackedDRG8MiBSeal: Resources{
MaxMemory: 1 << 23,
MinMemory: 1 << 23,

MultiThread: false,

BaseMinMemory: 1 << 23,
},
},
sealtasks.TTPreCommit1: {
abi.RegisteredProof_StackedDRG32GiBSeal: Resources{
Expand All @@ -67,6 +83,22 @@ var ResourceTable = map[sealtasks.TaskType]map[abi.RegisteredProof]Resources{

BaseMinMemory: 1 << 30,
},
abi.RegisteredProof_StackedDRG2KiBSeal: Resources{
MaxMemory: 1 << 11,
MinMemory: 1 << 11,

MultiThread: false,

BaseMinMemory: 1 << 11,
},
abi.RegisteredProof_StackedDRG8MiBSeal: Resources{
MaxMemory: 1 << 23,
MinMemory: 1 << 23,

MultiThread: false,

BaseMinMemory: 1 << 23,
},
},
sealtasks.TTPreCommit2: {
abi.RegisteredProof_StackedDRG32GiBSeal: Resources{
Expand All @@ -85,6 +117,22 @@ var ResourceTable = map[sealtasks.TaskType]map[abi.RegisteredProof]Resources{

BaseMinMemory: 1 << 30,
},
abi.RegisteredProof_StackedDRG2KiBSeal: Resources{
MaxMemory: 1 << 11,
MinMemory: 1 << 11,

MultiThread: true,

BaseMinMemory: 1 << 11,
},
abi.RegisteredProof_StackedDRG8MiBSeal: Resources{
MaxMemory: 1 << 23,
MinMemory: 1 << 23,

MultiThread: true,

BaseMinMemory: 1 << 23,
},
},
sealtasks.TTCommit1: { // Very short (~100ms), so params are very light
abi.RegisteredProof_StackedDRG32GiBSeal: Resources{
Expand All @@ -103,6 +151,22 @@ var ResourceTable = map[sealtasks.TaskType]map[abi.RegisteredProof]Resources{

BaseMinMemory: 1 << 30,
},
abi.RegisteredProof_StackedDRG2KiBSeal: Resources{
MaxMemory: 1 << 11,
MinMemory: 1 << 11,

MultiThread: false,

BaseMinMemory: 1 << 11,
},
abi.RegisteredProof_StackedDRG8MiBSeal: Resources{
MaxMemory: 1 << 23,
MinMemory: 1 << 23,

MultiThread: false,

BaseMinMemory: 1 << 23,
},
},
sealtasks.TTCommit2: { // TODO: Measure more accurately
abi.RegisteredProof_StackedDRG32GiBSeal: Resources{
Expand All @@ -123,14 +187,23 @@ var ResourceTable = map[sealtasks.TaskType]map[abi.RegisteredProof]Resources{

BaseMinMemory: 10 << 30,
},
},
}
abi.RegisteredProof_StackedDRG2KiBSeal: Resources{
MaxMemory: 1 << 11,
MinMemory: 1 << 11,

MultiThread: false,
CanGPU: true,

func init() {
// for now we just reuse params for 2kib and 8mib from 512mib
BaseMinMemory: 1 << 11,
},
abi.RegisteredProof_StackedDRG8MiBSeal: Resources{
MaxMemory: 1 << 23,
MinMemory: 1 << 23,

MultiThread: false,
CanGPU: true,

for taskType := range ResourceTable {
ResourceTable[taskType][abi.RegisteredProof_StackedDRG8MiBSeal] = ResourceTable[taskType][abi.RegisteredProof_StackedDRG512MiBSeal]
ResourceTable[taskType][abi.RegisteredProof_StackedDRG2KiBSeal] = ResourceTable[taskType][abi.RegisteredProof_StackedDRG512MiBSeal]
}
BaseMinMemory: 1 << 23,
},
},
}

0 comments on commit 7c07e34

Please sign in to comment.