A brief Lua benchmark

From: Murray S. Kucherawy <msk_at_cloudmark.com>
Date: Tue, 6 Jul 2010 16:42:54 -0700

Using miltertest, I wrote a test script that runs 1000 messages through the filter in a signing mode and then uses getrusage() to determine the user and system time used, and log it. There were two configurations, one that used Domain/KeyFile/Selector and one that used KeyFile/Selector/SetupPolicyScript (i.e. one without Lua, one with). The results:

===== signing without Lua
*** simple/simple signing test without Lua, 1000 messages
miltertest: self: user 1.330723, system 0.481107
miltertest: child: user 3.194833, system 1.648349
===== signing with Lua
*** simple/simple signing test with Lua, 1000 messages
miltertest: self: user 1.372240, system 0.437083
miltertest: child: user 3.662922, system 1.716442

In this case miltertest is referring to itself with "self" and to the filter with "child", so we're only really interested in the "child" case. When the child is told to terminate, there's a delay of up to several seconds as the libmilter processing loop comes around to detect that the global shutdown flag has been set, so real time measurements aren't useful here. Fortunately all this is reporting is CPU time. So the totals are 4.843182 for the non-Lua case and 5.379364 for the Lua case, an increase of about 11%.

I'll add this test to opendkim/tests on the trunk, but I won't add it yet to the list of tests that's actually run because it can slow "make check" down by quite a bit (though perhaps that's not really a problem since "make check" is supposed to be thorough anyway).

Do we think that's high or acceptable?

-MSK
Received on Tue Jul 06 2010 - 23:43:05 PST

This archive was generated by hypermail 2.3.0 : Mon Oct 29 2012 - 23:32:53 PST