This is a discussion on Re: general performance issues - modperl ; André Warnier wrote: > If it's too off-topic nevertheless, just send me packing, I won't insist. I might be alone in this but I think apache memory use is something all heavy mod_perl users have to get to grips with, ...
André Warnier wrote:
> If it's too off-topic nevertheless, just send me packing, I won't insist.
I might be alone in this but I think apache memory use is something all
heavy mod_perl users have to get to grips with, so I mentally
s/java|tomcat/mod_perl/g'd and read your very long email....
> But sometimes it doesn't, and becomes rather slow for a while.
Find out if it's *actual* slowness or just HTTP requests being queued up
because none of the apache children are free to service the request.
> anything that we would do to improve its generic performance would be
> all the more effective if applied to the production servers, right ?
> or wrong ? in a generic way I mean.
I agree but with one caveat - memory is very cheap at the moment.
Strike a good balance between spending hours trimming the memory
footprint of your app and buying more RAM.
> The first thing that strikes me, is the huge memory allocated to
> Tomcat and the other Java processes. I wonder if this unavoidable, or
> if it is just misconfiguration on my part.
> The "huge Tomcat application" is unfortunately one that we just buy,
> we can't peek in the code to see what's going on there. We just know
> it is (also) processing some large quantity of XML data, mostly when
> it starts up. That almost paralyses our server for 10 minutes or so
> when we restart Tomcat.
Tongue in cheek, thats what you get for not rewriting it in perl
Seriously though, in your own apps make sure you're not loading large
XML files fully into RAM before parsing them. Use a SAX or similar
parser to treat large XML files like a stream.
> The other question is, does the memory shown as used by the Apache
> processes seem normal/abnormal to anyone ? This being a prefork
> Apache, if it seems abnormal, what kind of thing should I look at ?
> Or is it so normal that I should not even spend time on it ?
Those are very lean looking apache's by my own experience, I don't think
you'll do much better.
hope that's useful,