Rajith Attapattu wrote:
Hi All,
I have been testing the java client on particular RT jvm and have observed a
stubstantial performance drop when compared to stock Java 1.5
After further investigation I changed the Threads in our java client to
Realtime Threads and there was more than 50% improvement in performance.
Using Realtime threads not only improves performance it also allows the
user to fine tune the RT GC and other optimizations to get good determinism.
At some point some of our Qpid users may want to run their applications on a
RT jvm. To get the optimum benifit of such an environment we should provide
a way for them to use RT Threads with a simple thread abstraction. For
licensing reasons we cannot have any RT specific code in Qpid repo.
So if we could provide a simple thread abstraction that defaults to
java.lang.Thread that can be switched javax.realtime.RealtimeThread in an RT
environment that would be great.
I would like to hear your thoughts/suggestions around the best way to handle
this.
My first thought, would be to simply have a configurable implementation
of a ThreadFactory interface with a createThread(Runnable task, String
name):Thread method. The default would create normal threads, if a user
wished they could set a system property to indicate their prefered factory.
Is there any difference in which threads are swapped to realtime
threads? I.e. is switching the io threads more effective than switching
the dispatcher, or do all the threads need to be switched to see any
benefit?
Do you have a patch that you used for your experiments that would show
the scope of the changes required?