Quote:
Originally Posted by cd34
lighttpd is bound by core due to their spinlocks. Their core is not properly threaded and they hacked together a solution that works most of the time. When it was written, we didn't have that many SMP or Hyperthreaded machines. They also don't use some of the hooks in the kernel that other solutions use. With cpu affinity and pinning interfaces, you can work around that, or, you can use nginx without all that mess. But, nginx isn't without its quirks either.
|
Yeah, although if you run OpenSolaris you can sort of kludge your way around it by setting up zones, and there's some trickery where you can lock a zone into a core - at which point you're running 2 or 4 lighty instances. Not my bag of fun really
Quote:
I've heard, mpm-worker and mod_perl don't get along but I've not done enough mod_perl to really run into it. I really don't understand why perl would have a problem with mpm-worker since worker only uses pthreads and perl has been threadsafe for years. It is possible that cpan modules are not threadsafe which would cause problems.
|
Bingo. A lot of the CPAN modules that are used with mod_perl based apps aren't thread safe, or even if they claim to be thread safe, they might not be thread safe in a persistent environment. mod_perl has it's own baggage, combined with threading turns it into a very tasty mess of potential pitfalls
Quote:
There are a bunch of potential solutions and its a matter of finding the right tool for the job. Apache isn't all things to all people -- it is about the most flexible, most generic solution and properly tuned will give the performance that 90% of the people out there will be happy with. mpm-prefork doesn't fall too far behind mpm-worker in most situations. Measure the tradeoffs, make the decision as to which way to head.
The task dictates the solution -- or something like that.
|
Good point -- for really high performance setups the favorite of mine is to have nginx front things and serve static content, with 1 apache instance being proxied by nginx that has mpm-prefork going for mod_perl, and 1 apache instance with mpm-worker for php and any other jazz that isn't perl.
My regular setup is lighty -> fastcgi which does sort of alleviate the core bound problem since lighty just sits there forwarding things and all the heavy lifting comes off the fastcgi instances