It is a well known problem of the Python GIL that multithreaded apps on multicore CPU run slower than non-threaded apps.
http://stackoverflow.com/questions/3121109/python-threading-unexpectedly-slower The solution is not to use threads but non-threaded servers, like gunicorn or nginx. That is the first test I would do isolate the problem. BTW. As I said, I cannot reproduce the problem on MacBook Air, Lion & Python 2.7.3. How many cores do you have? Usually the more cores the worst the GIL problem. Massimo On Saturday, 15 March 2014 22:52:49 UTC-5, Jonathan Lundell wrote: > > On 15 Mar 2014, at 7:45 PM, Massimo Di Pierro > <massimo....@gmail.com<javascript:>> > wrote: > > Could it be the GIIL. web2py is a multi-threaded app. Are the threads > created by the web server doing anything? > What if you use a non-threaded server like gunicorn instead? > > > I believe that Niphlod reproduced the problem with Rocket, in which case > the other threads must be waiting for IO. > > It's suggestive that he did not see the performance degradation when > Rocket was restricted to a single thread. I proposed a couple of lines of > attack in an earlier message today on this thread. (I regret that I'm > hip-deep in getting a beta release out, with no time to spend on this > interesting problem.) > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.