summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkanksha Mahajan <43301668+akankshamahajan15@users.noreply.github.com>2024-01-31 12:37:42 -0800
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>2024-01-31 12:37:42 -0800
commit95d582e0cc352033661efc232e41fc46e5c25dd3 (patch)
tree721c956352e6f1af28c37682a607770b1b462736
parentd11584e42e75d1a785286e2ecc5c8445042f42ac (diff)
Enable io_uring in stress test (#12313)
Summary: Enable io_uring in stress test Pull Request resolved: https://github.com/facebook/rocksdb/pull/12313 Test Plan: Crash test Reviewed By: anand1976 Differential Revision: D53238319 Pulled By: akankshamahajan15 fbshipit-source-id: c0c8e6a6479f6977210370606e9d551c1299ba62
-rw-r--r--.circleci/config.yml6
-rw-r--r--.github/workflows/pr-jobs.yml2
-rw-r--r--db_stress_tool/db_stress_common.h1
-rw-r--r--db_stress_tool/db_stress_gflags.cc4
-rw-r--r--db_stress_tool/db_stress_tool.cc11
5 files changed, 5 insertions, 19 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index d47c18c7c..2c72a22d9 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -547,7 +547,7 @@ jobs:
resource_class: large
steps:
- pre-steps
- - run: ulimit -S -n `ulimit -H -n` && make V=1 -j8 CRASH_TEST_EXT_ARGS='--duration=960 --max_key=2500000 --use_io_uring=0' blackbox_crash_test_with_atomic_flush
+ - run: ulimit -S -n `ulimit -H -n` && make V=1 -j8 CRASH_TEST_EXT_ARGS='--duration=960 --max_key=2500000' blackbox_crash_test_with_atomic_flush
- post-steps
build-linux-crashtest-tiered-storage-bb:
@@ -557,7 +557,7 @@ jobs:
- pre-steps
- run:
name: "run crashtest"
- command: ulimit -S -n `ulimit -H -n` && make V=1 -j32 CRASH_TEST_EXT_ARGS='--duration=10800 --use_io_uring=0' blackbox_crash_test_with_tiered_storage
+ command: ulimit -S -n `ulimit -H -n` && make V=1 -j32 CRASH_TEST_EXT_ARGS='--duration=10800' blackbox_crash_test_with_tiered_storage
no_output_timeout: 100m
- post-steps
@@ -568,7 +568,7 @@ jobs:
- pre-steps
- run:
name: "run crashtest"
- command: ulimit -S -n `ulimit -H -n` && make V=1 -j32 CRASH_TEST_EXT_ARGS='--duration=10800 --use_io_uring=0' whitebox_crash_test_with_tiered_storage
+ command: ulimit -S -n `ulimit -H -n` && make V=1 -j32 CRASH_TEST_EXT_ARGS='--duration=10800' whitebox_crash_test_with_tiered_storage
no_output_timeout: 100m
- post-steps
diff --git a/.github/workflows/pr-jobs.yml b/.github/workflows/pr-jobs.yml
index 68e660dc3..00f1305a2 100644
--- a/.github/workflows/pr-jobs.yml
+++ b/.github/workflows/pr-jobs.yml
@@ -352,7 +352,7 @@ jobs:
steps:
- uses: actions/checkout@v4.1.0
- uses: "./.github/actions/pre-steps"
- - run: ulimit -S -n `ulimit -H -n` && make V=1 -j8 CRASH_TEST_EXT_ARGS='--duration=960 --max_key=2500000 --use_io_uring=0' blackbox_crash_test_with_atomic_flush
+ - run: ulimit -S -n `ulimit -H -n` && make V=1 -j8 CRASH_TEST_EXT_ARGS='--duration=960 --max_key=2500000' blackbox_crash_test_with_atomic_flush
- uses: "./.github/actions/post-steps"
# ======================= Linux with Sanitizers ===================== #
build-linux-clang10-asan:
diff --git a/db_stress_tool/db_stress_common.h b/db_stress_tool/db_stress_common.h
index 4c7ee5f15..768e90b9f 100644
--- a/db_stress_tool/db_stress_common.h
+++ b/db_stress_tool/db_stress_common.h
@@ -351,7 +351,6 @@ DECLARE_uint64(readahead_size);
DECLARE_uint64(initial_auto_readahead_size);
DECLARE_uint64(max_auto_readahead_size);
DECLARE_uint64(num_file_reads_for_auto_readahead);
-DECLARE_bool(use_io_uring);
DECLARE_bool(auto_readahead_size);
constexpr long KB = 1024;
diff --git a/db_stress_tool/db_stress_gflags.cc b/db_stress_tool/db_stress_gflags.cc
index c6ffbc93e..3a0059425 100644
--- a/db_stress_tool/db_stress_gflags.cc
+++ b/db_stress_tool/db_stress_gflags.cc
@@ -1129,11 +1129,9 @@ DEFINE_uint64(stats_dump_period_sec,
ROCKSDB_NAMESPACE::Options().stats_dump_period_sec,
"Gap between printing stats to log in seconds");
-DEFINE_bool(use_io_uring, false, "Enable the use of IO uring on Posix");
-
DEFINE_bool(verification_only, false,
"If true, tests will only execute verification step");
-extern "C" bool RocksDbIOUringEnable() { return FLAGS_use_io_uring; }
+extern "C" bool RocksDbIOUringEnable() { return true; }
DEFINE_uint32(memtable_max_range_deletions, 0,
"If nonzero, RocksDB will try to flush the current memtable"
diff --git a/db_stress_tool/db_stress_tool.cc b/db_stress_tool/db_stress_tool.cc
index 9c24e2c42..54147ea9c 100644
--- a/db_stress_tool/db_stress_tool.cc
+++ b/db_stress_tool/db_stress_tool.cc
@@ -100,17 +100,6 @@ int db_stress_tool(int argc, char** argv) {
env_wrapper_guard = std::make_shared<CompositeEnvWrapper>(
raw_env, std::make_shared<DbStressFSWrapper>(raw_env->GetFileSystem()));
- if (!env_opts && !FLAGS_use_io_uring) {
- // If using the default Env (Posix), wrap DbStressEnvWrapper with the
- // legacy EnvWrapper. This is a workaround to prevent MultiGet and scans
- // from failing when IO uring is disabled. The EnvWrapper
- // has a default implementation of ReadAsync that redirects to Read.
- legacy_env_wrapper_guard = std::make_shared<EnvWrapper>(raw_env);
- env_wrapper_guard = std::make_shared<CompositeEnvWrapper>(
- legacy_env_wrapper_guard,
- std::make_shared<DbStressFSWrapper>(
- legacy_env_wrapper_guard->GetFileSystem()));
- }
db_stress_env = env_wrapper_guard.get();
FLAGS_rep_factory = StringToRepFactory(FLAGS_memtablerep.c_str());