Nathan Stephens
2010-Jan-19 14:58 UTC
[R] Server hanging despite efforts to correct memory limits
My group is working with datasets between 100 Mb and 1 GB in size, using multiple log ins. From the documentation, it appears that vsize is limited to 2^30-1, which tends to prove too restrictive for our use. When we drop that restriction (set vsize = NA) we end up hanging the server, which requires a restart. Is there any way to increase the memory limits on R while keeping our jobs from hanging? Having to restart the server is a major inconvenience, second only to memory limitations in R.> mem.limits()nsize vsize 100000000 NA> mem.limits(vsize=2^30)nsize vsize 100000000 1073741824> mem.limits(vsize=2^31)nsize vsize 100000000 1073741824 Warning message: In structure(.Internal(mem. limits(as.integer(nsize), as.integer(vsize))), : NAs introduced by coercion [[alternative HTML version deleted]]
I am running into a separate, but related issue. On Linux, one may impose memory limits via the --max-vsize, --max-nsize, and --max-ppsize arguments upon starting R. I do not know if similar arguments are available on Windows. HTH -- View this message in context: http://n4.nabble.com/Server-hanging-despite-efforts-to-correct-memory-limits-tp1017618p1017654.html Sent from the R help mailing list archive at Nabble.com.
Thomas Lumley
2010-Jan-19 16:05 UTC
[R] Server hanging despite efforts to correct memory limits
You should be able to set limits on memory use for a process in the operating
system, eg with limits or ulimits under Unix-alike shells.
-thomas
On Tue, 19 Jan 2010, Nathan Stephens wrote:
> My group is working with datasets between 100 Mb and 1 GB in size, using
> multiple log ins. From the documentation, it appears that vsize is limited
> to 2^30-1, which tends to prove too restrictive for our use. When we drop
> that restriction (set vsize = NA) we end up hanging the server, which
> requires a restart. Is there any way to increase the memory limits on R
> while keeping our jobs from hanging? Having to restart the server is a
> major inconvenience, second only to memory limitations in R.
>
>> mem.limits()
> nsize vsize
> 100000000 NA
>
>> mem.limits(vsize=2^30)
> nsize vsize
> 100000000 1073741824
>
>> mem.limits(vsize=2^31)
> nsize vsize
> 100000000 1073741824
> Warning message:
> In structure(.Internal(mem.
> limits(as.integer(nsize), as.integer(vsize))), :
> NAs introduced by coercion
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>
Thomas Lumley Assoc. Professor, Biostatistics
tlumley at u.washington.edu University of Washington, Seattle