Friday, July 29, 2016

TIP: running 2N+1 Gunicorn workers

If you read, people tend to say that for web services, run 2N+1 workers, where N is the number of CPUs.

It turns out the Intarwebs are wrong about exactly how to do this. Here's my solution based on "epicbrew"'s work on Stack Overflow:

gunicorn --workers=$((2 * $(getconf _NPROCESSORS_ONLN) + 1)) wsgi:application
The cool thing is that it works on both macOS and Linux!

1 comment:

  1. iDealshare VideoGo is just the right AVI to Roku Converter which has both Mac and Windows version! It helps to convert various AVI files whatever encoded with DivX, Xvid, etc to Roku more supported MP4 or MKV. https://www.idealshare.net/video-converter/roku-avi.html

    ReplyDelete