]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crimson/os/seastore: avoid new allocation when overwriting data in RBM for performance
authormyoungwon oh <ohmyoungwon@gmail.com>
Thu, 21 Mar 2024 02:06:24 +0000 (02:06 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Thu, 16 May 2024 11:46:00 +0000 (14:46 +0300)
commit2d930c415dc2da1054e0d2940b4a660eab2a882f
treea8c95a446a163658e60a144d1a28164ee8d91ed7
parent0c7e7c0d119197fe4dc956046e4e3cc87821f1f8
crimson/os/seastore: avoid new allocation when overwriting data in RBM for performance

In 4K random write test, after seastore is filled up by 4MB extents,
current implementation performs deep copy in duplicate_for_write(), resulting in
significant performance degradation by 80%.
Therefore, this commit changes the deep copy behavior for bufferptr during the overwrite
situation to shallow copy, leaving the original data untouched.

Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
(cherry picked from commit 76b87855b4a6fb60a1fae59792aeebff3e8762d3)
src/crimson/os/seastore/cached_extent.h
src/crimson/os/seastore/object_data_handler.h
src/test/crimson/seastore/test_object_data_handler.cc