Microsoft R Open is slower than base R RRS feed

  • Question

  • We just installed MRO 3.4.4 along with the MKL on a Windows server, side-by-side with (base) R 3.4.3.  We're using RStudio as the IDE.

    R (via RStudio) reports at startup that it's running MRO and using the MKL.  However, my colleague finds that when he runs scripts under MRO, the runtimes are often substantially slower, even though CPU usage is higher.  GLMs consistently take an order of magnitude longer to estimate, while linear models or PCA (for example) take about the same time.  I asked him to try limiting the number of threads, but apparently that makes no difference.

    I'm at a loss for now.  Frankly, I'm not convinced the MKL is even installed, in spite of what R reports (I see nothing on the C-drive that looks like the MKL).  But then again the CPU usage is different between MRO and R.

    Any suggestions on how to troubleshoot this?  I'm happy to provide more info to that end, but again, I don't know where to start.

    Tuesday, May 22, 2018 12:32 PM

All replies

  • Performance comparisons are always a bit tricky, since many things can have an impact on a particular run. With the MKL, it's important to be doing computations that actually bring those algorithms into play. (Standard linear models, for example, do not--R has its own hand-tuned algorithm for those, and never calls into the standard BLAS/LAPACK)

    The first thing to try is to run a set of standard benchmarks on both versions, such as this:

    Next is to examine your scripts with something like Rprof and see if you can find where the bulk of the time is being spent. This could give you a clue as to what is slowing you down.


    Rich Calaway

    Microsoft R Open team

    Tuesday, May 22, 2018 4:56 PM
  • Thanks, Rich.  

    I'm pretty sure now that the MKL was not installed by the MRO installer, even though it was selected for installation, and there was no indication that it was skipped or that there was any problem.

    We downloaded the MKL from Intel this morning and installed it manually, and since then performance has been not worse, and maybe better, although not as much better as I'd expected.

    This is where the benchmarks should come in handy.  Thanks for pointing me to those.



    Wednesday, May 23, 2018 2:49 AM
  • R is very slow even when it is not bugged. Python can be 10 times more faster than R. There is a video on YouTube that shows training a tree in R took 30 minutes while in Python took 3 minutes. If you want fast processing dont use R.

    Monday, July 2, 2018 1:45 PM