Whamcloud - gitweb
LU-2424 ptlrpc: reduce initial buffers count
authorDmitry Eremin <dmitry.eremin@intel.com>
Thu, 14 Mar 2013 17:28:50 +0000 (21:28 +0400)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 18 Mar 2013 05:21:29 +0000 (01:21 -0400)
Separate buffers count for server and client services.
Reduce inititial allocation for client ("ldlm_cbd") because
its not required a lot. This reduced unreclaimable memory
usage after just mount from 233036kB to 97386kB.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I56fcbe6c45c61ba4876bce5482169ea06a03638c
Reviewed-on: http://review.whamcloud.com/5719
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/lustre_net.h
lustre/ldlm/ldlm_lockd.c

index a606ff2..c500fb9 100644 (file)
   * threads for each partition to keep service healthy, so total threads
   * number should be 24 * 8 = 192.
   *
-  * So with these constants, threads number wil be at the similar level
+  * So with these constants, threads number will be at the similar level
   * of old versions, unless target machine has over a hundred cores
   */
 #define LDLM_THR_FACTOR                8
 #define LDLM_NTHRS_BASE                24
 #define LDLM_NTHRS_MAX         (cfs_num_online_cpus() == 1 ? 64 : 128)
 
-#define LDLM_BL_THREADS  LDLM_NTHRS_AUTO_INIT
-#define LDLM_NBUFS      64
-#define LDLM_BUFSIZE    (8 * 1024)
-#define LDLM_MAXREQSIZE (5 * 1024)
-#define LDLM_MAXREPSIZE (1024)
+#define LDLM_BL_THREADS   LDLM_NTHRS_AUTO_INIT
+#define LDLM_CLIENT_NBUFS 1
+#define LDLM_SERVER_NBUFS 64
+#define LDLM_BUFSIZE      (8 * 1024)
+#define LDLM_MAXREQSIZE   (5 * 1024)
+#define LDLM_MAXREPSIZE   (1024)
 
  /*
   * MDS threads constants:
index 18bbd28..4a75bb0 100644 (file)
@@ -2835,7 +2835,7 @@ static int ldlm_setup(void)
                .psc_name               = "ldlm_cbd",
                .psc_watchdog_factor    = 2,
                .psc_buf                = {
-                       .bc_nbufs               = LDLM_NBUFS,
+                       .bc_nbufs               = LDLM_CLIENT_NBUFS,
                        .bc_buf_size            = LDLM_BUFSIZE,
                        .bc_req_max_size        = LDLM_MAXREQSIZE,
                        .bc_rep_max_size        = LDLM_MAXREPSIZE,
@@ -2874,7 +2874,7 @@ static int ldlm_setup(void)
                .psc_name               = "ldlm_canceld",
                .psc_watchdog_factor    = 6,
                .psc_buf                = {
-                       .bc_nbufs               = LDLM_NBUFS,
+                       .bc_nbufs               = LDLM_SERVER_NBUFS,
                        .bc_buf_size            = LDLM_BUFSIZE,
                        .bc_req_max_size        = LDLM_MAXREQSIZE,
                        .bc_rep_max_size        = LDLM_MAXREPSIZE,