I have a very simple Bottle app which has just one function. It is mainly I/O bound, however some processing takes place. My app instances don't have to communicate with each other.
I run it on a 8-core machine and want to optimize TPS.
If I follow the Bottle with Paste example. only 1 CPU will be used.
bottle.run(server='paste')
If I use Gunicorn with 8 processes, I won't have the advantage of threads.
bottle.run(server='gunicorn', workers=8)
In https://stackoverflow.com/a/20985164/604515 it is suggested to use Tornado with the start
option. However, I cannot get Tornado to fork when I launch it like this, as a ps uxaf
will only show one process.
bottle.run(server='tornado', start=8)
So, how do I configure Bottle for maximum TPS on a SMP machine?