From 18355eff3061bf11b8d8a735a16ecb28551d45d6 Mon Sep 17 00:00:00 2001 From: Randall Leeds Date: Fri, 13 Jun 2014 18:22:20 -0700 Subject: [PATCH] Add thundering herd question to FAQ Close #784 --- docs/source/faq.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/source/faq.rst b/docs/source/faq.rst index 6bf842c8..240ff5e1 100644 --- a/docs/source/faq.rst +++ b/docs/source/faq.rst @@ -82,6 +82,16 @@ To decrease the worker count by one:: $ kill -TTOU $masterpid +Does Gunicorn suffer from the thundering herd problem? +------------------------------------------------------ + +The thundering herd problem occurs when many sleeping request handlers, which +may be either threads or processes, wake up at the same time to handle an new +request. Since only one handler will receive the request, the others will have +been awakened for no reaon, wasting CPU cycles. At this time, Gunicorn does not +implement any IPC solution for coordinating between worker processes. You may +experience high load due to this problem when using many workers or threads. + .. _worker_class: configure.html#worker-class .. _`number of workers`: design.html#how-many-workers