Skip to content

how much memory? was: R does in memory analysis only?

2 messages · Samuelson, Frank*, Douglas Bates

#
Is there a way to tell how much memory the computer
running R has?

-Frank


-----Original Message-----
From: David Smith [mailto:dsmith at insightful.com] 
Sent: Monday, February 09, 2004 1:32 PM
To: Ross Boylan
Cc: r-help
Subject: RE: [R] R does in memory analysis only?


Ross Boylan writes:
S-PLUS, like R, does its computations in-memory. So you're limited to
solving
problems which can fit in the available RAM (plus available swap space).
The
OS may impose additional limits (e.g. 2GB of total address space on many
Windows systems).

However, Insightful Miner, which works with S-PLUS, does include algorithms
which can process data sets out of memory. This includes the ability to
perform regressions on data sets much larger than the available RAM (the
only
limit is the availability of disk space to store the results).  You can also
link S-PLUS with Insightful to perform out-of-memory calculations using
S-PLUS functions.  This works especially well with operations like
predicting
from a model, which can be performed on a row-by-row basis.

I wrote a long discussion about in-memory and out-of-memory algorithms in
the
context of S-PLUS and Insightful Miner, which you can download from:

http://www.insightful.com/support/whitepaper_download.asp

# David Smith
#
"Samuelson, Frank*" <FWS4 at CDRH.FDA.GOV> writes:
Most Linux distributions have a program called 'free' that reports on
the total amount of memory available and the amount used for different
purposes.  From within R you could use
total       used       free     shared    buffers     cached
Mem:       1552072    1462044      90028          0     176892     922176
-/+ buffers/cache:     362976    1189096
Swap:      1951888      12360    1939528

which shows that the total amount of memory on this machine is 1.5 GB,
of which about 1.2 GB is available if needed.

Another method in Linux (depending on your kernel) is
total:    used:    free:  shared: buffers:  cached:
Mem:  1589321728 1497116672 92205056        0 181149696 945790976
Swap: 1998733312 12656640 1986076672
MemTotal:      1552072 kB
MemFree:         90044 kB
MemShared:           0 kB
Buffers:        176904 kB
Cached:         922172 kB
SwapCached:       1452 kB
Active:         664200 kB
Inactive:       543492 kB
HighTotal:      655344 kB
HighFree:        10372 kB
LowTotal:       896728 kB
LowFree:         79672 kB
SwapTotal:     1951888 kB
SwapFree:      1939528 kB