Skip to content

Commit

Permalink
test/store_test: fix deferred writing test cases
Browse files Browse the repository at this point in the history
When bitmap allocator is in use different space fragmentation and
allocation strategy cause blob fragmentation. Which in turn impacts the
decision on deferred write applicability.

Fixing by using standalone DB volume to reduce main device space fragmentation.

Fixes: https://tracker.ceph.com/issues/63795
Signed-off-by: Igor Fedotov <igor.fedotov@croit.io>
  • Loading branch information
ifed01 committed Dec 12, 2023
1 parent f64ad44 commit fd3be76
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/test/objectstore/store_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8293,6 +8293,8 @@ TEST_P(StoreTestSpecificAUSize, DeferredOnBigOverwrite2) {
}

size_t block_size = 4096;
SetVal(g_conf(), "bluestore_block_db_create", "true");
SetVal(g_conf(), "bluestore_block_db_size", stringify(1 << 30).c_str());
StartDeferred(block_size);
SetVal(g_conf(), "bluestore_max_blob_size", "65536");
SetVal(g_conf(), "bluestore_prefer_deferred_size", "65536");
Expand Down Expand Up @@ -8369,6 +8371,8 @@ TEST_P(StoreTestSpecificAUSize, DeferredOnBigOverwrite3) {
}

size_t block_size = 4096;
SetVal(g_conf(), "bluestore_block_db_create", "true");
SetVal(g_conf(), "bluestore_block_db_size", stringify(1 << 30).c_str());
StartDeferred(block_size);
SetVal(g_conf(), "bluestore_max_blob_size", "65536");
SetVal(g_conf(), "bluestore_prefer_deferred_size", "65536");
Expand Down Expand Up @@ -8447,6 +8451,10 @@ TEST_P(StoreTestSpecificAUSize, DeferredDifferentChunks) {
size_t alloc_size = 4096;
size_t large_object_size = 1 * 1024 * 1024;
size_t prefer_deferred_size = 65536;

SetVal(g_conf(), "bluestore_block_db_create", "true");
SetVal(g_conf(), "bluestore_block_db_size", stringify(1 << 30).c_str());

StartDeferred(alloc_size);
SetVal(g_conf(), "bluestore_max_blob_size", "131072");
SetVal(g_conf(), "bluestore_prefer_deferred_size",
Expand Down

0 comments on commit fd3be76

Please sign in to comment.