Results from Fabric Timing tests. I'm trying to establish a performance baseline, and generally, to better understand the available methods for executing Gremlin scripts from outside the JVM.
The tests each execute a simple g
Gremlin script (to obtain the graph object) using different methods. My testing scenario uses Titan (+ local Berekely DB) on a separate machine in the same local network. The RexProClient library for these tests was built in Release
mode.
Update (2013-06-07): I have improved the tests based on suggestions from Daniel. See updated results below.
RunRestApi: 0.0115ms, 5.5213ms, 5.5248ms, 5.5433ms
RunRestApi: 0.0080ms, 5.0159ms, 5.0208ms, 5.1927ms
RunRestApi: 0.0069ms, 4.6975ms, 4.7017ms, 4.7160ms
RunRestApi: 0.0069ms, 4.2712ms, 4.2744ms, 4.2898ms
RunRestApi: 0.0073ms, 5.6557ms, 5.6599ms, 5.6774ms
RunRestApi: 0.0083ms, 9.1399ms, 9.1437ms, 9.1602ms
RunRestApi: 0.0073ms, 5.1332ms, 5.1377ms, 5.2298ms
RunRestApi: 0.0104ms, 4.2492ms, 4.2530ms, 4.3685ms
RunRestApi: 0.0090ms, 4.7783ms, 4.7836ms, 4.8028ms
RunRestApi: 0.0083ms, 4.4354ms, 4.4399ms, 4.5617ms
AVG: 5.35422ms
RunRexConn: 0.0020ms, 0.0139ms, 1.3270ms, 10.5418ms
RunRexConn: 0.0024ms, 0.0157ms, 1.7372ms, 9.8598ms
RunRexConn: 0.0024ms, 0.0125ms, 2.2222ms, 11.2631ms
RunRexConn: 0.0017ms, 0.0136ms, 1.4803ms, 9.5826ms
RunRexConn: 0.0017ms, 0.0101ms, 1.1583ms, 10.1814ms
RunRexConn: 0.0017ms, 0.0104ms, 1.2227ms, 8.4431ms
RunRexConn: 0.0017ms, 0.0097ms, 1.2122ms, 20.7232ms
RunRexConn: 0.0027ms, 0.0185ms, 1.5076ms, 8.5939ms
RunRexConn: 0.0017ms, 0.0094ms, 1.2878ms, 8.6307ms
RunRexConn: 0.0020ms, 0.0139ms, 1.3204ms, 10.2930ms
AVG: 10.81126ms
The "query time" that RexConnect measures is very close to the Gremlin extension timings (usually between 5-7ms). When I measured the JSON parsing + writing to the FilterChain, it was always 0-1ms. Removing the logging output didn't make any noticeable performance difference.
This implies that RexConnect's extra ~5ms is not RexPro's fault. It could be the JSON command processing that RexConnect does, or perhaps the way RexConnect uses Grizzly filters.
RunRexPro: 0.0003ms, 0.0024ms, 27.8894ms, 27.9227ms
RunRexPro: 0.0045ms, 0.0062ms, 31.5273ms, 31.5696ms
RunRexPro: 0.0003ms, 0.0024ms, 31.2851ms, 31.3159ms
RunRexPro: 0.0003ms, 0.0027ms, 28.6968ms, 28.7297ms
RunRexPro: 0.0003ms, 0.0024ms, 29.7372ms, 29.7711ms
RunRexPro: 0.0003ms, 0.0027ms, 32.6993ms, 32.7322ms
RunRexPro: 0.0003ms, 0.0027ms, 28.1365ms, 28.1711ms
RunRexPro: 0.0000ms, 0.0020ms, 27.8565ms, 27.8891ms
RunRexPro: 0.0003ms, 0.0020ms, 28.8889ms, 28.9204ms
RunRexPro: 0.0003ms, 0.0024ms, 29.4611ms, 29.4964ms
AVG: 29.65182ms
Related RexProClient issue:
dkuppitz/rexpro-client#6
Related Gremlin-Users discussion:
https://groups.google.com/forum/#!topic/gremlin-users/GFrQJfcuM_Y