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

Object header size limitation #262

Closed
roman-khimov opened this issue May 30, 2023 · 7 comments
Closed

Object header size limitation #262

roman-khimov opened this issue May 30, 2023 · 7 comments
Assignees
Labels
enhancement Improving existing functionality I2 Regular impact S2 Regular significance U3 Regular
Milestone

Comments

@roman-khimov
Copy link
Member

Following on #171 (comment) discussion.

A regular attribute-less header is expected to be around 180 bytes. Session token can add ~200 bytes to that. But the biggest problem we have is split info data which at minimum is ~150 bytes of auxiliary data. It can have a copy of a parent header inside and it can also have a list of object IDs (hashes). Object header limit affects the maximum size of a large object. 1K of hashes is just 2G of object.

Attributes can be arbitrary, but we may remember FilePath and FileName as some commonly used. 256 bytes is a must to have for them (traditional Windows MAX_PATH is 260), but given the UTF-8 encoding we may even consider 4096 (regular PATH_MAX).

Given all of that 1K size limit can't be considered at all, 4K also seems to be too limiting (~6G "large" objects and really constrained attributes). To have things at least somewhat balanced I'd say we need a minimum of 16K headers. This leaves some space for attributes and allows to have 30G objects.

CC @AnnaShaleva, @notimetoname, @cthulhu-rider.

@cthulhu-rider
Copy link
Contributor

cthulhu-rider commented Feb 22, 2024

taking into account #263, seems like 4K could be enough. If anything, the limit can be raised compatible

or just stock 16K and be sure?

@roman-khimov
Copy link
Member Author

Four PATH_MAX seems to be more viable to me, so 16K. At least something that can last.

@cthulhu-rider
Copy link
Contributor

im ok with 16K

@cthulhu-rider
Copy link
Contributor

btw, does the limit apply specifically to header field or to all fields except the payload?

@cthulhu-rider cthulhu-rider self-assigned this Feb 22, 2024
cthulhu-rider added a commit to nspcc-dev/neofs-node that referenced this issue Feb 22, 2024
Previously, NeoFS used 4MB as object header's length limit. The value
originally resulted from the default max gRPC message length.

Now header length can be up to 16KB only. To ensure the safety of data
uploaded before the restriction was introduced, this limit does not
apply to intra-container replication.

Refs nspcc-dev/neofs-api#262.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
cthulhu-rider added a commit to nspcc-dev/neofs-node that referenced this issue Feb 22, 2024
Previously, NeoFS used 4MB as object header's length limit. The value
originally resulted from the default max gRPC message length.

Now header length can be up to 16KB only. To ensure the safety of data
uploaded before the restriction was introduced, this limit does not
apply to intra-container replication.

Refs nspcc-dev/neofs-api#262.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
@roman-khimov
Copy link
Member Author

I'd think of HEAD reply, but it'd be less convenient to check this way. OID is known to be small, signatures are short as well, the only thing that can be problematic is Header. @carpawell?

@carpawell
Copy link
Member

I think limiting only Header field is OK. Also, if we add more fields here, the same header (the same size) may surprisingly become invalid for the new objects but still be OK for the old ones.

Another question: what about the big objects? Parent header may be OK, but the child parts that have it as a part of their headers may become invalid at the last split step. Do we want to do smth about it?

@roman-khimov
Copy link
Member Author

Do we want to do smth about it?

No.

cthulhu-rider added a commit that referenced this issue Feb 22, 2024
Previously, NeoFS used 4MB as object header's length limit. The value
originally resulted from the default max gRPC message length.

Now header length can be up to 16KB only. To ensure the safety of data
uploaded before the restriction was introduced, this limit does not
apply to intra-container replication.

Closes #262.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
cthulhu-rider added a commit to nspcc-dev/neofs-sdk-go that referenced this issue Feb 27, 2024
Added to the protocol within
nspcc-dev/neofs-api#262.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
cthulhu-rider added a commit to nspcc-dev/neofs-sdk-go that referenced this issue Feb 27, 2024
It was added to the protocol within
nspcc-dev/neofs-api#262. Also provide
`Object.HeaderLen` method.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
cthulhu-rider added a commit to nspcc-dev/neofs-node that referenced this issue Feb 28, 2024
Previously, NeoFS used 4MB as object header's length limit. The value
originally resulted from the default max gRPC message length.

Now header length can be up to 16KB only. To ensure the safety of data
uploaded before the restriction was introduced, this limit does not
apply to intra-container replication.

Refs nspcc-dev/neofs-api#262.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
cthulhu-rider added a commit to nspcc-dev/neofs-node that referenced this issue Feb 28, 2024
Previously, NeoFS used 4MB as object header's length limit. The value
originally resulted from the default max gRPC message length.

Now header length can be up to 16KB only. To ensure the safety of data
uploaded before the restriction was introduced, this limit does not
apply to intra-container replication.

Refs nspcc-dev/neofs-api#262.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
cthulhu-rider added a commit to nspcc-dev/neofs-node that referenced this issue Feb 28, 2024
Previously, NeoFS used 4MB as object header's length limit. The value
originally resulted from the default max gRPC message length.

Now header length can be up to 16KB only. To ensure the safety of data
uploaded before the restriction was introduced, this limit does not
apply to intra-container replication.

Refs nspcc-dev/neofs-api#262.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
cthulhu-rider added a commit to nspcc-dev/neofs-node that referenced this issue Feb 29, 2024
Previously, NeoFS used 4MB as object header's length limit. The value
originally resulted from the default max gRPC message length.

Now header length can be up to 16KB only. To ensure the safety of data
uploaded before the restriction was introduced, this limit does not
apply to intra-container replication.

Refs nspcc-dev/neofs-api#262.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
cthulhu-rider added a commit to nspcc-dev/neofs-node that referenced this issue Feb 29, 2024
Previously, NeoFS used 4MB as object header's length limit. The value
originally resulted from the default max gRPC message length.

Now header length can be up to 16KB only. To ensure the safety of data
uploaded before the restriction was introduced, this limit does not
apply to intra-container replication.

Refs nspcc-dev/neofs-api#262.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving existing functionality I2 Regular impact S2 Regular significance U3 Regular
Projects
None yet
Development

No branches or pull requests

3 participants