Just like to share some findings I've had over the past week with a
django site that does a reasonable amount of traffic, up to 15k pages
per hour. I thought I'd try switching to apache 2.2 worker with
modwsgi in embedded mode for the lot, both django and media. If we can
thread it these days, why not let it serve media with keep alives and
all. Under this configuration, I suspect the extra of apache vs
lighty, nginx etc for serving media would be negligible. Previously,
we used to run lighttpd for media with 2.0 prefork modpython for
django.
Anyway, when we first went live with modwsgi, the server kept buckling
under load.
Turned out to be ThreadStackSize. I reckon that could be spelt out a
little louder in the docs (which are otherwise fantastic, btw). We're
on debian lenny. So here it is --
ThreadStackSize 524288
For now I seem to have settled on this --
StartServers 4
MaxClients 256
MinSpareThreads 256
MaxSpareThreads 256
ThreadsPerChild 64
MaxRequestsPerChild 10000
ThreadStackSize 524288
That's with embedded mod wsgi under worker mpm. Keepalive timeout 5
seconds, which seems long enough to me.
I've compared this against various combinations of running daemonised,
prefork/processes vs theads etc but this seems to provide both lower
cpu and higher throughput.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"modwsgi" 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/modwsgi?hl=en
-~----------~----~----~----~------~----~------~--~---