Dear Jonathan,

It is not small,  I passed the wrong information.  I am running a geostatistic analysis with geoR that is computational intense. At the end my analysis I call the function krige.control and krige.conv.  However, what call my attention is that I have a friend that was able to run the same code with his MAC 5 years old (OS 32 with 4 Gb of memory).  Reading several email list I discovered that MAC has better library than repository in linux, but we can in increase the memory allocation in linux.  I do not know how....

Below is the memory allocation for a MAC 32 of 4 Gb Ran.  I know that it depends of the machine but it is far way better than in linux.  Why?  How to improve it in linux?

Memory allocation in a laptop 4 years old MAC:
> gc()

used             (Mb) gc              trigger       ( Mb)      max used       (Mb)
Ncells       481875 25.8         984024         52.6         984024           52.6
Vcells       481512  3.7       140511341      1072.1    641928461     4897.6

Memory allocation in a new laptop Linux 4Gb 32 Ubuntu:

>gc()
      used (Mb) gc trigger (Mb) max   used (Mb)
Ncells 170934  4.6     350000  9.4   350000  9.4
Vcells 195920  1.5     786432  6.0   781384  6.0

Thanks for your attention,
Ricardo
De: Jonathan P Daily <jdaily@usgs.gov>
Assunto: Re: [R] improve R memory under linux
Para: "ricardo souza" <ricsouzabh@yahoo.com.br>
Cc: r-help@r-project.org, r-help-bounces@r-project.org
Data: Sexta-feira, 5 de Novembro de 2010, 13:36



A "very small script" should
fit just fine in an email: what are you trying to do?



Likely, you are assigning many small
variables in some loop. Even if you have 4GB of RAM available, if R assigns
3.99 GB of it and then then a call comes in to assign something of size
.02, it will tell you it can't allocate an object of size .02.

--------------------------------------

Jonathan P. Daily

Technician - USGS Leetown Science Center

11649 Leetown Road

Kearneysville WV, 25430

(304) 724-4480

"Is the room still a room when its empty? Does the room,

 the thing itself have purpose? Or do we, what's the word... imbue it."

     - Jubal Early, Firefly








From:


To:
r-help@r-project.org

Date:
11/05/2010 11:29 AM

Subject:
[R] improve R memory under linux

Sent by:
r-help-bounces@r-project.org








Dear all,



I am using ubuntu linux 32 with 4 Gb.  I am running a very small script
and I always got the same error message:  CAN NOT ALLOCATE A VECTOR
OF SIZE 231.8 Mb.



I have reading carefully the instruction in ?Memory.  Using the function
gc() I got very low numbers of memory (please sea below).  I know
that it has been posted several times at r-help (http://tolstoy.newcastle.edu.au/R/help/05/06/7565.html#7627qlink2). 
However I did not find yet the solution to improve my memory issue in Linux. 
Somebody cold please give some instruction how to improve my memory under
linux? 



> gc()

         used (Mb) gc trigger (Mb)
max used (Mb)

Ncells 170934  4.6     350000  9.4  
350000  9.4

Vcells 195920  1.5     786432  6.0  
781384  6.0



INCREASING THE R MEMORY FOLLOWING THE INSTRUCTION IN  ?Memory



I started R with:



R --min-vsize=10M --max-vsize=4G --min-nsize=500k --max-nsize=900M

> gc()

         used (Mb) gc trigger (Mb)
limit (Mb) max used (Mb)

Ncells 130433  3.5     500000 13.4     
25200   500000 13.4

Vcells  81138  0.7    1310720 10.0        
NA   499143  3.9



It increased but not so much! 



Please, please let me know.  I have read all r-help about this matter,
[[elided Yahoo spam]]



Ricardo





      

                
[[alternative HTML version deleted]]



______________________________________________

R-help@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.








      
	[[alternative HTML version deleted]]

