Uploaded image for project: 'Axis'
  1. Axis
  2. AXIS-1371

ByteArray causes performance degradation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2 Beta
    • None
    • Basic Architecture
    • None
    • Standard client and server messaging using SOAPParts

    Description

      ByteArray has a mechanism in it to provide a "file" as a backing store for any arrays that are larger than 8KB. In most cases, this is all of my responses. We are passing images back as BASE64 and we see major performance hit. After performaning a thread dump on poorly performing tests, we found that many threads were blocked in the Sun File.createTempFile method which has a global mutex that is serializing all of my SOAP responses.

      Solution: Change ByteArray to provide a larger amount of memory usage for RESIDENT SIZE (like 512MB compared to 8KB). The RESIDENT SIZE is not preallocated, but used to determine when to turn on backing storage. I also propose a change to allow control over RESIDENT SIZE, CACHE INCREMENT, ENABLE/DISABLE BACKING STORE, and a WORKING BUFFER SIZE for when the backing store is written or read via a stream.

      In my internal tests, this change has seen a major improvement on performance. And seeing that SOAPParts are used on the client side as well, this might have a dramatic increase performance. My tests indicate at a minimum of 50% improvement. I was able to double my test throughput after making this change.

      I have a working ByteArray coded that includes my changes and I can send it if you want it.

      Attachments

        1. AxisEngine.patch
          1 kB
          David Lucas
        2. ByteArray.patch
          8 kB
          David Lucas
        3. ByteArray.patch
          7 kB
          David Lucas
        4. ByteArray.patch
          6 kB
          David Lucas

        Activity

          People

            Unassigned Unassigned
            ddlucas David Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: