Uploaded image for project: 'Oozie'
  1. Oozie
  2. OOZIE-3232

Reduce heap waste by reducing duplicate string count

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.1.0
    • Component/s: core
    • Labels:
      None

      Description

      I've recently analyzed an Oozie heap dump obtained from a customer's production job, using jxray (www.jxray.com). In this job, Oozie's heap consumption is ~6GB, and it turns out that nearly 25% of it is wasted due to a large number of duplicate strings. The screenshot below, taken from the jxray report, illustrates the problem.

      It turns out that a lot of duplicate strings come from the oozie's own code, i.e. org.apache.oozie.*. In particular, the top data field wasting memory is org.apache.oozie.StringBlob.string (wastes 2.6%, or ~160MB). From the source code of StringBlob I see that it would be trivial to intern (deduplicate) these strings by adding the call to String.intern() in the constructor and a few other places. Similarly, various fields of org.apache.oozie.WorkflowJobBean and WorkflowActionBean collectively waste a lot of memory, and can be fixed in the same way.

        Attachments

        1. jxray-analysis-dup-strings.png
          386 kB
          Misha Dmitriev
        2. OOZIE-3232-01.patch
          13 kB
          Misha Dmitriev

        Issue Links

          Activity

            People

            • Assignee:
              misha@cloudera.com Misha Dmitriev
              Reporter:
              misha@cloudera.com Misha Dmitriev

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment