Re: Performance problems with mod_WebObjects.so, FastCGI
"Pierce T.Wetter III" <[email protected]> Thu, 15 Jul 2004 09:40:11 -0700
| Newsgroups | gmane.comp.web.webobjects.admin |
|---|---|
| Message-ID | <[email protected]> |
On Jul 14, 2004, at 7:14 AM, Jürgen Lorenz Simon wrote:
> Hi,
>
> I have a problem with performance of WebObjects Adaptors on SuSe Linux
> 9.1
> using Apache2 and WebObjects 5.2.3.
>
> I compiled and used the mod_WebObjects.so and it takes twice the time
> of the
> normal CGI-BIN adaptor. Using the FastCGI adaptor results in a
> slightly higher
> time than the CGI-BIN adaptor.
>
> So it seems the CGI-BIN adaptor performs best of the three and that
> seems very
> odd to me since that is not very fast to start with.
>
> Has anyone made similar experiences?
> Any known pitfalls I may have overlooked?
> Configuration problems to observe when using either of the two?
Yeah lots.
Ok, so first off, you're using Apache 2. So which MPM module you use
makes a bit of difference, and then how Apache is configured after that
makes some difference. After that, getting your config file correct for
the adaptor correct is important, unless you're using Monitor which
writes them for you, but has other issues.
I haven't dived into the FastCGI adaptor, but here's an overview of
why the normal cgi-bin should be slower.
1. Using the regular cgi should require launching of separate
process for each
request. I think the regular cgi might use shared memory now, so it
can
round robin, but it didn't used to be able to. Though what happens
to
that shared memory when no cgi processes are running? Hmmm...
2. Using mod_WebObjects.so shouldn't require launching processes,
but should
otherwise be running the same code as the cgi. Its possible that
you're using
the 1.x adaptor with Apache 2, which perhaps requires some sort of
adaptor
layer inside WebObjects if that's even possible.
If you're seeing the cgi adaptor faster, then you have something weird
going on.
Possibilities:
1. The CGI adaptor isn't working as hard as the regular adaptor.
It might
just be picking the first instance in the list (which happens to
be running)
and quitting. The module might be looking at all the instances
that are
supposed to be running, doing a round robin to one of them (which
happens to
not be running), then failing over.
2. As I said, perhaps you're using a 1.x adaptor with 2.x. The
Project
Wonder adaptor was just a quick port of 1.x to 2.x last time I
looked,
its possible they missed something subtle. I know they didn't do
anything
with regards to the multiple MPM models in Apache, which is
disappointing.
3. Perhaps there's something weird on SuSe where loading a shared
library
takes longer then launching a process. That shouldn't matter,
because
your MPM for apache should be setup so that it should only have
to do
that when it launches a fresh apache instance, but the setup for
apache out of the box isn't that good.
4. There's something wrong with how you're doing the benchmark.
What are
you using?
So there's lots of stuff to look at there, but I'm not sure anyone can
be much help with the information you've provided so far.
Remove WebObjects from the equation and try benchmarking the sample
CGIs that come with apache against the fast-cgi versions. If fast CGI
isn't faster, you've got something else wrong.
Pierce