Python multithreaded programs (all of them, including rocket and mod_wsgi) decrease performance the more CPUs you have. This is because of the GIL. It is a well known problem and, in view, the biggest problem with Python. In the case of apache, to improve things, you have to configure apache to run one child per cpu.
On Dec 11, 8:04 am, rif <[email protected]> wrote: > And now the weirdest thing: > > Enabling two CPUs on the virtual machine gave me the following weird > results: > > nginx: 31.92 [#/sec] > apache: 10.63 [#/sec] > rocket: 10.36 [#/sec] > > So 1000 request with a concurrency of 20 on 2 CPUs actually slows down > apache and rocket. I thought that apache and rocket hit the memory limit so > I raised the memory to 1024 but the results remained the same. > > Is this even possible? I can understand that the performance could stay the > same with 2CPUs (the servers are not using the second one) but to actually > drop the performance is not very intuitive. > > I guess the default configuration of apache and rocket should be improved > since most of the servers have more than 1 CPU. Or maybe I just my > environment.

