I'm using it in Daemon mode:

WSGIDaemonProcess wsgi processes=40 threads=1 display-name=%{GROUP} \
  python-home=/opt/python/run/venv/ \
  python-path=/opt/python/current/app:/opt/python/run/
venv/lib64/python2.7/site-packages:/opt/python/run/venv/lib/python2.7/site-packages
user=wsgi group=wsgi \
  home=/opt/python/current/app
WSGIProcessGroup wsgi


and apache is with prefork:

httpd -V
[Wed May 16 18:32:37.005738 2018] [so:warn] [pid 19518] AH01574: module
wsgi_module is already loaded, skipping
Server version: Apache/2.4.33 (Amazon)
Server built:   May  1 2018 22:12:46
Server's Module Magic Number: 20120211:76
Server loaded:  APR 1.5.2, APR-UTIL 1.5.4
Compiled using: APR 1.5.2, APR-UTIL 1.5.4
Architecture:   64-bit
Server MPM:     prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=256
 -D HTTPD_ROOT="/etc/httpd"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_PIDLOG="/var/run/httpd/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

I changed the module for the most recent release and for my first
configuration (10process and 40 threads) It haven't changed much.

But after reviewing your post
http://blog.dscpl.com.au/2012/10/why-are-you-using-embedded-mode-of.html I
tested with 40 process and 1 thread and the average request response time
have drop by at least 50%.

I will repeat the tests with the old module to ensure that it was this
upgrade that reduced the average response time.

Thanks again.

2018-05-15 20:14 GMT-03:00 Leonardo L. P. da Mata <[email protected]>:

>
> 2018-05-15 20:12 GMT-03:00 Joshua Kramer <[email protected]>:
>
>> Are you running the database on the same host as your app?  Are you doing
>> a lot of joins or other complex data manipulation?  If both of these are
>> yes, you may want to consider switching to a more robust database platform.
>>
>> No, not at all, I use RDS for the database. The instances that runs the
> python app are exclusive for it.
>
>
>
>
>> On Tue, May 15, 2018, 1:41 PM Leonardo Mata <[email protected]> wrote:
>>
>>> Hello there, I'm currently facing an issue on tuning my application o
>>> Amazon AWS EC2 instance.
>>>
>>> My currently configuration is a C5.xlarge instance with python 2.7
>>> running on default amazon imaga. It uses apache httpd24-2.4.33-2.78 and
>>> mod24_wsgi-python27-3.5-1.25.amzn1.x86_64. This instance has 8GB Ram
>>> and 4 vCPUs.
>>>
>>> My application is a Flask  with sqlalchemy to connect into a mysql db.
>>>
>>> I'm running a load-test with my own application with the most common
>>> routes weighted by usage. So it is most like a real usage of this
>>> application.
>>>
>>> The configuration for wsgi has 10 processes and 40 threads, but no
>>> matter how I change the configuration, the maximum req/s I can reach with a
>>> decent response time is around 80req/s. More than that causes cpu burn at
>>> 100%.
>>>
>>> Do you think it is possible to get better usage of CPU changing the
>>> number of process and threads or am I into a bottleneck of performance
>>> because of this cpu intensive behavior of my application?
>>>
>>> Thanks for the answer.
>>>
>>> --
>>> 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 https://groups.google.com/group/modwsgi.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> 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 https://groups.google.com/group/modwsgi.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Leonardo Luiz Padovani da Mata
> [email protected]
>
> "May the force be with you, always"
> "Nerd Pride... eu tenho. Voce tem?"
>



-- 
Leonardo Luiz Padovani da Mata
[email protected]

"May the force be with you, always"
"Nerd Pride... eu tenho. Voce tem?"

-- 
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 https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to