News for hackers. Stuff that matters.
Re:G1 Garbage Collection JVM7 - Big Performance Problems Shown by wglb on Tuesday November 01, 2011 @11:14AM (#3182418)
Having done some hard-core real-time programming in the past, and currently thinking about a low-latency benchmark between languages, I am not sure that this sort of test is useful in a real-time environment. Also, using a garbage-collected language in a real-time environment would require some extra care.

One of the things to consider in engineering a real-time environment is what is the central data-flow load of the system. For example, in a medical data-acquisition environment, allocating an object for each tick would not likely be wise. In fact, use of malloc might not be called for, statically allocating buffers being a better avenue.

In the case of a low-latency financial trading system written in a garbage-collected language, it might be prudent to allocate all the objects before 0830 (if that is when trading starts) and free them after the market close.

There is a wide range of real-time response requirements (for financial exchanges, response times of less than a hundred of milliseconds (eg, 395 from BATS) for full turnaround are expected). Electrocardiogram data needs to be sampled once each millisecond, but the jitter in sampling times needs to be low.

Looks like some good tools there, but without the engineering context it is hard to draw a useful conclusion.

Re:G1 Garbage Collection JVM7 - Big Performance Problems Shown by NerdsCentral on Tuesday November 01, 2011 @11:57AM (#3182645)
Totally agree. My original aim was to use an idea I had about the way the garbage collector synchronises in the Oracle JVM to give 'windows' of determinism. So I set about making a program to push the gc really hard so I could see if my idea worked. But I have not gotten as far as the original aim yet because I found this interesting stuff about the G1 collector.

As for your points about realtime - I am completely with you. I had in my mind that one might have a realtime system on the rtjvm or in c++ which needed to periodically communicate with a standard JVM. There are three approaches I could see for this. One, would be to send messages and decouple that way. Another is to make the communication abort if it looked like it might cause a deadline miss. The third was to briefly (milliseconds) disable the gc in the standard JVM so the communication could occur and then turn it back on again immediately afterwards.

Now - that sounds like a really bad idea and it probably is - but it is an interesting idea to play with.

So - please don't thing I am proposing realtime programming on the standard JVM, just some ideas for larger systems integration.

Re:G1 Garbage Collection JVM7 - Big Performance Problems Shown by wglb on Tuesday November 01, 2011 @01:05PM (#3183006)
So my prime hobby is ham radio, and my prime mode is morse code. These days, we mostly connect computers to the radio to do logging and morse code keying (done through the LPT port). One popular program runs under windows. The big boys use another program that runs under DOS, and lately FreeDOS as a replacement. Running under windows, there is an annoying hesitation once every word or so that is due to whatever is going on in windows.

The solution, provided by the maker of the above-mentioned windows software is an external keying module. With this arrangement, windows sends characters to the hardware brick, which, latency-free, sends out the characters quite nicely. (Amazing how the trained morse-code ear can distinguish ms delays in character starts.)

Personally, I now think that way where a system has a component that is latency rich connected to a component that is latency-free. This of course has implications to the overall solution.