in reply to Can I compute memory taken by a perl script?

You may also want to read a little about how mod_perl uses memory. In short, on a loaded web server (i.e. the script is executed simultaneously by all children/threads) the script is likely to use the same amount of memory but without mod_perl it will be read into memory, parsed and executed once for each request.

The only difference is, mod_perl executes the same copy of the parsed script in memory in order to gain a significant performance increase.

For scripts that only run occasionally or where performance isn't a factor, mod_perl is (probably) a waste of memory.

The real benefit from mod_perl comes when running several scripts that all use the same modules. In this case you can pre-load those modules once and share them between the different scripts.

-- Time flies when you don't know what you're doing
  • Comment on Re: Can I compute memory taken by a perl script?