Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R Studio console slowdown #375

Closed
StephenSc84 opened this issue Feb 5, 2020 · 6 comments
Closed

R Studio console slowdown #375

StephenSc84 opened this issue Feb 5, 2020 · 6 comments

Comments

@StephenSc84
Copy link

Hi,

I like to report a R Studio console slowdown issue with rocker/rstudio containers.

We have been using rocker/rstudio Docker containers, and recently a few people have complained that their browser-based R Studio session has become really slow. This is usually after a session has been running and used for a while.

I was able to reproduce this issue reliably by launching a new container and installing the Seurat package (i.e. install.packages("Seurat"). This is a long installation process, and returns many lines into the R Studio console. After the Seurat installation process, the console response time becomes really slow and almost unusable. Specifically, typing any characters in results in a 1-4 second delay, which is very frustrating for our users.

This is slowdown is reproducible when running rocker/rstudio across different VM's, both on-premise and in AWS.

Starting a new R Studio session seems to fix the issue temporarily, but the slowdown comes back after a few days. Clearing the R Studio console (i.e. Ctrl+L) seems to immediately restore the console response as well.

I like share this issue to see if anyone has seen the same issue, and whether there is anything we can do to avoid this in the future.

Thanks,
Stephen

p.s. here are some additional troubleshooting information:

which host OS you are using.
centos

which Docker container(s) you tried.
rocker/rstudio:3.6.1

what command you launched
docker run -d -ti -p ... -v $(pwd):/home/rstudio -v * -v * -e USER=rstudio -e PASSWORD=* -e USERID=$(id -u) -e GROUPID=* -e ROOT=TRUE -m 100g --cpus="6.0" --name * docker.io/rocker/rstudio:3.6.1

what you were expecting
the R Studio console is responsive to user input

which error you get
the R Studio console becomes unusable after a few days of usage

It's also nice if you can include:

The output of docker logs , where is the hash for your container. (Use docker ps to see a list of running containers)
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] add: executing...
Nothing additional to add
[cont-init.d] add: exited 0.
[cont-init.d] userconf: executing...
deleting user rstudio
creating new rstudio with UID *
useradd: warning: the home directory already exists.
Not copying any file from skel directory into it.
mkdir: cannot create directory ‘/home/rstudio’: File exists
Modifying primary group rstudio
Primary group ID is now custom_group *
Adding user rstudio' to group sudo' ...
Adding user rstudio to group sudo
Done.
rstudio added to sudoers
[cont-init.d] userconf: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.

The image id for the container you are using. For instance, docker images -q rocker/rstudio will display your current image id.
bc16a0b1d27d

The version of Docker that you are using.
1.13.1

The version of boot2docker if applicable (Mac/Windows).
N/A

@eddelbuettel
Copy link
Member

eddelbuettel commented Feb 5, 2020

Thanks for taking the time to provide a detailed report.

However, I am unsure how you expect us to help you. The issue, if any, appears to related to the Seurat which does indeed bring in a staggering amount of dependencies. Maybe the machine you are running this on is simply underpowered?

In short, I see no "design" or "engineering" or "production" issue on our side, i.e. anything that Rocker could change to help you.

@StephenSc84
Copy link
Author

StephenSc84 commented Feb 5, 2020

Thank you for the reply.

I should clarify, installing Seurat was a just proxy for me to reproduce this R Studio slowdown, which I believe is a more general issue. The users that originally encountered this same R Studio console slowdown issue were using R Studio "normally", and not installing Seurat.

Regarding the machine, I have tried this in multiple VM environments on our side, each of which have 8-16 cores and 100+ GB of RAM and are not currently in use, so I am not sure that this is an issue with limited resources on the machines we're using.

Also, our users that install and use R Studio directly on their VM's have never report this R Studio console slowdown.

My best guess at this point is some edge case issue with having a lot of lines in the R Studio console in rocker/rstudio and Docker, but yes it is also possible that this is a problem with our environment (although as I mentioned I have reproduced this in different VM configurations on our end).

At this point, with the workaround, this issue is not a significant problem for us when using Rocker (thank you by the way!). I just wanted to share this in case this turns out to be something addressable in Rocker, or to possibly track it down to a specific issue on our side.

Please let me know if I can provide any additional information.

@eddelbuettel
Copy link
Member

Without a minimally reproducible example, there is little we can do.

I happen to use Docker a lot too, but in short-lived bursty 'one cmd, one run' uses. So I won't be able to do much for you, but we can keep it open. Maybe you can help too by monitoring, tailing logs, whathaveyou. Some resource somewhere may be becoming unavailable. Now, assigning 'cause' is a little bit tricky.

@amoeba
Copy link

amoeba commented Feb 5, 2020

Hey @StephenSc84 and @eddelbuettel. I've experienced similar sluggishness when running non-containerized RStudio so I wonder if this isn't related to RStudio instead of rocker. Also, see rstudio/rstudio#6042 which sounds similar.

@eddelbuettel
Copy link
Member

I mentioned this in passing to a few friends and this is apparently a "well-known" and general RStudio issue that has nothing to do with how RStudio is running. The only known workarounds are a frequent use of Ctrl-L to redraw/refresh, and a restart.

So I suggest we close this bug report for Rocker here.

@StephenSc84
Copy link
Author

Thank you @amoeba @eddelbuettel! I guess it is "good" to hear that this is a known R Studio issue. Closing the issue now.

Thanks again for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants