User Tools

Site Tools


kemi:performance-tests:5.2.x

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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
 +}
 +
 +/request-route executed/ {
 +        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>0) {
 +                avg = sum/cnt
 +        }
 +        print "avg: ", avg
 +}
 +
 +</code>
 +
 +The results of several iterations running the tests:
  
 <code> <code>
Line 1347: Line 1384:
 max:  1852 max:  1852
 avg:  62.8226 avg:  62.8226
 +
 +$ awk -f kamailio-exec-report.awk /tmp/kamailio-register-native.txt
 +cnt:  63616
 +sum:  4255858
 +min:  17
 +max:  1619
 +avg:  66.8992
 +
 +$ awk -f kamailio-exec-report.awk /tmp/kamailio-register-lua.txt
 +cnt:  61445
 +sum:  4202427
 +min:  23
 +max:  1750
 +avg:  68.3933
  
 $ awk -f kamailio-exec-report.awk /tmp/kamailio-register-native.txt $ awk -f kamailio-exec-report.awk /tmp/kamailio-register-native.txt
Line 1361: Line 1412:
 max:  2442 max:  2442
 avg:  69.5343 avg:  69.5343
 +
 +$ awk -f kamailio-exec-report.awk /tmp/kamailio-register-python.txt 
 +cnt:  60846
 +sum:  4432028
 +min:  22
 +max:  2628
 +avg:  72.8401
 +
 +$ awk -f kamailio-exec-report.awk /tmp/kamailio-register-python.txt 
 +cnt:  61031
 +sum:  4353501
 +min:  23
 +max:  3005
 +avg:  71.3326
 +
 +$ awk -f kamailio-exec-report.awk /tmp/kamailio-register-python.txt 
 +cnt:  60785
 +sum:  4400362
 +min:  20
 +max:  2093
 +avg:  72.3922
 +
 +$ awk -f kamailio-exec-report.awk /tmp/kamailio-register-python.txt 
 +cnt:  60836
 +sum:  4427855
 +min:  23
 +max:  3441
 +avg:  72.7835
 +
 +$ awk -f kamailio-exec-report.awk /tmp/kamailio-register-python.txt 
 +cnt:  60813
 +sum:  4591943
 +min:  20
 +max:  1751
 +avg:  75.5092
 +
 </code> </code>
  
 ===== 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, so far being done for Lua scripting.
 +
 +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/update the record in the location hash table (writing to database on timer - usrloc db_mode 2).
 +
 +There are variable number of retransmissions, being the reason for having cnt higher than 60000, a matter of sipp being able to match the response with the request at this high pace of stress testing (4 000 registrations per second, with a limit of 10 000 transactions at the same time, stopping after 20 000 sent messages). Note that each registration is challenged for authentication, so it is resent with authorization header.
 +
 +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)
 +</code>
 +
 +can be done in a KEMI scripting language with:
 +
 +<code lua>
 +if KSR.is_myself_ruri() then
 +</code>
 +
 +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).
 +
 +
  
kemi/performance-tests/5.2.x.txt ยท Last modified: 2019/01/07 09:05 by miconda