Rstudio starts using diskspace when shutting down despite "No Save" which doesn't clear (also takes forever).

Hi!

When i try to shut down Rstudio (Version 1.2.1335) it starts saving some material into harddrive (sometimes 10-20gb) as i work with large objects, and also takes forever to close. I can see diskspace going down and down as its shutting down. Then usually once Rstudio closes, it clears up the space...HOWEVER this time it didn't.

Where the hell is it storing everything so i can erase it?

Thanks for the help!

Cheers,
ghaale

Hi @ghaale,
It sounds like R and RStudio is saving a .RData file when you quit the program. This file will be located in your working directory. Check if its there by running:

list.files(all.files=TRUE)

To turn off this default saving/loading behaviour you can change the RStudio "Tools>Global Options" settings like this:

HTH

Hi @DavoWW,

Thanks! So i did investigate the tempdir() path, nothing there....BUT thanks to that it reminded me that i did not check R-StudioIDE AppData folder, and i found it! As you can see, the CTX folder in R-Studio-Desktop is 25gb!

Thanks again for the support :slight_smile:

Cheers,
ghaale

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

Hi @ghaale,
Would be good if you post a stand-alone, simple script file that demonstrates this behavior. Are you deliberately writing files in this situation, or is it an unintended consequence?
If you think files are being written to R's temporary file directory, you can check this by looking here:

tempdir()
list.files(path=tempdir())

If you need to write HUGE files to disk, check out some of the packages designed to do this as fast as possible: {readr}, {fst}, {vroom}, and {feather}.

HTH

Hi @DavoWW , thanks for the reply!

Good advice, i have done that already, but it still doesn't solve the mystery of why even it was doing that though i click "No", and more importantly, where the heck it stores things. Its not stored in the working directory or ~/ , where the hell is it storing these huge temp files?

Cheers,
Gammy