From 958cc8b94757105de9150b696f415e11c3db5dfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Fri, 24 Jul 2020 17:07:31 +0200 Subject: [PATCH] Update sector-storage, parallel fetch limit --- cmd/lotus-seal-worker/main.go | 9 +++++++-- cmd/lotus-storage-miner/init.go | 2 +- go.mod | 2 +- go.sum | 4 ++-- node/config/def.go | 4 ++++ 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/cmd/lotus-seal-worker/main.go b/cmd/lotus-seal-worker/main.go index 82154d328..5cf40dd7e 100644 --- a/cmd/lotus-seal-worker/main.go +++ b/cmd/lotus-seal-worker/main.go @@ -95,7 +95,7 @@ var runCmd = &cli.Command{ &cli.StringFlag{ Name: "address", Usage: "locally reachable address", - Value: "0.0.0.0", + Value: "0.0.0.0:3456", }, &cli.BoolFlag{ Name: "no-local-storage", @@ -116,6 +116,11 @@ var runCmd = &cli.Command{ Usage: "enable commit (32G sectors: all cores or GPUs, 128GiB Memory + 64GiB swap)", Value: true, }, + &cli.IntFlag{ + Name: "parallel-fetch-limit", + Usage: "maximum fetch operations to run in parallel", + Value: 5, + }, &cli.StringFlag{ Name: "timeout", Usage: "used when address is unspecified. must be a valid duration recognized by golang's time.ParseDuration function", @@ -295,7 +300,7 @@ var runCmd = &cli.Command{ return xerrors.Errorf("could not get api info: %w", err) } - remote := stores.NewRemote(localStore, nodeApi, sminfo.AuthHeader()) + remote := stores.NewRemote(localStore, nodeApi, sminfo.AuthHeader(), cctx.Int("parallel-fetch-limit")) // Create / expose the worker diff --git a/cmd/lotus-storage-miner/init.go b/cmd/lotus-storage-miner/init.go index 01a14093e..adc537c8b 100644 --- a/cmd/lotus-storage-miner/init.go +++ b/cmd/lotus-storage-miner/init.go @@ -436,7 +436,7 @@ func storageMinerInit(ctx context.Context, cctx *cli.Context, api lapi.FullNode, smgr, err := sectorstorage.New(ctx, lr, stores.NewIndex(), &ffiwrapper.Config{ SealProofType: spt, - }, sectorstorage.SealerConfig{true, true, true, true}, nil, sa) + }, sectorstorage.SealerConfig{10, true, true, true, true}, nil, sa) if err != nil { return err } diff --git a/go.mod b/go.mod index 89a63ec2c..187c6d6b4 100644 --- a/go.mod +++ b/go.mod @@ -28,7 +28,7 @@ require ( github.com/filecoin-project/go-paramfetch v0.0.2-0.20200701152213-3e0f0afdc261 github.com/filecoin-project/go-statestore v0.1.0 github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b - github.com/filecoin-project/sector-storage v0.0.0-20200723200950-ed2e57dde6df + github.com/filecoin-project/sector-storage v0.0.0-20200724175351-295300ff4671 github.com/filecoin-project/specs-actors v0.8.1-0.20200724015154-3c690d9b7e1d github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea github.com/filecoin-project/storage-fsm v0.0.0-20200720190000-2cfe2fe3c334 diff --git a/go.sum b/go.sum index 5bafb5f91..c065177ef 100644 --- a/go.sum +++ b/go.sum @@ -264,8 +264,8 @@ github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b/ github.com/filecoin-project/sector-storage v0.0.0-20200615154852-728a47ab99d6/go.mod h1:M59QnAeA/oV+Z8oHFLoNpGMv0LZ8Rll+vHVXX7GirPM= github.com/filecoin-project/sector-storage v0.0.0-20200712023225-1d67dcfa3c15 h1:miw6hiusb/MkV1ryoqUKKWnvHhPW00AYtyeCj0L8pqo= github.com/filecoin-project/sector-storage v0.0.0-20200712023225-1d67dcfa3c15/go.mod h1:salgVdX7qeXFo/xaiEQE29J4pPkjn71T0kt0n+VDBzo= -github.com/filecoin-project/sector-storage v0.0.0-20200723200950-ed2e57dde6df h1:VDdWrCNUNx6qeHnGU9oAy+izuGM02it9V/5+MJyhZQw= -github.com/filecoin-project/sector-storage v0.0.0-20200723200950-ed2e57dde6df/go.mod h1:7EE+f7jM4kCy2MKHoiiwNDQGJSb+QQzZ+y+/17ugq4w= +github.com/filecoin-project/sector-storage v0.0.0-20200724175351-295300ff4671 h1:9TqtFwy+6/Ywh3j81vFy3jQerD5DkxFY2Ul8nJPUHwg= +github.com/filecoin-project/sector-storage v0.0.0-20200724175351-295300ff4671/go.mod h1:f9W29dKqNFm8Su4OddGwkAQOYMKYUR5Fk2oC/JZDjCI= github.com/filecoin-project/specs-actors v0.0.0-20200210130641-2d1fbd8672cf/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA= github.com/filecoin-project/specs-actors v0.3.0/go.mod h1:nQYnFbQ7Y0bHZyq6HDEuVlCPR+U3z5Q3wMOQ+2aiV+Y= github.com/filecoin-project/specs-actors v0.6.0/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= diff --git a/node/config/def.go b/node/config/def.go index a9caf1377..81ffdcd9d 100644 --- a/node/config/def.go +++ b/node/config/def.go @@ -125,6 +125,10 @@ func DefaultStorageMiner() *StorageMiner { AllowPreCommit2: true, AllowCommit: true, AllowUnseal: true, + + // Default to 10 - tcp should still be able to figure this out, and + // it's the ratio between 10gbit / 1gbit + ParallelFetchLimit: 10, }, Dealmaking: DealmakingConfig{