问题
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.
gc()
andgc(reset=T)
rm(list = ls())
.rs.restartR()
- 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