From f961ae9bf148d8df817c7292e80cd9de4af5bffb Mon Sep 17 00:00:00 2001 From: Dmitry Eremin Date: Thu, 14 Mar 2013 21:28:50 +0400 Subject: [PATCH] LU-2424 ptlrpc: reduce initial buffers count 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 Change-Id: I56fcbe6c45c61ba4876bce5482169ea06a03638c Reviewed-on: http://review.whamcloud.com/5719 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- lustre/include/lustre_net.h | 13 +++++++------ lustre/ldlm/ldlm_lockd.c | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lustre/include/lustre_net.h b/lustre/include/lustre_net.h index a606ff2..c500fb9 100644 --- a/lustre/include/lustre_net.h +++ b/lustre/include/lustre_net.h @@ -259,7 +259,7 @@ * 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 @@ -267,11 +267,12 @@ #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: diff --git a/lustre/ldlm/ldlm_lockd.c b/lustre/ldlm/ldlm_lockd.c index 18bbd28..4a75bb0 100644 --- a/lustre/ldlm/ldlm_lockd.c +++ b/lustre/ldlm/ldlm_lockd.c @@ -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, -- 1.8.3.1