EMA Performance issue - Young GC is higher comparing with RFA

We are planning to switch from RFA to EMA to get level 1 market price. When we do performance testing, we found that EMA has much higher Young GC and larger amount of bytes created than RFA. I used View and StringDeduplication JVM parameters on consumer side to improve the performance. But, is there any reason that can explain this young GC problem? Does EMA have a dictionary similar to RFA dictionary to filter out unused fields and data?

Best Answer

  • wasin.w
    wasin.w admin
    Answer ✓

    Hello @fanghua.liu

    The API Development team has investigated this issue. The
    team confirms this is an EMA Java API expected behavior.

    Basically, both RFA Java and Elektron SDK Java (EMA and
    ETA) already use pooling mechanism to reuse the existing objects in a pool to
    reduce young generation objects in JVM which can be collected frequently by
    JVM. However, EMA Java adopts the Java Collection<E> interface for ease
    of use for Java developers to decode/encode data from a container such as
    FieldList for the Market Price domain. The internal implementation for every
    EMA Java containers utilizes the LinkedList<E> container which creates a
    new Node<> for every add operation causing young generation object for
    every field entry added to the FieldList.

    To achieve best performance in terms of latency and
    throughput, and garbage collection avoidance, the team recommends you using the
    ETA Java API as opposed to EMA Java. You can find more detail regarding the ETA
    Java API in the following pages:

    • ETA Java API Tutorial page:
    1. ETA Java API Quick Start page:

    Alternatively, you may use the Views feature to
    request only interested fields to reduce network memory consumption and network
    bandwidth. You can see the View feature example code in EMA Java’s
    example360__MarketPrice__View example.