[英]Why can't I set the memory.limit in R x64 above 4GB?
I can't increase my memory limit above approx 4GB in R (Windows 10).我无法在 R (Windows 10) 中将 memory 限制增加到大约 4GB 以上。 I have 128 GB of RAM.
我有 128 GB 的内存。 I've heard there's a bug in R studio, so I went directly into the R console.
听说R studio有bug,所以直接进入R控制台。 It's still not working.
它仍然无法正常工作。 Ideas?
想法?
memory.size()
[1] 4135.24
memory.size(max=TRUE)
[1] 4196.69
memory.limit(size=128000)
[1] 130980
Warning message:
In memory.limit(size = 128000) : cannot decrease memory limit: ignored
And...FYI:还有……仅供参考:
sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)
Thanks!谢谢!
I realize this question is rather old, but as I don't see an answer to the question...我意识到这个问题已经很老了,但是因为我没有看到问题的答案......
To increase your memory limit, specify a number greater than the value returned by要增加您的 memory 限制,请指定一个大于返回值的数字
memory.limit(max = NA)
for the size
argument in memory.limit()
, eg,对于
memory.limit()
中的size
参数,例如,
memory.limit(size = 133120)
memory.limit(size = 128000)
returns an error because your system's memory limit is already greater than 128000. Your current limit is 130980, the value returned by memory.limit()
. memory.limit(size = 128000)
返回错误,因为您系统的 memory 限制已经大于 128000。您当前的限制是 130980,即memory.limit()
返回的值。
To see your current memory limit, run:要查看当前的 memory 限制,请运行:
memory.limit(max = NA)
memory.size(max = TRUE)
returns a relatively small value because it returns "the maximum amount of memory obtained from the OS," rather than your memory limit (see https://www.rdocumentation.org/packages/utils/versions/3.6.2/topics/memory.size ). memory.size(max = TRUE)
返回一个相对较小的值,因为它返回“从操作系统获得的最大数量 memory”,而不是您的 memory 限制(参见https://www.rdocumentation.org/packages/utils/versions /3.6.2/topics/memory.size )。 (Whether that max is in the current session, ever, the current R version... I don't know.) (那个 max 是否在当前的 session 中,曾经,当前的 R 版本中……我不知道。)
For comparison, on R with ~8 GB memory limit:为了比较,在 R 上有 ~8 GB memory 限制:
memory.size()
#> [1] 50.7
memory.size(max = TRUE)
#> [1] 52
memory.limit(size = 1)
#> Warning in memory.limit(size = 1): cannot decrease memory limit: ignored
#> [1] 8042
memory.size(max = NA)
#> [1] 8042.05
Created on 2022-03-20 by the reprex package (v2.0.0)由reprex package (v2.0.0) 创建于 2022-03-20
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.