[R-sig-Debian] R memory allocation in Linux

Tyler Smith tyler.smith at eku.edu
Wed Nov 10 17:14:15 CET 2010


ricardo souza <ricsouzabh at yahoo.com.br> writes:

> The only thing that is very strange for me is how the performance of
> MAC is much better to allocate memory than linux and windows both
> 32bit.

As far as I understand it, this is not true. Windows places more
restrictions on memory use than Linux, but I don't know about Macs.

> I am using a OS linux 32 with a windows partition.  I believe that is
> the problem. 

I disagree. The windows partition has no effect on how much memory is
available, and I can use more than 2GB of RAM in R on Debian here. If
what you mean to say is you can complete an analysis in Windows but not
in Linux on the same machine, then you may have the wrong kernel
installed for Linux.

>  R just understand that I have 2Gb of Ram, although I have 4 Gb
> available.  Is that true?  Somebody else have this problem before?
>

It is possible that you are using a kernel that doesn't use all of your
memory. You can check how much memory the system can use by running the
command 'top' from the command line. Towards the top of the screen
you'll see an entry Mem: NNNNNNNN total. If NNNNNNN isn't close to the
number you expect (i.e., 4GB or approx. 4000000 kb), then you need a
different kernel. 

This was an issue for me with Debian testing and the 486 kernels a year
or two back. I think the 686 kernels all recognize 4GB of RAM now. I'm
using 2.6.32-5-686 here and I have access to 3GB of RAM. For 4GB you
might need the 686-bigmem kernel. All are available through your package
manager.

HTH,

Tyler

ps, just noticed that this was cross-posted to r.geo. I don't follow
that list, but OS-specific questions like this are almost certainly
off-topic there.



More information about the R-SIG-Debian mailing list