Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-5978

Improve run time for arithmetic operators for Resources

    XMLWordPrintableJSON

Details

    Description

      Resource arithmetic concerning += and -= operators needs to be improved such that the impact of shared resources is minimal. Following is the observation of Resources_BENCHMARK_Test.Arithmetic.

      Head
      ====

      Resources benchmark on top of 6ce156b2bed7edecb27ce50f68d262ea4ab4f88e

      [ RUN      ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/0
      Took 72228us to perform 50000 'total += r' operations on cpus(*):1; gpus(*):1; mem(*):128; disk(*):256
      Took 101574us to perform 50000 'total -= r' operations on cpus(*):1; gpus(*):1; mem(*):128; disk(*):256
      Took 251715us to perform 50000 'total = total + r' operations on cpus(*):1; gpus(*):1; mem(*):128; disk(*):256
      Took 293414us to perform 50000 'total = total - r' operations on cpus(*):1; gpus(*):1; mem(*):128; disk(*):256
      

      Pre-shared resources
      =================

      Resources benchmark on top of 48a492cd9d7d0a194735b9b4107a35b489c596e1

      [ RUN      ] ResourcesOperators/Resources_BENCHMARK_Test.Arithmetic/0
      Took 48583us to perform 50000 'total += r' operations on cpus(*):1; gpus(*):1; mem(*):128; disk(*):256
      Took 86166us to perform 50000 'total -= r' operations on cpus(*):1; gpus(*):1; mem(*):128; disk(*):256
      Took 233148us to perform 50000 'total = total + r' operations on cpus(*):1; gpus(*):1; mem(*):128; disk(*):256
      Took 265719us to perform 50000 'total = total - r' operations on cpus(*):1; gpus(*):1; mem(*):128; disk(*):256
      

      'total += r' run time sees 40% jump. (I've run these 10 times and took an average, the avg is 48685.4us (pre-shared resources) vs. 68421.7us (post-shared resources).

      Attachments

        Activity

          People

            anindya.sinha Anindya Sinha
            anindya.sinha Anindya Sinha
            Yan Xu Yan Xu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: