-
Notifications
You must be signed in to change notification settings - Fork 6k
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: detect unnecessary zeroes in bufferlist when data is written #43337
Conversation
jenkins test api |
jenkins retest this please |
0583152
to
5c87be9
Compare
jenkins test make check |
@aclamk @ifed01 @benhanokh I'd love if you could take a look at this PR when you have time. I've cleaned up the changes so they're divided between two distinct commits.
To test the first commit, I launched a vstart cluster ( To test the second commit, I also launched a vstart cluster with the same results as above (health was One last check I did for the fine-grain implementation was to comment out line 14276 in the second commit ( Let me know your thoughts.. I'd appreciate any feedback! |
jenkins test api |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would strongly encourage to add a UT to store_test suite to make sure the new logic works as expected. Additionally it might be helpful to introduce a perf counter (which can be used in this new UT as well) to track the amount of blocks skipped due to zero detection)
jenkins test api |
3cd9835
to
8a0f797
Compare
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
8a0f797
to
16edc62
Compare
16edc62
to
3a94720
Compare
jenkins test make check |
a9c5906
to
0622cb2
Compare
jenkins test make check arm64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally LGTM, just some nits which are up to @ljflores to fix or not.
c5ce66b
to
1dc7301
Compare
jenkins test make check arm64 |
@aclamk let me know if you have any final comments before I mark this as "needs-qa". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work. Minor details in douts and comments.
Failures, unrelated: 6580187, 6580436 -- https://tracker.ceph.com/issues/52124 Details: Bug_#52124: Invalid read of size 8 in handle_recovery_delete() - Ceph - RADOS |
this was tested ref: https://trello.com/c/im0LpXz9 |
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_small(), we check if a bufferlist is made up of zeros and avoid writing it if so. Two new counters, `l_bluestore_write_small_skipped` and l_bluestore_write_small_skipped_bytes`, have been introduced to help us count how many zero blocks and bytes from _do_write_small() have been skipped. Signed-off-by: Laura Flores <lflores@redhat.com>
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>
Unit tests include ZeroBlockDetectionSmall{Append/Overwrite} and ZeroBlockDetectionBig{Append/Overwrite}. Signed-off-by: Laura Flores <lflores@redhat.com>
1dc7301
to
3b8bf06
Compare
Will merge this since it has been tested/approved. |
An optimization (see PR: ceph#43337) was made in BlueStore to avoid writing bufferlists made up of zeros. The osd benchmark used zero filled bufferlists and this resulted in bloated osd benchmark results. This issue is fixed by using bufferlists filled with non-zero values. Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
An optimization (see PR: ceph#43337) was made in BlueStore to avoid writing bufferlists made up of zeros. The osd benchmark used zero filled bufferlists and this resulted in inflated osd benchmark results. This issue is fixed by using bufferlists filled with non-zero values. Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com> Fixes: https://tracker.ceph.com/issues/54364
An optimization (see PR: ceph#43337) was made in BlueStore to avoid writing bufferlists made up of zeros. The osd benchmark used zero filled bufferlists and this resulted in inflated osd benchmark results. This issue is fixed by using bufferlists filled with non-zero values. Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com> Fixes: https://tracker.ceph.com/issues/54364 (cherry picked from commit 09f94ac)
An optimization (see PR: ceph#43337) was made in BlueStore to avoid writing bufferlists made up of zeros. The osd benchmark used zero filled bufferlists and this resulted in inflated osd benchmark results. This issue is fixed by using bufferlists filled with non-zero values. Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com> Fixes: https://tracker.ceph.com/issues/54364
An optimization (see PR: ceph#43337) was made in BlueStore to avoid writing bufferlists made up of zeros. The osd benchmark used zero filled bufferlists and this resulted in inflated osd benchmark results. This issue is fixed by using bufferlists filled with non-zero values. Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com> Fixes: https://tracker.ceph.com/issues/54364
This broke |
Thanks for bringing this up, @idryomov. I'll have a look. |
An optimization (see PR: ceph#43337) was made in BlueStore to avoid writing bufferlists made up of zeros. The osd benchmark used zero filled bufferlists and this resulted in inflated osd benchmark results. This issue is fixed by using bufferlists filled with non-zero values. Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com> Fixes: https://tracker.ceph.com/issues/54364
Bluestore's
_do_write()
method handles writing data from bufferlists. Currently, it writes data from bufferlists without checking it first for zeros. The lack zero detection may negatively impact performance.The
_do_write()
method handles writing both small and large chunks of data with_do_write_small()
and_do_write_large()
respectively.In
do_write_small()
, we check if a bufferlist is made up of zeros and avoid writing it. A new counter,zero_block_count_small
, helps us keep track of how many zero blocks have been skipped in_do_write_small()
.Similarly, in
do_write_big()
, we check if a bufferlist is made up of zeros and avoid writing it. A new counter,zero_block_count_big
, helps us keep track of how many zero blocks have been skipped in_do_write_big()
.Trello card: https://trello.com/c/qDn0jspb/754-bluestore-zero-block-detection
Signed-off-by: Laura Flores lflores@redhat.com
Checklist
Show available Jenkins commands
jenkins retest this please
jenkins test classic perf
jenkins test crimson perf
jenkins test signed
jenkins test make check
jenkins test make check arm64
jenkins test submodules
jenkins test dashboard
jenkins test dashboard cephadm
jenkins test api
jenkins test docs
jenkins render docs
jenkins test ceph-volume all
jenkins test ceph-volume tox