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 11:36] miconda |
kemi:performance-tests:5.2.x [2018/12/06 09:27] miconda [Results] |
||
---|---|---|---|
Line 112: | Line 112: | ||
</ | </ | ||
- | Testing | + | ===== SIPP Testing |
< | < | ||
Line 125: | Line 125: | ||
==== Common Config File ==== | ==== Common Config File ==== | ||
+ | |||
+ | File: ../ | ||
<code c> | <code c> | ||
Line 491: | Line 493: | ||
#!ifdef WITH_CFGLUA | #!ifdef WITH_CFGLUA | ||
modparam(" | modparam(" | ||
- | modparam(" | + | modparam(" |
cfgengine " | cfgengine " | ||
#!else | #!else | ||
Line 504: | Line 506: | ||
#!else | #!else | ||
cfgengine " | cfgengine " | ||
- | include_file "/ | + | include_file "../ |
#!endif | #!endif | ||
Line 516: | Line 518: | ||
==== Native Scripting Routing Blocks ==== | ==== Native Scripting Routing Blocks ==== | ||
+ | |||
+ | File: ../ | ||
<code c> | <code c> | ||
Line 851: | Line 855: | ||
==== Lua Scripting Routing Functions ==== | ==== Lua Scripting Routing Functions ==== | ||
+ | |||
+ | File: ../ | ||
<code lua> | <code lua> | ||
Line 1270: | 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 1313: | Line 1356: | ||
max: 2159 | max: 2159 | ||
avg: 67.6884 | avg: 67.6884 | ||
+ | |||
+ | $ awk -f kamailio-exec-report.awk / | ||
+ | cnt: 62752 | ||
+ | sum: 4184315 | ||
+ | min: 17 | ||
+ | max: 1948 | ||
+ | avg: 66.6802 | ||
+ | |||
+ | $ awk -f kamailio-exec-report.awk / | ||
+ | cnt: 61850 | ||
+ | sum: 4466376 | ||
+ | min: 23 | ||
+ | max: 2110 | ||
+ | avg: 72.213 | ||
+ | |||
+ | $ awk -f kamailio-exec-report.awk / | ||
+ | cnt: 62420 | ||
+ | sum: 3697635 | ||
+ | min: 17 | ||
+ | max: 2144 | ||
+ | avg: 59.238 | ||
+ | |||
+ | $ awk -f kamailio-exec-report.awk / | ||
+ | cnt: 61197 | ||
+ | sum: 3844555 | ||
+ | min: 22 | ||
+ | max: 1852 | ||
+ | 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 / | ||
+ | cnt: 63595 | ||
+ | sum: 4426750 | ||
+ | min: 17 | ||
+ | max: 3456 | ||
+ | avg: 69.6085 | ||
+ | |||
+ | $ awk -f kamailio-exec-report.awk / | ||
+ | cnt: 61103 | ||
+ | sum: 4248753 | ||
+ | min: 23 | ||
+ | max: 2442 | ||
+ | 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 ===== | ||
+ | |||
+ | 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). | ||
+ | |||
+ | |||
+ |