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
kemi:performance-tests:5.2.x [2018/12/06 09:37]
miconda
kemi:performance-tests:5.2.x [2019/01/07 09:05] (current)
miconda [Remarks]
Line 110: Line 110:
 test8;192.168.178.98;[authentication username=test password=test8]; test8;192.168.178.98;[authentication username=test password=test8];
 test9;192.168.178.98;[authentication username=test password=test9]; test9;192.168.178.98;[authentication username=test password=test9];
 +</code>
 +
 +These users have to be added to Kamailio subscriber table. To add them from the source code tree of Kamailio:
 +
 +<code>
 +cd utils/kamctl/
 +DBENGINE=MYSQL ./kamdbctl create
 +DBENGINE=MYSQL ./kamctl add test0@127.0.0.1 test0
 +DBENGINE=MYSQL ./kamctl add test1@127.0.0.1 test1
 +DBENGINE=MYSQL ./kamctl add test2@127.0.0.1 test2
 +DBENGINE=MYSQL ./kamctl add test3@127.0.0.1 test3
 +DBENGINE=MYSQL ./kamctl add test4@127.0.0.1 test4
 +DBENGINE=MYSQL ./kamctl add test5@127.0.0.1 test5
 +DBENGINE=MYSQL ./kamctl add test6@127.0.0.1 test6
 +DBENGINE=MYSQL ./kamctl add test7@127.0.0.1 test7
 +DBENGINE=MYSQL ./kamctl add test8@127.0.0.1 test8
 +DBENGINE=MYSQL ./kamctl add test9@127.0.0.1 test9
 +DBENGINE=MYSQL ./kamctl db show subscriber
 </code> </code>
  
 ===== SIPP Testing Command ===== ===== SIPP Testing Command =====
 +
 +SIPP was run on the same system with Kamailio. The command is:
  
 <code> <code>
Line 487: Line 507:
  
 #!ifdef WITH_CFGPYTHON #!ifdef WITH_CFGPYTHON
-modparam("app_python", "script_name", "/usr/local/etc/kamailio/kamailio-basic-kemi-python.py")+modparam("app_python", "script_name", "../etc/kamailio-basic-kemi-python.py")
 cfgengine "python" cfgengine "python"
 #!else #!else
Line 498: Line 518:
  
 #!ifdef WITH_CFGJSDT #!ifdef WITH_CFGJSDT
-modparam("app_jsdt", "load", "/usr/local/etc/kamailio/kamailio-basic-kemi-jsdt.js")+modparam("app_jsdt", "load", "../etc/kamailio-basic-kemi-jsdt.js")
 cfgengine "jsdt" cfgengine "jsdt"
 #!else #!else
 #!ifdef WITH_CFGSQLANG #!ifdef WITH_CFGSQLANG
-modparam("app_sqlang", "load", "/usr/local/etc/kamailio/kamailio-basic-kemi-sqlang.sq")+modparam("app_sqlang", "load", "../etc/kamailio-basic-kemi-sqlang.sq")
 cfgengine "sqlang" cfgengine "sqlang"
 #!else #!else
Line 991: Line 1011:
 function ksr_route_reqinit() function ksr_route_reqinit()
  if not KSR.is_myself_srcip() then  if not KSR.is_myself_srcip() then
- if not KSR.htable.sht_has_name("ipban", "eq", K_si) then+ if KSR.htable.sht_has_name("ipban", "eq", K_si) > 0 then
  -- ip is already blocked  -- ip is already blocked
  KSR.dbg("request from blocked IP - " .. K_rm  KSR.dbg("request from blocked IP - " .. K_rm
Line 1004: Line 1024:
  end  end
  end  end
- if KSR.corex.has_user_agent() then+ if KSR.corex.has_user_agent() > 0 then
  if string.find(K_ua, "friendly-scanner")  if string.find(K_ua, "friendly-scanner")
  or string.find(K_ua, "sipcli") then  or string.find(K_ua, "sipcli") then
Line 1415: Line 1435:
                 return -255;                 return -255;
  
-        if KSR.corex.has_user_agent() :+        if KSR.corex.has_user_agent() > 0 :
             ua = KSR.pv.gete("$ua")             ua = KSR.pv.gete("$ua")
             if (ua.find("friendly-scanner")!=-1             if (ua.find("friendly-scanner")!=-1
Line 1662: Line 1682:
 </code> </code>
  
-Executed when running with Lua scripting language:+Executed when running with Python scripting language:
  
 <code> <code>
Line 1853: Line 1873:
 ===== 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.+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 and Python scripting.
  
-Testing was done on the same system, running first the test with native configuration file and immediately after, the one 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 or Python 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). 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).
kemi/performance-tests/5.2.x.1544085475.txt.gz ยท Last modified: 2018/12/06 09:37 by miconda