Been a busy couple of weeks but managed to get some basic testing underway.
Test kit:
- F5 BIG-IP VE (2x CPU, 8GB)
- BIG-IP 12.1.2 Build 1.0.271 Hotfix HF1
Test Setup
Built a set of procs which made very simple calls to iRulesLX which stores some data. Initial test calls a proc 'setup' in CLIENT_ACCEPTED which set the ilx rpc published to a static variable Then, still within CLIENT_ACCEPTED, call a proc sets a value of 5 (this is stored in a object in Node.js), this uses the static variable u
Within HTTP_REQUEST call a proc which checks the value stored within Node.js object via a ILX call and if '5' logs locally the message
All timings where captured using another iRule storing [clock clicks -milliseconds] before and after each event and logs them out.
This was called 10 times from a bash script.
when CLIENT_ACCEPTED priority 5 {
call ilx_test::setupilx
call ilx_test::setNum 5
}
when HTTP_REQUEST priority 5 {
call ilx_test::logTest "ilx TEST 1"
call ilx_test::logTest "ilx TEST 2"
call ilx_test::logTest "ilx TEST 3"
call ilx_test::logTest "ilx TEST 4"
call ilx_test::logTest "ilx TEST 5"
call ilx_test::logTest "ilx TEST 6"
call ilx_test::logTest "ilx TEST 7"
call ilx_test::logTest "ilx TEST 8"
call ilx_test::logTest "ilx TEST 9"
call ilx_test::logTest "ilx TEST 10"
}
The second test was to run the same iRule with one change, the setupilx proc was not needed to commented out and the procs updated so each proc set a ilx rpc published to a local variable for use just within that proc.
when CLIENT_ACCEPTED priority 5 {
call ilx_test::setupilx
call ilx_test::setNum 5
}
From the first test the average delay from CLIENT_ACCEPTED was 1.1 ms and from HTTP_REQUEST was 10.4 ms From the second test the average delay from CLIENT_ACCEPTED was 1.5 ms and from HTTP_REQUEST was 11.5 ms
My consulsion is that the CLIENT_ACCEPTED was almost no different, in the number of ILX commands calls it was the same so put the 0.4 ms difference down the expected environmental differences, where the HTTP_REQUEST calls between 1.1ms and 3ms (from the max difference, not shown above).
However, the test was to make 10 proc calls per request so the difference is actually around an estimated 0.1-0.3ms per proc call.
NOTE: These was all run on a shared low environment F5 VE device and the capture of the timings would also have created some overhead so my guess is the difference is even lower than you results shown.
I would like to, and hopefully will, do more testing and get more data for a better idea of the best approach to utilising iRules LX in a large iRules environment. Once I do I will keep posting them to DevCentral in some form.