Uploaded image for project: 'Accumulo'
  1. Accumulo
  2. ACCUMULO-4041

Java reflection eats too much CPU

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.7.0
    • 1.6.5, 1.7.1, 1.8.0
    • tserver
    • None
    • Ubuntu 15.10, jdk1.8.0_60

    Description

      This is called so many times that it eats too much CPU, even more than the snappy compressor: http://i.imgur.com/vqX4pFi.png
      Perhaps the annotation data should be copied into regular variables which can be accessed without reflection.

      • org.apache.accumulo.core.client.impl.Tables.getZooCache()
      • org.apache.accumulo.server.client.HdfsZooInstance.getZooKeepersSessionTimeOut()
      • org.apache.accumulo.core.conf.AccumuloConfiguration.getTimeInMillis()
      • org.apache.accumulo.core.conf.SiteConfiguration.get()
      • org.apache.accumulo.core.conf.Property.isSensitive()
      • org.apache.accumulo.core.conf.Property.hasAnnotation()
      • java.lang.Class.getField()

      Attachments

        1. profiling.jpg
          79 kB
          Josh Elser
        2. ACCUMULO-4041-experiment.patch
          2 kB
          Keith Turner
        3. ACCUMULO-4041-01.patch
          2 kB
          Eric C. Newton

        Issue Links

          Activity

            People

              ecn Eric C. Newton
              volth Volth
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m