Hi there,

On Thu, 3 Jul 2003, ColinB wrote:

> What is the preferred method of compiling mod_perl - static or dynamic?

Static.  (But that's just my opinion after years of experience and
watching people running into trouble with DSO mod_perl on this List. :)

> I have read that *static* linking is likely to load and execute faster,
> but may be wasteful of resources if there are multiple proceses each
> with its own copy of the common code.

In normal circumstances the speed of loading is unlikely to be an issue.
If you're using mod_perl 1.x on Linux/Unix/whatever then unless you're
using 'httpd -X' or a very strange configuration there will be multiple
processes.  A recent post by Randal seemed to indicate the memory saved
by using a DSO mod_perl wasn't as large as one might think - check the
archives.

> It therefore seems likely that a statically compiled mod_perl would be
> faster, provided that a large number of httpd's are not being run at
> the same time.
> 
> Is this correct?

There are many factors to consider, but the speed difference between
static and DSO isn't often talked about here so you can draw your own
conclusions.  Check out the tuning section of the Guide, the archives.

> It seems that at present it is not possible to build mod_perl 2.0
> statically. It can only be built dynamically and loaded using
> LoadModule in httpd.conf. This seems strange if the preferred method of
> building is static.

True.  That's because it's still in development.  Check the archives...

73,
Ged.

Reply via email to