Skip to content

Minumum memory requirements to run R.

9 messages · Kjetil Halvorsen, Brian Ripley, Hin-Tak Leung +1 more

#
Quite a while back we set the goal of running R in 16Mb RAM, as people (I 
think Kjetil) had teaching labs that small.

Since then R has grown, and we has recently started to optimize R for 
speed rather than size.  I recently tested R-devel on my ancient Win98 
notebook with 64Mb RAM -- it ran but startup was rather slow on what I 
think is a 233MHz processor and very slow disc.

R still runs in 16Mb, but that is getting tight.  Does anyone have any 
need to run on a smaller machine than my 64Mb notebook?
2 days later
#
Prof Brian Ripley wrote:
It's a while since I actually har R used on such small machines, I think
64 MB is quite acceptable now.

Kjetil
2 days later
#
Kjetil Brinchmann Halvorsen wrote:
May I add another note to this - I recently upgraded to 64-bits (AMD 
opteron) and noticed the memory foot print of R has shot up. Just 
starting R takes up 90+MB virtual. There are correponding increases with 
Python and Perl as well; I suspect R suffers a bit on 64-bit
platform due to extensive use of pointers internally. The fundamental
unit in R, SEXP, is 6 pointers + 1 int, (and another
pointer for itself). So I would probably say 64MB is questionable on 
64-bit, but then probably nobody is stupid enough to do that...

For those who want to investigate the equivalent in Perl, the equivalent 
perl headers corresponding to "R/include/Rinternals.h" is located at
the "-I" flags of the output of:

perl -MExtUtils::Embed -e ccopts

(no idea where python stores its stuff...)

Hin-Tak Leung
#
On Mon, 23 Jan 2006, Hin-Tak Leung wrote:

            
That's a different question.  I said RAM, you quote virtual.  I am 
suprised at your figure though, as I am used to seeing 40-50Mb virtual at 
startup on an Opteron.

The distinction is important: even those small Windows machines had 100s 
of Mb of virtual memory available, it was RAM that was in short supply.
We know: we even document it in the appropriate places.

Some of us were running 64-bit R last century on machines with 128Mb (and 
others with much more, of course).  When I tried in 1997, Solaris would 
not run in 64-bit mode with 64Mb RAM (which then cost ?1000 or so).
#
Prof Brian Ripley wrote:
<snipped>
I am somewhat surprised by it as well. But there is nothing unusual 
about the build - it is just rebuilding the rpm on CRAN on a FC4 system
with everything as shipped, and should be quite reproducible.
I'll probably have a better look in time.

"R --vanilla" doesn't improve. Still 90+ MB virtual, 20+MB resident.
Yes and no. Virtual means it will possibly be used - and it is a big 
gray scale between unresponsible/intolerably-slow and slow.
I went and have a look - it is the last section of R-admin (and of 
course, for those who "read the source", R/include/Rinternals.h). It 
would be good to mention this in the FAQ (which it doesn't, or maybe I 
didn't look hard enough), or the beginning of R-admin?
#
On Mon, 23 Jan 2006, Hin-Tak Leung wrote:

            
It's not in the FAQ because it isn't a FAQ (yet).

If you use the PDF manual it is in the table of contents on page i.

In the HTML manual it is admittedly less clear: there isn't a table of 
contents and there is nothing obvious in the index. To some extent this is 
a problem with all the manuals. The structure in the .texi file isn't 
translated well to HTML form by the makeinfo tools.

 	-thomas
#
On Mon, 23 Jan 2006, Thomas Lumley wrote:

            
[About Ncell sizes on 64-bit platforms.]
In my build there is a chapter in the HTML manual

 	Choosing between 32- and 64-bit builds

in the top-level contents, and the information is in there.

It is also in ?Memory (a fairly obvious place).  It may be elsewhere, but 
those are the most obvious places to me.
#
Prof Brian Ripley wrote:
<snipped>
<snipped>
Maybe the one on CRAN needs fixing...
http://cran.r-project.org/doc/manuals/R-admin.html
I don't want to be argumentative, but the perpective of "obvious"
can often be quite different from one of the authors versus one of
the users...

The 32-bit/64-bit issue affects purchasing or upgrading decisions
- whether one wants to spend the money on buying cheaper
32-bit machines, versus more expensive 64-bit machines. That
decision would be based on information available while *not* having
an operational R installation...

Regards,
Hin-Tak Leung
#
On Mon, 23 Jan 2006, Hin-Tak Leung wrote:
Not necessarily. It's perfectly feasible to use a 32-bit build on a 64-bit 
machine, as it says in the manual, which is available from 
http://www.r-project.org whether or not you have an R installation.

 	-thomas