On 21 Sep 2015, at 17:04, Amit Gupta wrote:

Hi, I'm using Centos7.1 and mimedefang 2.75 (still need to upgrade to
latest). The documentation indicates that if you start mimedefang with
the -E parameter, it uses embedded perl which is supposedly faster.  I
was wondering if someone could give me insight into why it's actually
faster under the hood?

Because the multiplexor only loads a single Perl interpreter, mimedefang.pl, and mimedefang-filter once at launch (and whenever it gets a 'reread' command) and forks off slaves using the embedded interpreter and pre-loaded scripts as needed, rather than launching new independent slave processes that have to load the interpreter and load the scripts themselves.

And maybe any anecdotal or real statistics on
how much faster.

Oh, you want real data... Picky picky!

I can't say how much faster it is in any real world sense, as it was dysfunctional a decade ago on the platforms I tried it on then and I haven't bothered with it since. In principle it isn't going to do much for you if you don't use a lot of slaves and/or don't recycle them often.(The specific definitions of "a lot" and "often" are left as an exercise for you to determine...) As MD & Perl have matured and systems have gotten much bigger and much faster it has become less of a burden to just fork and exec fully independent slaves and let them live a very long time, so it is somewhat questionable whether embedding Perl is valuable to very many users. At a scale of hundreds of messages per minute on a single slow CPU it could be indispensable, but few systems have that sort of challenge.

Also, should embedded perl be enabled by default?

That depends on your system. I'd expect not for yours. A basic EL7 installation doesn't include the perl-ExtUtils-Embed package (although it is in RedHat's "base" collection so you needn't use CPAN or hunt down a 3rd-party RPM.)

I see a --disable-embedded-perl option in the configure script. I did
not configure my system to disable embedded perl, however when I try
to experiment with the -E option, mimedefang complains that I did not
enable embedded perl..

Since ExtUtils::Embed is needed for building an embedded Perl interpreter, the MD configure script won't enable the feature for you automatically if the module's not present, which it isn't by default on CentOS 7.1:

[root@cloud119-65 ~]# cat /etc/centos-release
CentOS Linux release 7.1.1503 (Core)
[root@cloud119-65 ~]# yum list installed perl-ExtUtils-Embed
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.advancedhosters.com
 * extras: centos.mirror.constant.com
 * updates: mirror.us.leaseweb.net
Error: No matching Packages to list
[root@cloud119-65 ~]# yum info perl-ExtUtils-Embed
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.advancedhosters.com
 * extras: centos.mirror.constant.com
 * updates: mirror.us.leaseweb.net
Available Packages
Name        : perl-ExtUtils-Embed
Arch        : noarch
Version     : 1.30
Release     : 285.el7
Size        : 49 k
Repo        : base/7/x86_64
Summary     : Utilities for embedding Perl in C/C++ applications
URL         : http://www.perl.org/
License     : GPL+ or Artistic
Description : Utilities for embedding Perl in C/C++ applications.


_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list [email protected]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to