httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <b...@wstoddard.com>
Subject [PATCH] Possible fix for worker MPM performance problem
Date Thu, 25 Apr 2002 15:30:54 GMT
Would someone care to see if this fixes the worker MPM performance problem reported
earlier on the list (request-per-second dropping when clients exceeded threadsperchild)?
This patch defers starting the listener untill -all- the workers have started.

Bill

Index: worker.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/mpm/worker/worker.c,v
retrieving revision 1.117
diff -u -r1.117 worker.c
--- worker.c 18 Apr 2002 17:46:20 -0000 1.117
+++ worker.c 25 Apr 2002 15:24:51 -0000
@@ -999,16 +999,15 @@
                 clean_child_exit(APEXIT_CHILDFATAL);
             }
             threads_created++;
-            if (threads_created == 1) {
-                /* now that we have a worker thread, it makes sense to create
-                 * a listener thread (we don't want a listener without a worker!)
-                 */
-                create_listener_thread(ts);
-            }
+
         }
         if (start_thread_may_exit || threads_created == ap_threads_per_child) {
             break;
         }
+
+        /* All the workers have started. Now start the listener thread */
+        create_listener_thread(ts);
+
         /* wait for previous generation to clean up an entry */
         apr_sleep(1 * APR_USEC_PER_SEC);
         ++loops;



Mime
View raw message