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

os/bluestore: drop old bluestore preconditioning; replace with wal preextension of file size #12265

Merged
merged 2 commits into from Dec 6, 2016

Conversation

liewegas
Copy link
Member

@liewegas liewegas commented Dec 1, 2016

This drops the slwo preconditioning that didn't work.

Instead, we pre-extend rocksdb log files. This is faster, simpler, but fragile in that disabling log recycling in rocksdb will break it.

@@ -979,6 +979,7 @@ OPTION(bluefs_min_flush_size, OPT_U64, 65536) // ignore flush until its this bi
OPTION(bluefs_compact_log_sync, OPT_BOOL, false) // sync or async log compaction?
OPTION(bluefs_buffered_io, OPT_BOOL, false)
OPTION(bluefs_allocator, OPT_STR, "stupid") // stupid | bitmap
OPTION(bluefs_preextend_wal_files, OPT_BOOL, true) // this *requires* taht rocksdb has recycling enabled
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/taht/that/

This doesn't work, it's slow, and it's hacky.

Signed-off-by: Sage Weil <sage@redhat.com>
When rocksdb has log recycling on (this is required!), it will
do robust checksums on log records and change playback behavior
to tolerate trailing garbage in the log file.  This normally
allows it to overwrite previous log files, but it can also let
us overwrite arbitrary garbage on the device.

If we allocate some new space for a .log file (already indicated
by the WRITER_WAL hint), extend the size immediately so that each
subsequent append doesn't have to (unless/until we do another
allocation).

This is safe as long as rocksdb recycling is enabled (which it is
by default).

This is faster because we don't have to flush the bluefs log on
every log append during the period after startup before rocksdb
starts recycling log files.

Signed-off-by: Sage Weil <sage@redhat.com>
@liewegas liewegas merged commit 8981c1c into ceph:master Dec 6, 2016
@liewegas liewegas deleted the wip-bluestore-precondition branch December 6, 2016 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants