mod_perl

Purdy on 2002-02-12T19:50:40

Well, I'm afraid I've come to the conclusion that mod_perl is not for me, for two major reasons:

  1. Memory Hog: I'm running a small Cobalt server with an upgraded 256Mb of RAM (wheee! ;)), but with 15 virtual hosts. So I need a lot of httpd processes going, which currently run at 10Mb each. I installed Slash to test it out for one of my virtual hosts and it boosted the process to 17Mb. So while I have that glass ceiling in place, I'm limiting new development to CGI and PHP (until I can wrestle Mason into place - don't get me started on that ;)).
  2.  

  3. Global Variables: Ok, I don't understand it enough, that's the problem. I mean, I could go full-out and put variables into a DB or grok/use IPC, but it just doesn't seem necessary for these lil' utility programs I write for management. But I write an admin program that interfaces with a database table ... when the management makes changes, it affects the table. But they could connect to a separate httpd child process and see the program in a separate state. So I had to add these ugly 'Reload values from database' buttons everywhere.
Of course, I'd love to hear your thoughts on this.

Jason


Memory, etc.

lachoy on 2002-02-12T20:17:53

I'm assuming that you read over The Guide wrt programming and memory issues. That said: I've found that running the dual-server setup cuts down memory usage dramatically. This entails multiple lightweight front-ends running mod_proxy and mod_rewrite (plus PHP and whatever else) sending the "interesting" requests back to the heavyweight-but-fewer mod_perl servers. It is easy to setup -- in fact I include the build instructions + config with OpenInteract -- and has a huge payoff. Particularly with boxes that have multiple vhosts, only one or two of which need mod_perl functionality. Having twenty front-end servers and four or five mod_perl servers is not uncommon, and easily doable under 256MB.

Re:Memory, etc.

Purdy on 2002-02-12T21:05:53

ARGH - too ... much ... information! I actually hadn't read the memory issues in The Guide, but now that you point it out, I see I have a lot more homework to do before I write off mod_perl completely.

Man, I have a lot to learn!

Jason