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

Add inline_max, to optionally limit the size of inlined files #914

Merged
merged 1 commit into from
Jan 19, 2024

Conversation

geky
Copy link
Member

@geky geky commented Dec 21, 2023

Inlined files live in metadata and decrease storage requirements, but may be limited to improve metadata-related performance. This is especially important given the current plague of metadata performance.

Though decreasing inline_max may make metadata more dense and increase block usage, so it's important to benchmark if optimizing for speed.

The underlying limits of inlined files haven't changed:

  1. Inlined files need to fit in RAM, so <= cache_size
  2. Inlined files need to fit in a single attr, so <= attr_max
  3. Inlined files need to fit in 1/8 of a block to avoid metadata overflow issues, this is after limiting by metadata_max, so <= min(metadata_max, block_size)/8

By default, the largest possible inline_max is used. This preserves backwards compatibility and is probably a good default for most use cases.

This does have the awkward effect of requiring inline_max=-1 to indicate disabled inlined files, but I don't think there's a good way around this.

@geky-bot
Copy link
Collaborator

Tests passed ✓, Code: 16812 B (-0.0%), Stack: 1448 B (+0.0%), Structs: 808 B (+1.0%)
Code Stack Structs Coverage
Default 16812 B (-0.0%) 1448 B (+0.0%) 808 B (+1.0%) Lines 2362/2538 lines (+0.0%)
Readonly 6186 B (+0.9%) 448 B (+0.0%) 808 B (+1.0%) Branches 1215/1546 branches (-0.1%)
Threadsafe 17680 B (-0.0%) 1448 B (+0.0%) 816 B (+1.0%) Benchmarks
Multiversion 16876 B (-0.0%) 1448 B (+0.0%) 812 B (+1.0%) Readed 29369693876 B (+0.0%)
Migrate 18504 B (+0.0%) 1752 B (+0.0%) 812 B (+1.0%) Proged 1482874766 B (+0.0%)
Error-asserts 17496 B (+0.1%) 1440 B (+0.0%) 808 B (+1.0%) Erased 1568888832 B (+0.0%)

@geky geky added next minor and removed needs minor version new functionality only allowed in minor versions labels Jan 17, 2024
@geky geky added this to the v2.9 milestone Jan 17, 2024
@geky geky changed the base branch from master to devel January 19, 2024 18:20
Inlined files live in metadata and decrease storage requirements, but
may be limited to improve metadata-related performance. This is
especially important given the current plague of metadata performance.

Though decreasing inline_max may make metadata more dense and increase
block usage, so it's important to benchmark if optimizing for speed.

The underlying limits of inlined files haven't changed:
1. Inlined files need to fit in RAM, so <= cache_size
2. Inlined files need to fit in a single attr, so <= attr_max
3. Inlined files need to fit in 1/8 of a block to avoid metadata
   overflow issues, this is after limiting by metadata_max,
   so <= min(metadata_max, block_size)/8

By default, the largest possible inline_max is used. This preserves
backwards compatibility and is probably a good default for most use
cases.

This does have the awkward effect of requiring inline_max=-1 to
indicate disabled inlined files, but I don't think there's a good
way around this.
@geky-bot
Copy link
Collaborator

Tests passed ✓, Code: 16964 B (-0.0%), Stack: 1432 B (+0.0%), Structs: 812 B (+1.0%)
Code Stack Structs Coverage
Default 16964 B (-0.0%) 1432 B (+0.0%) 812 B (+1.0%) Lines 2385/2564 lines (-0.0%)
Readonly 6186 B (+0.9%) 448 B (+0.0%) 812 B (+1.0%) Branches 1236/1574 branches (-0.1%)
Threadsafe 17828 B (-0.0%) 1432 B (+0.0%) 820 B (+1.0%) Benchmarks
Multiversion 17028 B (-0.0%) 1432 B (+0.0%) 816 B (+1.0%) Readed 29369693876 B (+0.0%)
Migrate 18656 B (+0.0%) 1736 B (+0.0%) 816 B (+1.0%) Proged 1482874766 B (+0.0%)
Error-asserts 17652 B (+0.1%) 1424 B (+0.0%) 812 B (+1.0%) Erased 1568888832 B (+0.0%)

@geky geky merged commit 13d7861 into devel Jan 19, 2024
109 checks passed
@geky geky mentioned this pull request Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants