If I am buying a PC where the most compute intensive task will be running R and I do not have unlimited resources what trade-offs should I make? Specifically should I go for 1 - more memory, or 2 - faster processor, or 3 - something else? If it makes a difference I shall be running Windows on it and I am thinking about getting a portable which I understand makes upgrading more difficult. Extra background: the tasks I notice going slowly at the moment are fitting models with lme which have complex random effects and bootstrapping. By the standards of r-help posters I have small datasets (few thousand cases, few hundred variables). In order to facilitate working with colleagues I need to stick with windows even if linux would be more efficient Michael Dewey med at aghmed.fsnet.co.uk http://www.aghmed.fsnet.co.uk/home.html
On Windows, I find that having as much memory as I can possibly afford makes a real difference with R. Since I always end up having larger datasets/problems then I thought I'd have. My general strategy is to maximize the amount of memory first -- if that doesn't work, then think about getting a faster processor. -roger Michael Dewey wrote:> If I am buying a PC where the most compute intensive task will be > running R and I do not have unlimited resources what trade-offs should > I make? > Specifically should I go for > 1 - more memory, or > 2 - faster processor, or > 3 - something else? > If it makes a difference I shall be running Windows on it and I am > thinking about getting a portable which I understand makes upgrading > more difficult. > > Extra background: the tasks I notice going slowly at the moment are > fitting models with lme which have complex random effects and > bootstrapping. By the standards of r-help posters I have small > datasets (few thousand cases, few hundred variables). In order to > facilitate working with colleagues I need to stick with windows even > if linux would be more efficient > > > Michael Dewey > med at aghmed.fsnet.co.uk > http://www.aghmed.fsnet.co.uk/home.html > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help >
If you are running Windows, do you have the Performance Monitor running?
This will help identify the reasons that programs are running slow. Most
likely, you are low on memory and are paging a lot. I alway have it
running and when I am running a large R script, if I am not using 100% of
the CPU, then I must be paging (assuming that I am not reading in my data).
You can also sprinkle the following function throughout your code to see
how much CPU and memory you are using. I bracket all my major
computational sections with it:
my.stats <- function(text = "stats")
{
cat(text, "-",sys.call(sys.parent())[[1]], ":",
proc.time()[1:3], " :
", round(
memory.size()/2.^20., 1.), "MB\n")
invisible(flush.console())
}
This prints out a message like:
> my.stats('Begin Reading')
Begin Reading - my.stats : 5.61 3.77 22309.67 : 18.7 MB
This says that I have used 5.61 CPU seconds of 'user' time, 3.77 CPU
seconds of 'system' time and the R session has been running for 22309
seconds (I always have one waiting for simple calculation) and I have
18.7MB of memory allocated to objects.
My first choice is get as much memory on your machine as you can; 1GB since
this the most that R can use. I noticed a big difference in upgrading from
256M -> 512M. I also watch the Performance Monitor and when memory gets
low and I want to run a large job, I restart R. Most of my scripts are
setup to run R without saving any data in the .Rdata file. If I need to
save a large object, I do it explicitly since memory is key performance
limiting factor and Windows is not that good at freeing up memory after you
have used a lot of it.
A faster CPU will also help, but it would be the second choice, since if
you are paging, most of your time is spent on data transfer and not
computation.
__________________________________________________________
James Holtman "What is the problem you are trying to solve?"
Executive Consultant -- Office of Technology, Convergys
james.holtman at convergys.com
(513) 723-2929
Michael Dewey
<med at aghmed.fsnet.co. To: r-help at
stat.math.ethz.ch
uk> cc:
Sent by: Subject: [R] Specifying
suitable PC to run R
r-help-bounces at stat.m
ath.ethz.ch
10/09/2003 14:04
If I am buying a PC where the most compute intensive task will be running R
and I do not have unlimited resources what trade-offs should I make?
Specifically should I go for
1 - more memory, or
2 - faster processor, or
3 - something else?
If it makes a difference I shall be running Windows on it and I am thinking
about getting a portable which I understand makes upgrading more difficult.
Extra background: the tasks I notice going slowly at the moment are fitting
models with lme which have complex random effects and bootstrapping. By the
standards of r-help posters I have small datasets (few thousand cases, few
hundred variables). In order to facilitate working with colleagues I need
to stick with windows even if linux would be more efficient
Michael Dewey
med at aghmed.fsnet.co.uk
http://www.aghmed.fsnet.co.uk/home.html
______________________________________________
R-help at stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
--
"NOTICE: The information contained in this electronic mail ...{{dropped}}
On Thu, 9 Oct 2003 james.holtman at convergys.com wrote:> My first choice is get as much memory on your machine as you can; 1GB since > this the most that R can use.R can use up to 2Gb, but Windows is unlikely to give you that much -- 1.7Gb has been achieved (see the CHANGES file, I believe). -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Seemingly Similar Threads
- Upgrading R on my EEE PC netbook
- Writing my first CRAN vignette
- Comments please, how to set your mailer to read R-help in digest format
- generate random numbers from a multivariate distribution with specified correlation matrix
- Overlaying density plot on forest plot