6 Replies Latest reply on May 21, 2011 3:04 AM by SiegeLord

    OpenCL runs 2-3x faster after reboot, then slows down (both CPU and GPU)

    SiegeLord

      As the title says, after I reboot my machine, I find my OpenCL programs run 2-3x faster on both the CPU and GPU. After awhile (I haven't been able to figure out precisely when, but when testing I just repeatedly invoke the programs, alternating between CPU and GPU) the performance rapidly drops back to "normal" levels and stays that way indefinitely afterwards (until I reboot again). I managed to reproduce this with at least one SDK sample. For example, here's the (edited) output right after boot:

      ./ScanLargeArrays -q -t -x 2048 -i 100 --device gpu
      -------------------------------------------
      Elements                 Time(sec)                kernelTime(sec)         
      2048                     0.53979                  0.00079

      ./ScanLargeArrays -q -t -x 2048 -i 100 --device cpu
      -------------------------------------------
      Elements                 Time(sec)                kernelTime(sec)         
      2048                     0.08662                  0.00062

      And after the slowdown happens:

      ./ScanLargeArrays -q -t -x 2048 -i 100 --device gpu
      -------------------------------------------
      Elements                 Time(sec)                kernelTime(sec)         
      2048                     0.56563                  0.00263

      ./ScanLargeArrays -q -t -x 2048 -i 100 --device cpu
      -------------------------------------------
      Elements                 Time(sec)                kernelTime(sec)         
      2048                     0.11062                  0.00162

      The times are representative.

      My specs:

      OS: Ubuntu 10.10 x86_64

      Driver: 11.3

      CPU: AMD Phenom II X6 1090T

      GPU: ATI Radeon HD 5830

      SDK: 2.4

      EDIT:

      So my question is... why does this happen? Is there any way I can make the speedup permanent? I tested a bit more and it seems that I can just let the system wait for 5 or so minutes, and the first time I run the application it will run in the slow "mode".