I have problem with performance of Java UDR functions on Informix on Windows.
On this server I already have some functions in C and SPL.
I chose one function to write it in those 3 languages and I measured
performance of this function on test table.
Function calculates some kind of checksum so it not use any db libraries etc.
only string and math operations.
I observed performance on 30k records with SQL like:
select function(txt) from _tmp_perf_test
and I changed function to 'function_c, function_spl or function_java.
My performance tests showed that C function is the fastest, SPL function is about 5 times slower, where Java is 100 (one hundred!) times slower than C.
I checked it few times and 1:100 ratio didn't improve. I changed Java function to simply return length of the string but even this do not help so it looks, that there is general problem with Java function invocation, because there was no difference in time between Java function that calculate checksum and Java function that returns length of the string.
I increased JVM_MAX_HEAP_SIZE to 128 and it not helped too.
I use IBM Informix Dynamic Server Version 11.50.TC6DE.
The same test on Linux server: IBM Informix Dynamic Server Version 11.50.FC6
show more "normal" results, i.e. Java is slower from C and SPL but only 2 to 5 times.
What can I do to improve Java performance on Informix server on Windows?
More info about Java on servers:
c:\Informix\extend\krakatoa\jre\bin>java -version
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build pwi32dev-20081129a (SR9-0 ))
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Windows Server 2003 x86-32 j9vmwi3223-20081129 (JIT enabled)
J9VM - 20081126_26240_lHdSMr
JIT - 20081112_1511ifx1_r8
GC - 200811_07)
JCL - 20081129
[root@informix11 bin]# ./java -version
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build pxa64devifx-20071025 (SR6b))
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Linux amd64-64 j9vmxa6423-20071005 (JIT enabled)
J9VM - 20071004_14218_LHdSMr
JIT - 20070820_1846ifx1_r8
GC - 200708_10)
JCL - 20071025