Uploaded image for project: 'QuickFIX/J'
  1. QuickFIX/J
  2. QFJ-569

QuickFix/J is not scalable due to overly long duration lock on sequence number in Session.sendRaw

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.5.0
    • Fix Version/s: None
    • Component/s: Engine
    • Labels:
      None

      Description

      I have been writing a capacity test to measure the performance of our FIX engine (not quickfix based), however I can barely get my machine to use any CPU during the test despite my using a large number of threads to generate orders and respond with Acks.
      Sadly I will have to now drop usage of quickfix/j as this is a showstopper for a high performance system.

      After profiling, I tracked down that all these threads are generally single threaded through quickfix.Session.sendRaw() which is locking to hold onto a sequence number. A scalable solution should keep locking to a minimum duration, i.e. do as much message checking and string conversion as possible, then fill in the sequence number as a short last step whilst inside the lock.

      A StringBuilder could be used to hold the toString()'d message whilst not holding the lock and leave sufficient capacity at the head of the array to shift some of the header content left/right to accomodate the sequence number field whilst during the locked region.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              leon Leon Chadwick
            • Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated: