Hey Graham,
On Thu, Oct 30, 2008 at 8:36 PM, Graham Dumpleton <
[EMAIL PROTECTED]> wrote:
>
> How many processes in each daemon group and how many threads?
I'm using 2 processes and 15 threads in each group.
> Can you post the Apache configuration showing relationship between
> sites and daemon process groups? Can then possibly comment better.
>
I've attached a config file with one virtual host, others are essentially
identical.
> Also indicate how much traffic each site gets and whether any would
> potentially be idle for periods, as can then look at inactivity
> timeouts etc.
As embarrassing as it sounds, I don't have good numbers available yet. There
are definite idle periods on certain virtual hosts.
> The code size is generally not the issue, but runtime application
> data, so doubt that having .so in different installations would result
> in much being lost.
Good to hear, I like keeping things separate. I lied a little earlier, I do
have a shared directory that contains .so's - the per project site directory
is things I track via their source repositories (django and pretty much
anything related) and until now dont contain any .so. I'm gonna keep it as
is.
> Rather than event MPM, would suggest using nginx as a front end, with
> nginx serving requests for static files and then proxying other
> requests through to Apache/mod_wsgi. This is because nginx is arguably
> better at serving static files and maintaining many open connections
> with keep alive. The Apache/mod_wsgi instance would then only be
> handling dynamic requests and all connections would come from local
> nginx. Even if keep alive working there, depending on how optimised
> nginx is, it can possibly reuse the connections over time for requests
> from different originating clients in a more efficient way, thereby
> keeping the memory overhead in Apache which generally arises from
> maintaining open connections from lots of different clients.
I considered nginx, but I've been playing with S3 and I think I'm going to
use that as a poor mans edge system for my static content. But I'll keep
this in mind. Would using a event mpm help if I didnt have to serve static
content or need Keep-Alive?
Here's my apache/mod_wsgi setup:
ServerRoot /etc/httpd
User nobody
Group nobody
Listen 80
NameVirtualHost *
ErrorLog /data/log/httpd.error
ServerTokens Prod
HostnameLookups Off
KeepAlive Off
LoadModule mime_module modules/mod_mime.so
TypesConfig /etc/httpd/conf/mime.types
DefaultType text/plain
LoadModule deflate_module modules/mod_deflate.so
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
text/javascript application/x-javascript
LoadModule log_config_module modules/mod_log_config.so
LoadModule alias_module modules/mod_alias.so
LoadModule wsgi_module modules/mod_wsgi.so
WSGIPythonOptimize 1
WSGIPassAuthorization On
<IfModule mpm_prefork_module>
StartServers 30
MinSpareServers 30
MaxClients 30
</IfModule>
<VirtualHost *>
ServerName daaku.org
WSGIDaemonProcess daaku user=daaku group=daaku processes=2 threads=15
display-name=daaku python-path=/data/lib:/data/daaku/lib
WSGIProcessGroup daaku
WSGIScriptAlias / /data/daaku/apache/daaku_wsgi.py
Alias /media/ /data/daaku/media/
<Directory /data/daaku/media/>
SetHandler None
Options FollowSymLinks
</Directory>
</VirtualHost>
[I have 3 virtual hosts with identical config, and plan to add another
soon.]
Thanks for the input.
-Naitik
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---