in reply to Why can code be so slow?

Without using mod_perl, every request is going to spawn a new copy of the perl interpreter (in memory), then load/compile/run your scipt. You're probably just running low on memory, and forcing the machine to do lots of swapping (juggle data from memory to disk and back). So I'd suggest a) add as much ram to the server as you can afford (you can't have too much), and b) try to get mod_perl working. This will give you one instance of the perl interpreter (in memory) and precompile your script (saving may be small for just one hit but will add up if you have lots of hits at the same time).

Replies are listed 'Best First'.
Re^2: Why can code be so slow?
by freakingwildchild (Scribe) on May 01, 2007 at 19:38 UTC
    I've been checking the memory usage with TOP; but 2gigabytes seem to be ok (only 30% in use); it's more CPU dependent (100% in use with AB); I would say this application is for sure more memory than CPU optimized.