]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: add bluestore_prefer_wal_size[_hdd,_ssd] options
authorSage Weil <sage@redhat.com>
Thu, 2 Feb 2017 19:06:05 +0000 (14:06 -0500)
committerSage Weil <sage@redhat.com>
Tue, 7 Mar 2017 23:10:55 +0000 (18:10 -0500)
commitbed114db0a76fb59c6d6ceace3584fd987dd8bbf
treecd7c4132fbac39e32053b123638ea83ed168342c
parent8786b4c8fe27a9ed9a685dce1283c279ad418832
os/bluestore: add bluestore_prefer_wal_size[_hdd,_ssd] options

Add option to prefer a WAL write if the write is below a size threshold,
even if we could avoid it.  This lets you trade some write-amp (by
journaling data to rocksdb) for latency in cases where the WAL device is
much faster than the main device.

This affects:

 - writes to new extents locations below min_alloc_size
 - writes to unallocated space below min_alloc_size
 - "big" writes above min_alloc_size that are below the prefer_wal_size
   threshold.

Note that it's applied to individual blobs, not the entirety of the write,
so if your have a larger write torn into two pieces/blobs that are below
the threshold then they will both go through the wal.

Set different defaults for HDD and SSD, since this makes more sense for HDD
where seeks are expensive.

Add some test cases to exercise the option.

Signed-off-by: Sage Weil <sage@redhat.com>
src/common/config_opts.h
src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h
src/test/objectstore/store_test.cc