Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch published deals do not get packed into sectors as expected #6013

Closed
f8-ptrk opened this issue Apr 11, 2021 · 7 comments · Fixed by #6041
Closed

Batch published deals do not get packed into sectors as expected #6013

f8-ptrk opened this issue Apr 11, 2021 · 7 comments · Fixed by #6041
Assignees
Labels
area/markets Area: Markets area/sealing dif/easy An existing lotus user should be able to pick this up effort/hours Effort: Hours kind/bug Kind: Bug P2 P2: Should be resolved

Comments

@f8-ptrk
Copy link
Contributor

f8-ptrk commented Apr 11, 2021

regarding:

https://filecoinproject.slack.com/archives/G01KU7G441Y/p1618134221295100

when batch publishing deals MaxWaitDealsSectors needs to be set to 1 if a miner wants all published deals in the same sector. as soon as MaxWaitDealsSectors > 1 the deals get spread out over [up to] MaxWaitDealsSectors sectors.

Expected/wanted behavior:

lotus-miner packing deals into sectors as it can find space without creating [up to] MaxWaitDealsSectors sectors.

[edit]

as reference about how this behaves:

https://filecoinproject.slack.com/archives/G01KU7G441Y/p1616110446225200?thread_ts=1615892104.004200&cid=G01KU7G441Y

@neondragon
Copy link

neondragon commented Apr 11, 2021

Steps to reproduce:

Set MaxWaitDealsSectors to 2
Receive 4 1GiB storage deals
lotus-miner version 1.6.0+mainnet+git.3cfb6b09d.dirty

Expected

1 WaitDeals sector created containing all four deals. Efficient packing.

WaitDeals [ 1GiB, 1GiB, 1GiB, 1GiB ]

Actual

2 WaitDeals sectors created. Inefficient use of sector capacity.

WaitDeals [ 1GiB, 1GiB ]
WaitDeals [ 1GiB, 1GiB ]

@rjan90
Copy link
Contributor

rjan90 commented Apr 11, 2021

I'm experiencing the same thing on v1.6.0. Ideally it would package as many deals as possible into one sector before it spawns up the the next WaitDealsSectors.

One problem with spreading the batch-publishing deals out over the MaxWaitDealsSectors-amount, is that you could end up with sectors in wait deals-state with a couple of smaller deal sizes (e.g 1GiB) spread across them. And when you get a full-sector deal, it will be stuck until you start manually sealing one of the sectors.

Lotus version

Daemon:  1.6.0+mainnet+git.3fc23a785+api1.1.0
Local: lotus version 1.6.0+mainnet+git.3fc23a785

@jennijuju
Copy link
Member

@f8-ptrk can you please summarize the slack conversation instead of linking a thread?

@magik6k magik6k self-assigned this Apr 13, 2021
@magik6k magik6k added kind/bug Kind: Bug and removed hint/needs-triaging labels Apr 13, 2021
@magik6k
Copy link
Contributor

magik6k commented Apr 13, 2021

Ok, this is a bug.

The fix should be relatively easy - storage fsm input should be able to queue pieces to be added to a sector - right now if a piece is being added to a sector (the sector is in the AddPiece state), we'll always start a new sector if we can, which results in this behavior.

Not sure if this should be configurable, I think that packing as much data as we can into sectors is always better - and if, for example, we have 2 32G pieces coming to a 32G miner at once, we'll still start 2 sectors to process them in parallel

@jennijuju jennijuju added area/sealing dif/easy An existing lotus user should be able to pick this up effort/hours Effort: Hours labels Apr 13, 2021
@jennijuju jennijuju added the P2 P2: Should be resolved label May 17, 2021
@ribasushi
Copy link
Collaborator

@f8-ptrk can you please confirm this got resolved from your perspective?

@f8-ptrk
Copy link
Contributor Author

f8-ptrk commented Jun 8, 2021

have some deals?

@ribasushi maybe ask in minerX for people who have a bunch of deals going on. we are basically dry for a month now on the deal side

[edit]

already forwarded it

@rjan90
Copy link
Contributor

rjan90 commented Jun 9, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/markets Area: Markets area/sealing dif/easy An existing lotus user should be able to pick this up effort/hours Effort: Hours kind/bug Kind: Bug P2 P2: Should be resolved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants