[R] R Running slow on Ubuntu

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Sat Mar 15 17:00:02 CET 2014


Comparing with an unspecified benchmark makes answering this too hard. Following instructions in the Posting Guide will lead to more accurate Q and A.

Note that you may not need to compile if you have not as yet followed the recommendations: http://cran.r-project.org/bin/linux/ubuntu/README. There are apparently compile-time options that can obtain noticeable improvements for certain classes of problems, but if you and your friend are both using standard installs that seems unlikely to explain the difference. I have not needed a custom compile (yet?).
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.

On March 15, 2014 3:46:57 AM PDT, Augusto Cesar <augusto.cesar at gmail.com> wrote:
>My guess is that maybe the default Ubuntu binaries aren't compiled
>with MKL (Math Kernel Library) support and thus with no
>multithreading.
>
>I would suggest doing a quick research on how to re-compile R with MKL
>support and maybe you'll be good to go.
>
>On Fri, Mar 14, 2014 at 9:45 PM, Russell Bainer <russ.bainer at gmail.com>
>wrote:
>> Hi All,
>>
>> I've run across an odd phenomenon and I am wondering if someone might
>be
>> able to provide insight as to what is going on. I'm running some R
>code
>> that was provided by a collaborator, who is not a very experienced R
>> programmer (e.g., the code is functional but not very efficient).
>When I
>> run it from the terminal or command line everything executes, albeit
>very
>> slowly- the logfile suggests that the program is about 5% done after
>> running over last weekend. Top indicates that it is maxing out one of
>my
>> CPUs and chewing up a lot of memory, which I expect.
>>
>>  The strange thing is that my collaborator insists that the code
>executes
>> on the order of minutes on his 2012 macbook pro with 8G of memory. I
>am
>> running it with ubuntu 12.04 on a dual-core i7 with 32G, and it's
>slow as
>> molasses. That suggests a configuration issue of some kind with R
>that I
>> might not be aware of (I am more experienced in R and usually don't
>write
>> code that requires resources like that). I have played with my
>swappiness
>> and the effect seems to be minimal. Can anyone suggest something else
>that
>> could be going on? I have considered trying to run it directly on a
>unix
>> server, but the code has a lot of third-party dependencies that would
>be a
>> bit of work to set up for simple troubleshooting. And naturally I'd
>prefer
>> that R be configured correctly in the event that I need to locally
>run
>> something more intense in the future.
>>
>>  Thanks in advance for any advice you can give. This message has been
>> cross-posted omn the ubuntu forums.
>>
>> -R
>>
>>         [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list