On 26/02/2014, at 12:00 AM, virgil.balibanu <[email protected]> wrote:
> Can anyone give me some recommendations for optimal performance for a > mod_wsgi in daemon mode configuration depending on the server's number of > processor (cores) and memory. > For example if my app runs python+django and a few other smaller libraries > and I compute I need about 100 MB per process I could define the number of > processes to be up to 3 GB of RAM in my server has 4 GB RAM. Is that right? > And the number of threads per process? Does the number of processors > influence this configuration in any way, like more threads per process? > > Let's say my server has 4GB of RAM and 6 processors (single core each, > running at 3.3GHz) and my web app should be able to process as many requests > as needed the fastest way possible. I first used embedded mode and the server > would ran out of RAM (the test would simulate 100 users simultaneously on the > website). I tried this first with 2GB RAM and 1 processor, then increased to > 4GB and 2 processors and it would still try to eat all the RAM and then go > into the swap, a bit after that the tests would report the server dead :) > I changes this to daemon mode with 8 processes and 15 threads each and 4GB > RAM and 6 processors, but then entire server used barely more than 1GB of > RAM, so 4 GB would be too much. > So would there be some recommended guidelines for the setup of mod_wsgi > depending on the server configuration? What of the following have you watched/read? Web Server Bottlenecks And Performance Tuning Making Apache suck less for hosting Python web applications. http://blog.dscpl.com.au/2014/02/vertically-partitioning-python-web.html With any tuning, it is is hard to give much advice with very little knowledge of the application. The best one can do is look at your current Apache MPM and mod_wsgi configuration and say whether you are doing anything particularly bad. Further optimising it then needs in depth information about the run time performance of your application with actual real user traffic. You thus need some sort of monitoring system in place to track what is going on. Graham -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/modwsgi. For more options, visit https://groups.google.com/groups/opt_out.
