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 a new request. Since only one handler will receive the request, the others will have been awakened for no reason, 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. However a work has been started to remove this issue.

Thundering herd problem

From Wikipedia, the free encyclopedia
 

The thundering herd problem occurs when a large number of processes waiting for an event are awoken when that event occurs, but only one process is able to proceed at a time. After the processes wake up, they all demand the resource and a decision must be made as to which process can continue. After the decision is made, the remaining processes are put back to sleep, only to all wake up again to request access to the resource.

This occurs repeatedly, until there are no more processes to be woken up. Because all the processes use system resources upon waking, it is more efficient if only one process was woken up at a time.

This may render the computer unusable, but it can also be used as a technique if there is no other way to decide which process should continue (for example when programming with semaphores).

Gunicorn 问题的更多相关文章

  1. python Gunicorn

    1. 简介 Gunicorn(Green Unicorn)是给Unix用的WSGI HTTP 服务器,它与不同的web框架是非常兼容的.易安装.轻.速度快. 2. 示例代码1 def app(envi ...

  2. Debian7下lnmp+gunicorn部署Django运行环境

    首先安装lnmp,安装方法见lnmp.org wget -c http://soft.vpser.net/lnmp/lnmp1.3-full.tar.gz && tar zxf lnm ...

  3. apache(nginx)+django+virutalenv(virtualenvwrapper)+gunicorn+supervisor配置高效web环境

    前言 django的调试模式配置简单,用于测试十分方便,但众所周知,这个只适合于调试,生产上运行效率十分低下. 后来考虑用nginx+uwsgi的模式进行,但之前配置过apache+wsgi的方式,感 ...

  4. Gunicorn 和 Nginx

    Web Application Deployment Using Nginx Nginx is a very high performant web server / (reverse)-proxy. ...

  5. Gunicorn 文档翻译

    服务器模式 Gunicorn 基于 pre-fork 模式,这意味着有一个主进程管理工作的子进程.主进程对客户端的工作业务有了解.所有的请求和响应都是工作子进程处理. 主进程 主进程是一个简单的循环, ...

  6. nginx+gunicorn+supervisor+flask @ centos

    /etc/nginx/conf.d/default.conf server { listen 80 default_server; server_name 127.0.0.1; #charset ko ...

  7. Gunicorn + Django 部署

    1. 下载gunicorn pip install gunicorn 2. 运行 gunicorn AutoSa.wsgi:application ## AutoSa为我project的名字,后面的不 ...

  8. Flask + Gunicorn + Nginx 部署

    最近很多朋友都在问我关于 Flask 部署的问题,说实在的我很乐意看到和回答这样的问题,至少证明了越来越多人开始用 Flask 了. 之前我曾发表过一篇在 Ubuntu 上用 uwsgi + ngin ...

  9. virtualenv 环境下 Nginx + Flask + Gunicorn+ Supervisor 搭建 Python Web

    在这篇文章里,我们将搭建一个简单的 Web 应用,在虚拟环境中基于 Flask 框架,用 Gunicorn 做 wsgi 容器,用 Supervisor 管理进程,然后使用 Python 探针来监测应 ...

随机推荐

  1. w3m常用快捷键

    H    显示帮助 q    退出,会有提示的 j,k,l,h  移动光标 J/K   向下/向上滚屏 T     打开一个新标签页 Esc-t 打开所有标签页,供你选择,使用jk来上下移动 U    ...

  2. JavaScript Ajax之美~

    JavaScript Ajax之美~ 曾经有一段时期,因为开发人员对JavaScript的滥用导致其遭受了一段时间的冷门时期,不被大家看好,后来,到了2005年,Google公司的很多技术都是用了aj ...

  3. JavaWeb---总结(九)通过Servlet生成验证码图片

    一.BufferedImage类介绍 生成验证码图片主要用到了一个BufferedImage类,如下: 创建一个DrawImage Servlet,用来生成验证码图片  1 package gacl. ...

  4. MyEclipse取消自动跳到Console窗口

    在Myeclipse中当全屏查看其它文件时,如果控制台有东西输出,就会弹出控制台窗口,如何取消? 方法1: -->右键在console窗口中点Preferences, -->将Show w ...

  5. WinForm------GridControl的部分属性介绍

    参考其它链接: http://www.cnblogs.com/djian/archive/2010/11/19/1881579.html //注意:在定义GridControl里面的FileName里 ...

  6. split shell tools

    split [-bl] file [prefix] 参数说明: -b, --bytes=SIZE:对file进行切分,每个小文件大小为SIZE.可以指定单位b,k,m. -l, --lines=NUM ...

  7. CV界的明星人物们

    CV界的明星人物们 来自:http://blog.csdn.net/necrazy/article/details/9380151,另外根据自己关注的地方,加了点东西. 今天在cvchina论坛上看到 ...

  8. HTML5基本布局

    HTML4布局 HTML5布局 基本的HTML5文档的模式为: <!DOCTYPE html> <html lang = "en"> <head> ...

  9. App Store

    App store最新审核标准(2015.3)公布 http://www.cnii.com.cn/mobileinternet/2015-03/24/content_1550301.htm iOS提交 ...

  10. JQUERY 滚动 scroll事件老忘记 标记下

    制作笔记 这个scroll事件 老忘记.... 写的太垃圾了  希望有路过的大神指点的吧~ 这个貌似应该写个函数里 调用好些的吧~  写个类这样的 也方便扩展貌似  不过就是想想  ~ $(windo ...