[R] Powerful PC to run R

Spencer Graves spencer.graves at structuremonitoring.com
Sun May 15 18:31:55 CEST 2011


Also:  A previous post in this tread suggested "Rprof" [sec. 3.2 in 
"Writing R Extensions", available via help.start()]. This should 
identify the functions that consume the most time.  The standard 
procedure to improve speed is as follows:


       1.  Experiment with different ways of computing the same thing in 
R.  In many cases, this can help you reduce the compute time by a factor 
of 10 or even 1,000 or more.  Try this, perhaps using proc.time and 
system.time with portions of your code, the rerun Rprof.


       2.  After you feel you have done the best you can with R, you 
might try coding the most compute intensive portion of the algorithm in 
a compiled language like C, C++ or Fortran.  Then rerun Rprof, etc.


       3.  After trying (or not) compiled code, it may be appropriate to 
consider "CRAN Task View: High-Performance and Parallel Computing with 
R".  (From a CRAN mirror, select "Task Views" -> 
"HighPerformanceComputing:  High-Performance and Parallel Computing with 
R".)  You may also want to try the "foreach" package from Revolution 
Computing (revolutionanalytics.com).  These capabilities can help you 
get the most out of a multi-core computer.  NOTE:  While your code is 
running, you can check the "Performance" tab in Windows Task Manager to 
see what percent of your CPUs and physical memory you are using.  I 
mention this, because without "foreach" you might get at most 1 of your 
4 CPUs running R.  With "foreach", you might be able to get all of them 
working for you.  Then after you have done this and satisfied yourself 
that you've done the best you can with all of this, I suggest you try 
the Amazon Cloud.


       If you have not already solved your problem with this and have 
not yet tried these three steps, I suggest you try this.  It may take 
more of your time, but you will likely learn much that will help you in 
the future as well as help you make a better choice of a new computer if 
you ultimately decide to do that.


       Hope this helps.
       Spencer


On 5/15/2011 8:28 AM, Gabor Grothendieck wrote:
> On Fri, May 13, 2011 at 6:38 AM, Michael Haenlein
> <haenlein at escpeurope.eu>  wrote:
>> I'm currently running R on my laptop -- a Lenovo Thinkpad X201 (Intel Core
>> i7 CPU, M620, 2.67 Ghz, 8 GB RAM). The problem is that some of my
>> calculations run for several days sometimes even weeks (mainly simulations
>> over a large parameter space). Depending on the external conditions, my
>> laptop sometimes shuts down due to overheating.
> If you are on Windows press the Windows key and type in Power Options.
>   When the associated dialog pops up choose Power Saver.  Now your PC
> will use less power so it won't heat up so much although your
> performance could suffer a bit.
>
> Also ensure that there is sufficient air circulation around the machine.


-- 
Spencer Graves, PE, PhD
President and Chief Operating Officer
Structure Inspection and Monitoring, Inc.
751 Emerson Ct.
San José, CA 95126
ph:  408-655-4567



More information about the R-help mailing list