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

Big performance drop in 2.0M2 CumulativeProtocolDecoder for large messages

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0-M2
    • 2.0.0-M3
    • Filter
    • None
    • Mac OS X 10.5 (Intel), Java 1.5

    Description

      Porting from MINA 1.1 to 2.0M2, one of my tests pinpointed a huge drop in the performance of a CumulativeProtocolDecoder-based codec when transmitting large (>2MB) messages. Under MINA 1.1.x, the transfer was effectively immediate, under 2.0M2 the system seems to get bogged down and calls the doDecode () method in 1-second intervals, with slowly-increasing amounts of data. The system is fast quad-core system, lightly unloaded. Almost no CPU usage is recorded when running either test.

      The two attached ZIP files have test cases against 1.1 and 2.0M2 that reproduce this. Their trace outputs follow: the MINA 1.1 case terminates in under a second, the 2.0 case times out and fails after 5 seconds.

      MINA 1.1
      ----------------------------------------------------------------------

      time = 14:04:00.934
      remaining = 1024
      limit = 1024
      capacity = 1024
      time = 14:04:00.946
      remaining = 3072
      limit = 3072
      capacity = 4194304
      time = 14:04:00.947
      remaining = 7168
      limit = 7168
      capacity = 4194304
      time = 14:04:00.947
      remaining = 15360
      limit = 15360
      capacity = 4194304
      time = 14:04:00.947
      remaining = 31744
      limit = 31744
      capacity = 4194304
      time = 14:04:00.947
      remaining = 64512
      limit = 64512
      capacity = 4194304
      time = 14:04:00.948
      remaining = 130048
      limit = 130048
      capacity = 4194304
      time = 14:04:00.948
      remaining = 261120
      limit = 261120
      capacity = 4194304
      time = 14:04:00.949
      remaining = 523264
      limit = 523264
      capacity = 4194304
      time = 14:04:00.951
      remaining = 1047552
      limit = 1047552
      capacity = 4194304
      time = 14:04:00.953
      remaining = 1571840
      limit = 1571840
      capacity = 4194304
      time = 14:04:00.954
      remaining = 2096128
      limit = 2096128
      capacity = 4194304
      time = 14:04:00.955
      remaining = 2097156
      limit = 2097156
      capacity = 4194304
      frame size = 2097152

      2.0
      ----------------------------------------------------------------------

      time = 14:01:59.154
      remaining = 2048
      limit = 2048
      capacity = 2048
      time = 14:01:59.175
      remaining = 6144
      limit = 6144
      capacity = 2097156
      time = 14:01:59.176
      remaining = 14336
      limit = 14336
      capacity = 2097156
      time = 14:01:59.176
      remaining = 30720
      limit = 30720
      capacity = 2097156
      time = 14:01:59.176
      remaining = 63488
      limit = 63488
      capacity = 2097156
      time = 14:01:59.177
      remaining = 129024
      limit = 129024
      capacity = 2097156
      time = 14:01:59.177
      remaining = 194560
      limit = 194560
      capacity = 2097156
      time = 14:01:59.177
      remaining = 196608
      limit = 196608
      capacity = 2097156
      time = 14:02:00.153
      remaining = 262144
      limit = 262144
      capacity = 2097156
      time = 14:02:00.153
      remaining = 294912
      limit = 294912
      capacity = 2097156
      time = 14:02:01.153
      remaining = 360448
      limit = 360448
      capacity = 2097156
      time = 14:02:01.154
      remaining = 393216
      limit = 393216
      capacity = 2097156
      time = 14:02:02.154
      remaining = 458752
      limit = 458752
      capacity = 2097156
      time = 14:02:02.154
      remaining = 491520
      limit = 491520
      capacity = 2097156
      time = 14:02:03.154
      remaining = 557056
      limit = 557056
      capacity = 2097156
      time = 14:02:03.155
      remaining = 589824
      limit = 589824
      capacity = 2097156
      time = 14:02:04.154
      remaining = 655360
      limit = 655360
      capacity = 2097156
      time = 14:02:04.155
      remaining = 688128
      limit = 688128
      capacity = 2097156

      Attachments

        1. mina_test_1.1.zip
          3 kB
          Matthew Phillips
        2. mina_test_2.0.zip
          3 kB
          Matthew Phillips

        Activity

          People

            vrm Julien Vermillard
            mattphil Matthew Phillips
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: