MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: mod_perl



Jay Austad
> 
> ******    message to minivend-users from Jay Austad <austad@fallon.com>     ******
> 
> I'm sure this has been mentioned before, but is there any way to make minivend use the apache mod_perl instead of spawning perl each time?
> 
> I've got a dual P233 with 128MB ram, and if I run the apache
>benchmark program against minivend with 150 requests, 30 concurrent,
>it takes an average time of around 31 seconds to return each page.  I

I don't know if I can help here, I'm just curious.

Do you know if its a MV problem for sure?  What kernel, libc and
apache version are you running?  Kernels below 2.2.7 (I think) had
horrible problems with kernel threads and Apache.  Above about 40
concurrent servers the performance of multiprocessor boxes crashed
below single cpu boxes.  How many servers do you end up with and do
you get the same bad performance if you stress non-MiniVend cgi to the
same level?  If you have the mod_info installed, checkout the
server-status page and see how many servers you have running, how many
are idle, etc.

128 M is a lot of memory, but are you swapping anyway?  If you are
swapping, you're hosed.  As I understand it, MV forks copies to handle
new requests.  Each MV is probably around 10 megs, so 30 copies is 300
Megs.  Is your perl linked staic or shared?  A stripped libperl.so
might take some of the bulk out of MV.

I don't know what modperl would do for MV.  Apache has to fork to
accept new connections too and, with mod perl, each fork will contain
a perl interpreter.  Apache+modperl is pretty big to begin with all by
itself.  Add MV and you'll just run out of resources that much faster.
What is nice about modperl is that Apache keeps a pool of idle servers
hanging around so you don't always need to fork to accept a new
connection.  But it doesn't sound like too few idle servers is your
problem.  If its taking 30 seconds to return a page, the few
milliseconds to spawn a new server are a tiny fraction of the Big
Sleep: 30 seconds - 0.05 seconds is approx = 30 seconds.  (a simple
fork on my P120 with a load of 1.5 takes between 5 and 100 ms, ave =
30 ms).

One thing you can do is make a modperl (or a module in something
besides perl) plugin to takeover the cgi front end to MV (vlink or
tlink).  I've done that and it saves the small startup time (if you
have idle servers) and works OK.  But I doubt it will cure your
problem.

...
>
> Jay
> -


-- 
 John Edstrom 



Search for: Match: Format: Sort by: