This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
kemi:performance-tests:5.2.x [2018/11/28 13:51] miconda |
kemi:performance-tests:5.2.x [2018/12/06 09:27] miconda [Results] |
||
---|---|---|---|
Line 1276: | Line 1276: | ||
* max - the maximum execution time for request_route or ksr_request_route() (microseconds) | * max - the maximum execution time for request_route or ksr_request_route() (microseconds) | ||
* avg - the average execution time for request_route or ksr_request_route() (microseconds) | * avg - the average execution time for request_route or ksr_request_route() (microseconds) | ||
+ | |||
+ | The metrics are extracted from the log messages using the next awk script: | ||
+ | |||
+ | <code awk> | ||
+ | BEGIN { | ||
+ | sum = 0 | ||
+ | avg = 0 | ||
+ | min = 1000000 | ||
+ | max = 0 | ||
+ | cnt = 0 | ||
+ | } | ||
+ | |||
+ | / | ||
+ | sum += $(NF-1) | ||
+ | cnt += 1 | ||
+ | if(min > $(NF-1)) { | ||
+ | min = $(NF-1) | ||
+ | } | ||
+ | if(max < $(NF-1)) { | ||
+ | max = $(NF-1) | ||
+ | } | ||
+ | } | ||
+ | |||
+ | END { | ||
+ | print "cnt: ", cnt | ||
+ | print "sum: ", sum | ||
+ | print "min: ", min | ||
+ | print "max: ", max | ||
+ | if(cnt> | ||
+ | avg = sum/cnt | ||
+ | } | ||
+ | print "avg: ", avg | ||
+ | } | ||
+ | |||
+ | </ | ||
+ | |||
+ | The results of several iterations running the tests: | ||
< | < | ||
Line 1347: | Line 1384: | ||
max: 1852 | max: 1852 | ||
avg: 62.8226 | avg: 62.8226 | ||
+ | |||
+ | $ awk -f kamailio-exec-report.awk / | ||
+ | cnt: 63616 | ||
+ | sum: 4255858 | ||
+ | min: 17 | ||
+ | max: 1619 | ||
+ | avg: 66.8992 | ||
+ | |||
+ | $ awk -f kamailio-exec-report.awk / | ||
+ | cnt: 61445 | ||
+ | sum: 4202427 | ||
+ | min: 23 | ||
+ | max: 1750 | ||
+ | avg: 68.3933 | ||
$ awk -f kamailio-exec-report.awk / | $ awk -f kamailio-exec-report.awk / | ||
Line 1361: | Line 1412: | ||
max: 2442 | max: 2442 | ||
avg: 69.5343 | avg: 69.5343 | ||
+ | |||
+ | $ awk -f kamailio-exec-report.awk / | ||
+ | cnt: 60846 | ||
+ | sum: 4432028 | ||
+ | min: 22 | ||
+ | max: 2628 | ||
+ | avg: 72.8401 | ||
+ | |||
+ | $ awk -f kamailio-exec-report.awk / | ||
+ | cnt: 61031 | ||
+ | sum: 4353501 | ||
+ | min: 23 | ||
+ | max: 3005 | ||
+ | avg: 71.3326 | ||
+ | |||
+ | $ awk -f kamailio-exec-report.awk / | ||
+ | cnt: 60785 | ||
+ | sum: 4400362 | ||
+ | min: 20 | ||
+ | max: 2093 | ||
+ | avg: 72.3922 | ||
+ | |||
+ | $ awk -f kamailio-exec-report.awk / | ||
+ | cnt: 60836 | ||
+ | sum: 4427855 | ||
+ | min: 23 | ||
+ | max: 3441 | ||
+ | avg: 72.7835 | ||
+ | |||
+ | $ awk -f kamailio-exec-report.awk / | ||
+ | cnt: 60813 | ||
+ | sum: 4591943 | ||
+ | min: 20 | ||
+ | max: 1751 | ||
+ | avg: 75.5092 | ||
+ | |||
</ | </ | ||
===== Remarks ===== | ===== Remarks ===== | ||
+ | |||
+ | Mentioning it again, the target of the tests was not to measure the capacity of Kamailio processing, but how the execution time differs in more or less same conditions between native scripting configuration file and KEMI alternatives, | ||
+ | |||
+ | Testing was done on the same system, running first the test with native configuration file and immediately after, the one for Lua scripting. | ||
+ | |||
+ | It was observed that the execution of native scripting routing blocks and Lua scripting functions takes more or less same time. Sometimes is native scripting slightly faster, other times is Lua scripting slightly faster. The average (for both native and Lua scripts) is in the range of 60 to 80 microseconds ( 1 / 1 000 000 of a second) for processing the registration request. The minimum reflects more what it takes for the first REGISTER request without authorization header, which is quickly challenged with 401 response. The maximum reflect the processing of the REGISTER request with valid authorization header, which does a query to database to fetch the password as well as store/ | ||
+ | |||
+ | There are variable number of retransmissions, | ||
+ | |||
+ | Comparing with the state of KEMI exports for version 5.1.x, in the v5.2.x were introduced some functions to be the equivalent of some conditions done with core keywords. | ||
+ | |||
+ | For example, in the native scripting: | ||
+ | |||
+ | <code c> | ||
+ | if(uri == myself) | ||
+ | </ | ||
+ | |||
+ | can be done in a KEMI scripting language with: | ||
+ | |||
+ | <code lua> | ||
+ | if KSR.is_myself_ruri() then | ||
+ | </ | ||
+ | |||
+ | The plan is to run the tests for Python as well as re-run Lua tests using LuaJIT interpreter instead of the standard Lua (support for LuaJIT was also added for v5.2.x). | ||
+ | |||
+ | |||