Hadoop Common
  1. Hadoop Common
  2. HADOOP-7401

Unit test TestPureJavaCRC32 warmup code warms up the not-so-important loop in PureJavaCRC32.update()

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 0.21.0
    • Fix Version/s: 0.21.0
    • Component/s: test
    • Labels:
      None
    • Environment:

      Solaris-Sparcv9; Solaris-AMD64

    • Release Note:
      fixed warmup in the perf test.

      Description

      When the warmup code sequence in TestPureJavaCRC32.java is executed, it sends size=len=2 and due to the value of 'trials' in for loop in doBench(), the crc.update() gets run > the compile threshold, thus providing the information that 'while 0<len<7' is a hot loop and 'while len>7' is a cold loop. This brings the MB/s number for len > 7 in PureJavaCRC32.update() way down (e.g. ~28.5% for size=len=65536).

      The workaround would be to use size=len=>7 (so just having size=len=2101 ahead of size=len=2 will do the trick) in the warmup section.

      1. hadoop-7401.patch
        3 kB
        monica beckwith

        Issue Links

          Activity

          monica beckwith created issue -
          monica beckwith made changes -
          Field Original Value New Value
          Description When the warmup code sequence in TestPureJavaCRC32.java is executed, it sends size=len=2 and due to the value of 'trials' in for loop in doBench(), the crc.update() gets run > compile threshold, thus providing the information that 'while 0>len<7' is a hot loop and 'while len>7' is a cold loop. This brings the MB/s number for len > 7 in PureJavaCRC32.update() way down (e.g. ~28.5% for size=len=65536) . When the warmup code sequence in TestPureJavaCRC32.java is executed, it sends size=len=2 and due to the value of 'trials' in for loop in doBench(), the crc.update() gets run > the compile threshold, thus providing the information that 'while 0>len<7' is a hot loop and 'while len>7' is a cold loop. This brings the MB/s number for len > 7 in PureJavaCRC32.update() way down (e.g. ~28.5% for size=len=65536).

          The workaround would be to use size=len=>7 (so just having size=len=2101 ahead of size=len=2 will do the trick) in the warmup section.
          monica beckwith made changes -
          Description When the warmup code sequence in TestPureJavaCRC32.java is executed, it sends size=len=2 and due to the value of 'trials' in for loop in doBench(), the crc.update() gets run > the compile threshold, thus providing the information that 'while 0>len<7' is a hot loop and 'while len>7' is a cold loop. This brings the MB/s number for len > 7 in PureJavaCRC32.update() way down (e.g. ~28.5% for size=len=65536).

          The workaround would be to use size=len=>7 (so just having size=len=2101 ahead of size=len=2 will do the trick) in the warmup section.
          When the warmup code sequence in TestPureJavaCRC32.java is executed, it sends size=len=2 and due to the value of 'trials' in for loop in doBench(), the crc.update() gets run > the compile threshold, thus providing the information that 'while 0<len<7' is a hot loop and 'while len>7' is a cold loop. This brings the MB/s number for len > 7 in PureJavaCRC32.update() way down (e.g. ~28.5% for size=len=65536).

          The workaround would be to use size=len=>7 (so just having size=len=2101 ahead of size=len=2 will do the trick) in the warmup section.
          monica beckwith made changes -
          Attachment HADOOP-7401.patch [ 12482990 ]
          monica beckwith made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Release Note fixed warmup in the perf test.
          Fix Version/s 0.21.0 [ 12313563 ]
          Tsz Wo Nicholas Sze made changes -
          Assignee monica beckwith [ mobeck ]
          monica beckwith made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          monica beckwith made changes -
          Attachment HADOOP-7401.patch [ 12482990 ]
          monica beckwith made changes -
          Attachment hadoop-7401.patch [ 12483202 ]
          monica beckwith made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Robert Joseph Evans made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Suresh Srinivas made changes -
          Link This issue is related to HADOOP-6148 [ HADOOP-6148 ]

            People

            • Assignee:
              monica beckwith
              Reporter:
              monica beckwith
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 1m
                1m
                Remaining:
                Remaining Estimate - 1m
                1m
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Development