gc() and rm(list=ls()) and restarting doesn't clear memory

爱⌒轻易说出口 提交于 2020-12-09 06:35:15

问题


I was doing data wrangling with Rstudio, and while I was doing something with a very large dataset, the process died. I restarted the computer, but ever since Rstudio has not been responsive or slow due to memory limits (currently, it's occupying 8gb of my 16gb RAM).

I tried doing all the standard things I found on Stackoverflow.

  1. gc() and gc(reset=T)
  2. rm(list = ls())
  3. .rs.restartR()
  4. Restart my computer.

But when I open Rstudio, the memory usage would quickly climb and make the entire thing unresponsive. Has anyone faced anything similar?

I am using Windows 10, R 3.4.1, Rstudio 1.0.153. gc(result = T) output results in

Ncells 1311025 70.1    2164898 115.7  1311025 70.1
Vcells 2368039 18.1    3851194  29.4  2368039 18.1

I've never had such a problem and now I'm baffled as to why memory is not being released. Does anybody have some advice?

  • Added 11:03am: I deleted .RHistory (plus, there was no .Rdata), and unchecked all autoloading global options. The problem is still persisting, with occasional error messages of "Error: Unable to establish connection with R session" when I try reloading.

来源:https://stackoverflow.com/questions/46530832/gc-and-rmlist-ls-and-restarting-doesnt-clear-memory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!