Uploaded image for project: 'MINA'
  1. MINA
  2. DIRMINA-332

Improve performance of StatCollector

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.1
    • 1.0.2
    • Core
    • None

    Description

      StatCollector#addSession and StatCollector#removeSession are blocking the entire object. Therefore under heavy load of new sessions or remove of sessions we will have a bottleneck. Instead we can take advantage of "new" Java 5 concurrent util classes.

      Throughput is incorrectly being estimated. It is missing packets/bytes and when dealing with a very big number of sessions the rate will be off. Instead of keeping stats of throughput we can just stats of total traffic.So stats will change from --> to
      MsgWrittenThroughput --> totalMsgWritten
      MsgReadThroughput --> totalMsgRead
      BytesWrittenThroughput --> totalBytesWritten
      BytesReadThroughput --> totalBytesRead

      The rate can then be estimated by the client of this class. We can add 2 new stats that are very helpful (at least to me):

      1) scheduled writes: Number of current scheduled writes for all existing sessions.
      2) queueved events: Number of current queued events for all existing sessions.

      Stat #1 can always be estimated. However stat #2 can only be estimated when the ExecutorFilter is present in the filter chain.

      Attachments

        1. changes.patch
          13 kB
          Gaston Dombiak

        Issue Links

          Activity

            People

              trustin Trustin Lee
              dombiak_gaston Gaston Dombiak
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: