]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: detect unnecessary zeros in _do_write_big()
authorLaura Flores <lflores@redhat.com>
Fri, 24 Dec 2021 01:18:13 +0000 (01:18 +0000)
committerLaura Flores <lflores@redhat.com>
Fri, 24 Dec 2021 01:18:13 +0000 (01:18 +0000)
commit914debdd4a5c3dd8f7b7762cd138e971a44cfdc3
tree0aaa7de9a42139a9b297648f7a5f8ac5e9ec2361
parent15cd3550320c9c6095dad0be021a9a87177deb46
os/bluestore: detect unnecessary zeros in _do_write_big()

Bluestore's `_do_write()` method handles writing data from bufferlists. Currently, it writes data from bufferlists without checking for unnecessary zeros. The lack zero detection may negatively impact performance.

In _do_write_big, we also check if a bufferlist is made up of zeros and avoid writing it if so.
Two new counters, `l_bluestore_write_big_skipped_blobs` and `l_bluestore_write_big_skipped_bytes`, have been introduced to help us count how many zero blocks and bytes from _do_write_big() have been skipped.

Signed-off-by: Laura Flores <lflores@redhat.com>
src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h