If the load is high under mod_cgi, and memory intensive under mod_perl, you might be able to get more towards the middle of the ground by reducing the number of servers forked. (I know this is counterintuitive -- but by reducing the total number of child processes, you can reduce the amount of memory used. If you can keep the memory from getting to the point where you're paging, you might be able to actually improve the overall performance.)
Another option is to try to find which process is the memory hog. Because of the way that Perl doesn't give memory back to the OS, once it's needed by the server, it'll never get cleaned up. Because of what you said about the performance under mod_cgi, I would assume it's not a process that people call all that often. (well, that often as a percentage of the total hits). If you can figure out which script it is, you can either refactor it so it's less memory intensive, or move it so it's being run under mod_cgi.
And well, the option to throw memory at the problem isn't all that bad. It'll fix the symptoms, even if it doesn't fix the underlying problem. Memory can go for about $100-150/GB these days, depending on the exact speed/type -- It might take you a day or more to track down the problem and refactor it, which would cost the company more than the cost of the memory. However, it's only in the short term. If you can 'fix' the problem, and get the server so it's running at 25% of its capacity, you've just increased the value of the time to 75% of the value of the server. (and of course, there's the issue with potential lost business or lost value of brand reputation if the problem drags on for too long)
I personally would probably get the memory, but try to track down the problem so I know what was causing the problem, and trying to keep it from happening again in the future. I don't know what your budget looks like, or what the political situation is in your company, so this might not be the best option in your situation.
Unfortunately, server tuning has a whole lot of variables involved, so it's possible that there might be any number of things that you can do to improve your performance. (I don't even know if you're making calls to other systems, or databases, or if there are other competing processes running)
In reply to Re: CgiProxy And Heavy Visitors
by jhourcle
in thread CgiProxy And Heavy Visitors
by artin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |