summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Just <sam.just@inktank.com>2013-08-06 13:02:24 -0700
committerSamuel Just <sam.just@inktank.com>2013-08-06 13:51:51 -0700
commit944f3b73531af791c90f0f061280160003545c63 (patch)
tree7d234f58240bd43623b48c69622e2a2da2433273
parent8b53a140812b158a366fade35aaca7839325e0a4 (diff)
downloadceph-944f3b73531af791c90f0f061280160003545c63.tar.gz
OSD: only start osd_recovery_max_single_start at once
Signed-off-by: Samuel Just <sam.just@inktank.com>
-rw-r--r--src/common/config_opts.h3
-rw-r--r--src/osd/OSD.cc3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/common/config_opts.h b/src/common/config_opts.h
index f2afefc92e2..f67d0d1237d 100644
--- a/src/common/config_opts.h
+++ b/src/common/config_opts.h
@@ -426,7 +426,8 @@ OPTION(osd_default_data_pool_replay_window, OPT_INT, 45)
OPTION(osd_preserve_trimmed_log, OPT_BOOL, false)
OPTION(osd_auto_mark_unfound_lost, OPT_BOOL, false)
OPTION(osd_recovery_delay_start, OPT_FLOAT, 0)
-OPTION(osd_recovery_max_active, OPT_INT, 5)
+OPTION(osd_recovery_max_active, OPT_INT, 60)
+OPTION(osd_recovery_max_single_start, OPT_INT, 10)
OPTION(osd_recovery_max_chunk, OPT_U64, 8<<20) // max size of push chunk
OPTION(osd_push_per_object_cost, OPT_U64, 1000) // push cost per object
OPTION(osd_max_push_cost, OPT_U64, 8<<20) // max size of push message
diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc
index 987f8354c80..7a2417cf248 100644
--- a/src/osd/OSD.cc
+++ b/src/osd/OSD.cc
@@ -6636,7 +6636,8 @@ void OSD::do_recovery(PG *pg, ThreadPool::TPHandle &handle)
{
// see how many we should try to start. note that this is a bit racy.
recovery_wq.lock();
- int max = g_conf->osd_recovery_max_active - recovery_ops_active;
+ int max = MAX(g_conf->osd_recovery_max_active - recovery_ops_active,
+ g_conf->osd_recovery_max_single_start);
if (max > 0) {
dout(10) << "do_recovery can start " << max << " (" << recovery_ops_active << "/" << g_conf->osd_recovery_max_active
<< " rops)" << dendl;