]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: throttle at num_threads * 2
authorSage Weil <sage@newdream.net>
Tue, 3 Apr 2012 21:21:53 +0000 (14:21 -0700)
committerSage Weil <sage@newdream.net>
Tue, 3 Apr 2012 21:21:53 +0000 (14:21 -0700)
If we throttle at num_threads, then nothing gets into the workqueue until
a worker thread is idle, which means you pay the latency of setting it up
and queueing it.  This way we keep some requests ready to go.

Signed-off-by: Sage Weil <sage@newdream.net>
src/rgw/rgw_main.cc

index cfc3c7dbc57f68f47cf379f37885a8fff2c48aac..2b057b4ba309e980cf4051bf702ead8e654fcfd4 100644 (file)
@@ -180,7 +180,7 @@ class RGWProcess {
 public:
   RGWProcess(CephContext *cct, int num_threads)
     : m_tp(cct, "RGWProcess::m_tp", num_threads),
-      req_throttle(num_threads),
+      req_throttle(num_threads * 2),
       req_wq(this, g_conf->rgw_op_thread_timeout,
             g_conf->rgw_op_thread_suicide_timeout, &m_tp),
       max_req_id(0) {}