Whamcloud - gitweb
b=23289 don't start more than minimum MDT threads
authorAndreas Dilger <andreas.dilger@oracle.com>
Tue, 14 Dec 2010 07:33:11 +0000 (00:33 -0700)
committerVitaly Fertman <vitaly.fertman@oracle.com>
Fri, 17 Dec 2010 01:22:03 +0000 (04:22 +0300)
Because there are many different portals running on the MDS node (MDT,
readpage, setattr, SEQ, SEQ server, FLD, DLM), starting more than the
minimum number of threads can result in thousands of threads running
on large MDS nodes, even if many of those threads are not needed.

Start only the minimum number of threads at mount time, and start more
as required by the load.

i=liang
i=vitaly

lustre/include/lustre_net.h
lustre/mdt/mdt_handler.c

index 2c6ba51..d6634c7 100644 (file)
 
 #define MDT_MIN_THREADS 2UL
 #define MDT_MAX_THREADS 512UL
-#define MDT_NUM_THREADS max(min_t(unsigned long, MDT_MAX_THREADS, \
-                                  cfs_num_physpages >> (25 - CFS_PAGE_SHIFT)), \
-                                  2UL)
 
 /** Absolute limits */
 #define MDS_THREADS_MIN 2
index 7300d48..9ec7267 100644 (file)
@@ -5776,8 +5776,6 @@ static int __init mdt_mod_init(void)
         } else {
                 mdt_max_threads = MDT_MAX_THREADS;
                 mdt_min_threads = MDT_MIN_THREADS;
-                if (mdt_min_threads < MDT_NUM_THREADS)
-                        mdt_min_threads = MDT_NUM_THREADS;
         }
 
         lprocfs_mdt_init_vars(&lvars);