Re: [Exim] Imbedded perl and dynamic loading

Pàgina inicial
Delete this message
Reply to this message
Autor: Hilko Bengen
Data:  
A: exim-users
Assumpte: Re: [Exim] Imbedded perl and dynamic loading
Dean Brooks <dean@???> writes:

> I noticed that when I compiled Exim (under Solaris7/Sparc/GCC) with
> the perl.o linked in, the actual executable binary size is almost a
> full meg instead of 500K as it was without perl.o compiled in.


Right, this is about the same I got here with a custom-built
Debian/x86 package.

> Since the perl.o appears to be statically linked, is it really true
> that "none of the perl library will be paged in unless used"?


That depends on the paging algoithms Solaris uses. I'm quite confident
that most of it will not get paged in until it is actually used.

> If so, is this an operating system issue, a compiler issue or an
> Exim issue?


Operating system. If you didn't have virtual memory, the code would
actually have to be loaded into core.

> That is, will it really require a full megabyte of data be read in
> from disk upon each exec of exim or is the file size misleading?


Have a look at the RSS in the process table.

> We run a heavy load, and only need the imbedded perl on a couple of
> obscure routers that wont be used much, so I dont want to consume
> any more resources than absolutely necessary.


Don't worry too much. Since you will have Exim running as a daemon
anyway, a large chunk of the binary will sit in RAM all the time, so
paging shouldn't affect your load. Unless you have too little RAM,
that is.

Whenever a child process notices that it needs to run Perl code, there
will be quite a bit of extra load, since the Perl interpreter has to
be initialized and the Perl code compiled by it. But if those routers
are only an 'obscure' case, as you say, this shouldn't hurt too much.

-Hilko

--
">Spelling flames on Usenet are sooooooo tasteless."
                                ********
That's spelled "so"."
-- Mitchell Coffey in talk.origins & sci.physics