[R] predicting memory usage

Moshe Olshansky m_olshansky at yahoo.com
Tue Feb 19 03:41:22 CET 2008


If your numbers are not integers then they are double
precision which means 8 bytes per number. In such a
case you will need 86000*2500*8 = 1.7Gb of memory
(plus a small amount for book keeping). You will need
more (and sometimes much more) if you intend to do
some operations on your arrays). So you probably will
need a 64 bit machine with enough RAM.
Integer arrays will take 4 bytes per entry, so about
half that amount.

Regards,

Moshe.

--- Federico Calboli <f.calboli at imperial.ac.uk> wrote:

> Hi All,
> 
> is there a way of predicting memory usage?
> 
> I need to build an array of 86000 by 2500 numbers
> (or I might create  
> a list of 2 by 2500 arrays 43000 long). How much
> memory should I  
> expect to use/need?
> 
> Cheers,
> 
> Fede
> 
> --
> Federico C. F. Calboli
> Department of Epidemiology and Public Health
> Imperial College, St. Mary's Campus
> Norfolk Place, London W2 1PG
> 
> Tel +44 (0)20 75941602   Fax +44 (0)20 75943193
> 
> f.calboli [.a.t] imperial.ac.uk
> f.calboli [.a.t] gmail.com
> 
> ______________________________________________
> 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