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

config: change default segment size to 128MiB #8180

Merged
merged 1 commit into from
Jan 26, 2023

Conversation

jcsp
Copy link
Contributor

@jcsp jcsp commented Jan 12, 2023

This size is a more suitable default, to have
finer granularity of disk usage, and finer
granularity of tiered storage read cache when
tiered storage is in use.

For systems that write high bandwidths to a single partition, this will increase the number of segment rolls, but should not outright break anything unless the system was already very close to limits of e.g. file handles or memory.

Fixes #8170

Backports Required

  • none - not a bug fix
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v22.3.x
  • v22.2.x
  • v22.1.x

UX Changes

None

Release Notes

Improvements

  • The default log segment size is now 128MiB, decreased from the previous 1GiB.

@jcsp jcsp added kind/enhance New feature or request area/storage labels Jan 12, 2023
@jcsp
Copy link
Contributor Author

jcsp commented Jan 12, 2023

I considered updating compacted_log_segment_size as well, but that feels risky:

  • If we scaled it proportionally to log_segment size, the segments would be 32MiB, which is very small.
  • Any decrease in the segment size for compacted topics will decrease the efficiency of self-compaction within a segment (as we would have a smaller chance of repeated keys showing up in the same segment). Self compaction is important for tiered storage topics, as this is the main chance for reduction before data is re-uploaded post compaction (we may not upload subsequent compaction passes).

This size is a more suitable default, to have
finer granularity of disk usage, and finer
granularity of tiered storage read cache when
tiered storage is in use.

For systems that write high bandwidths to a single
partition, this will increase the number of segment
rolls, but should not outright break anything unless
the system was already very close to limits of e.g.
file handles or memory.

Fixes redpanda-data#8170
@jcsp jcsp force-pushed the issue-8170-default-segment-size branch from 888a234 to 98f6081 Compare January 16, 2023 21:16
@jcsp
Copy link
Contributor Author

jcsp commented Jan 19, 2023

/ci-repeat 5

@jcsp
Copy link
Contributor Author

jcsp commented Jan 26, 2023

Test results from repeated run:

@jcsp jcsp merged commit 322a31a into redpanda-data:dev Jan 26, 2023
@jcsp jcsp deleted the issue-8170-default-segment-size branch January 26, 2023 19:27
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.

Change default segment size to 128MiB
2 participants