Earlier quoted context omitted.
> Most people who complain about the GIL have not even profiled multithreading versus multiprocessing. This is a fair point, but the issue might be about memory usage, not speed. A unicorn setup might have two to eight worker processes to service HTTP requests. Even with copy-on-write-friendly garbage collection, the memory usage of each additional process is significant. On the other hand, a thread-based solution (u…
Why would you need hundreds of worker threads? If you're using an event-loop in each process (which you probably want if only to minimize context-switching overhead, and is how Unicorn does it), then you need only one process per physical core in the machine. Anything else will just sit in the runqueue and cause context switches. There is definitely annoying memory overhead with multiprocess (vs. multithreaded) archi…
Unicorn is a pre-forking multiprocess server so I don't know why it would be using an event loop.
Why threads over processes? Because memory isn't cheap when you don't own it yourself.