X10
  1. X10
  2. XTENLANG-1229

multi-threaded scaling of Array and DistArray initialization

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: X10 2.0.2, X10 2.0.3, X10 2.0.4
    • Fix Version/s: X10 2.5
    • Labels:
      None
    • Environment:
      Linux x86-64, Intel Q6600 @ 2.40GHz (quad core)
    • Testcase included:
      yes
    • Number of attachments :
      2

      Description

      Against X10 2.0.2

      The following code (benchmark^BenchmarkForEach.x10 attached) is intended as a test of the multi-threaded scaling of foreach. It does not scale as expected with X10_NTHREADS. That is, performance is roughly the same on a multi-core system for X10_NTHREADS=1..4

              val a = Array.make[Double](Dist.makeBlock([0..N-1], 0), ((i) : Point) => i as Double)
              finish foreach ((i) in a) {
                  a(i) += 2.0;
              }
      

      This was compiled with -O -NO_CHECKS. When run on an Intel Q6600 @ 2.40GHz (quad core), the following timings were observed:

      X10_NTHREADS kop/s
      1 339
      2 281
      3 346
      4 360

      The [modified benchmark is intended to eliminate the overhead of foreach, by only creating as many activities as there are threads. However this does not scale well either. Looking at top, the CPU usage is as expected (100% for X10_NTHREADS=1, 200% for X10_NTHREADS=2 and so on); but the ops count only increases by a small fraction:

      X10_NTHREADS Mop/s
      1 3.37
      2 3.95
      3 4.31
      4 4.11

      Against SVN HEAD

      The base performance is better against SVN HEAD, but the scaling is similar. If the first benchmark is modified to change the foreach to an ateach statement, the performance against SVN HEAD improves markedly with the number of places.

      Places X10_NTHREADS kop/s
      1 1 561
      1 2 426
      1 3 483
      1 4 457
      2 1 846
      4 1 1470

      (This cannot be said for X10 2.0.2 as it does not include Igor's fix to XTENLANG-1143.)

      All this seems to suggest a problem with the way threads of execution are utilized by foreach.

      1. BenchmarkForEach.x10
        0.7 kB
        Josh Milthorpe
      2. BenchmarkSplitThreads.x10
        0.9 kB
        Josh Milthorpe

        Issue Links

          Activity

          Josh Milthorpe made changes -
          Field Original Value New Value
          Environment Linux x86-64, Intel Q6600 @ 2.40GHz (quad core)
          David Grove made changes -
          Assignee Olivier Tardieu [ tardieu ]
          David Grove made changes -
          Affects Version/s X10 SVN HEAD [ 15470 ]
          Fix Version/s X10 2.0.4 [ 16248 ]
          Affects Version/s X10 2.0.3 [ 16215 ]
          David Grove made changes -
          Assignee Olivier Tardieu [ tardieu ] David Grove [ dgrove ]
          Priority Major [ 3 ] Critical [ 2 ]
          David Grove made changes -
          Summary Single place multi-threaded scaling multi-threaded scaling of Array (and Rail) initialization
          Fix Version/s X10 2.1 [ 15896 ]
          Fix Version/s X10 2.0.4 [ 16248 ]
          Affects Version/s X10 2.0.4 [ 16248 ]
          Priority Critical [ 2 ] Major [ 3 ]
          David Grove made changes -
          Fix Version/s X10 2.1.1 [ 16497 ]
          Fix Version/s X10 2.0.5 [ 15896 ]
          David Grove made changes -
          Link This issue relates to XTENLANG-587 [ XTENLANG-587 ]
          David Grove made changes -
          Fix Version/s X10 2.1.2 [ 16498 ]
          Fix Version/s X10 2.1.1 [ 16497 ]
          David Grove made changes -
          Fix Version/s X10 2.2 [ 16002 ]
          Fix Version/s X10 2.1.2 [ 16498 ]
          David Grove made changes -
          Summary multi-threaded scaling of Array (and Rail) initialization multi-threaded scaling of Array and DistArray initialization
          Fix Version/s X10 2.2.1 [ 17131 ]
          Fix Version/s X10 2.2 [ 16002 ]
          David Grove made changes -
          Fix Version/s X10 2.2.2 [ 17639 ]
          Fix Version/s X10 2.2.1 [ 17131 ]
          David Grove made changes -
          Fix Version/s X10 2.2.3 [ 18146 ]
          Fix Version/s X10 2.2.2 [ 17639 ]
          David Grove made changes -
          Fix Version/s X10 2.3 [ 17009 ]
          Fix Version/s X10 2.2.3 [ 18146 ]
          David Grove made changes -
          Fix Version/s X10 2.3.1 [ 18657 ]
          Fix Version/s X10 2.3 [ 17009 ]
          David Grove made changes -
          Fix Version/s X10 2.3.2 [ 19010 ]
          Fix Version/s X10 2.3.1 [ 18657 ]
          David Grove made changes -
          Fix Version/s X10 2.4.1 [ 19142 ]
          Fix Version/s X10 2.3.2 [ 19010 ]
          David Grove made changes -
          Fix Version/s X10 2.5 [ 19141 ]
          Fix Version/s X10 2.4.1 [ 19142 ]

            People

            • Assignee:
              David Grove
              Reporter:
              Josh Milthorpe
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: