Skip to content

The interface is super slow #35

Open

Description

@Smahane

Hello Vanessa,

I installed Tunel and I was able to lunch the GUI interface. But everything is super slow to the point that it's not usable. Any idea what I could be missing? Clicking any button takes more than 2 min to load.

Thanks

Activity

  1. vsoch commented on Jun 22, 2018

    @vsoch
    Member

    What is the context where you are running it? It is likely related to that. Are you running on your host or from a forwarded display?

  2. Smahane commented on Jun 22, 2018

    @Smahane
    Author

    Connected via VNC and running on the host. everything is local on a Fedora system

  3. vsoch commented on Jun 22, 2018

    @vsoch
    Member

    can you take a look at how much memory your system is using / has free? One idea is that you are running out.

  4. Smahane commented on Jun 22, 2018

    @Smahane
    Author

    How much memory does it need? I have plenty i believe:
    image

  5. vsoch commented on Jun 22, 2018

    @vsoch
    Member

    when you look at the container logs, is there anything iffy? Use docker ps to get the id, then to see the logs:

    docker logs <containerid>
  6. Smahane commented on Jun 22, 2018

    @Smahane
    Author

    If looks like there are exceptions due to socket connections. Is it due to python version?
    Please see the log attached.
    docker.log

  7. vsoch commented on Jun 22, 2018

    @vsoch
    Member

    Are you finding the slowness universal, or just for container pulling? The version of python inside the container should be consistent with the one I used (and built into the container) and it looks like there was a timeout on the pull operation. This might either be because:

    • the container doesn't exist (so the pull times out)
    • something about the pull prevents it from updating the interface.

    First let's test the pull - here is how to shell interactively into a container instance. I created a new container, but you could also use your container's id with an exec.

    $ docker run -it --entrypoint bash vanessa/tunel
    (base) root@5f0703495feb:/code# which python 
    /opt/conda/bin/python
    (base) root@5f0703495feb:/code# python --version
    Python 3.6.4 :: Anaconda, Inc.
    (base) root@5f0703495feb:/code# 

    And notice above the python version is consistent with yours. Could you share the container you are trying to pull, and where it is from, to get us started?

  8. changed the title [-]The interface is supper slow[/-] [+]The interface is super slow[/+] on Jun 22, 2018
  9. Smahane commented on Jun 22, 2018

    @Smahane
    Author

    Here is the container i was trying to pull:
    https://www.singularity-hub.org/collections/783
    The slowness is universal. Everything takes too long to load including loading the webpage itself from the start.
    I will try the rest of your suggestions very soon. Thank you for being responsive

  10. Smahane commented on Jun 25, 2018

    @Smahane
    Author

    So my system's python version is pretty much similar to the container version. I also tried both firefox and chrome. 5 min and the main page is not even loading. Any other ideas please?

    bash-4.4$ python --version
    Python 3.6.5 :: Anaconda, Inc.
    bash-4.4$ docker run -it --entrypoint bash vanessa/tunel
    (base) root@2f06e77b7af6:/code# python --version
    Python 3.6.4 :: Anaconda, Inc.
    

    image

    Thank you,

  11. vsoch commented on Jun 25, 2018

    @vsoch
    Member

    I would try doing a pull from a command line to compare the time. It could also be that you pulled huge images into the Docker container and it's straining system resources, or something like that. Sorry, I can't guess much more than that because I can't reproduce your error - it doesn't work slowly for me.

  12. Smahane commented on Jun 25, 2018

    @Smahane
    Author

    The slowness is before getting to the UI or doing anything (loading the home page, clicking a button...) It's not due to the pull. Pulling this image takes 2 seconds via command line.

  13. vsoch commented on Jun 25, 2018

    @vsoch
    Member

    I mean the pull within the interface using the tool. When you pull a container in the interface (when it's running) the image goes into the running container...

  14. vsoch commented on Jun 25, 2018

    @vsoch
    Member

    You never looked at logs for the container? That would be a logical first step.

  15. vsoch commented on Jun 25, 2018

    @vsoch
    Member

    This is an issue with Singularity, or the pull itself. Look at the log:

    Traceback (most recent call last):
      File "/usr/local/libexec/singularity/python/import.py", line 109, in <module>
        main()
      File "/usr/local/libexec/singularity/python/import.py", line 86, in main
        layerfile=LAYERFILE)
      File "/usr/local/libexec/singularity/python/docker/main.py", line 85, in IMPORT
        client = DockerApiConnection(image=image, auth=auth)
      File "/usr/local/libexec/singularity/python/docker/api.py", line 92, in __init__
        self.load_image(kwargs['image'])
      File "/usr/local/libexec/singularity/python/docker/api.py", line 146, in load_image
        self.update_token()
      File "/usr/local/libexec/singularity/python/docker/api.py", line 191, in update_token
        response = self.get_tags(return_response=True)
      File "/usr/local/libexec/singularity/python/docker/api.py", line 312, in get_tags
        return_response=return_response)
      File "/usr/local/libexec/singularity/python/base.py", line 288, in get
        return_response=return_response)
      File "/usr/local/libexec/singularity/python/base.py", line 304, in submit_request
        response = safe_urlopen(request)
      File "/usr/local/libexec/singularity/python/base.py", line 152, in safe_urlopen
        return opener.open(url, data=data)
      File "/opt/conda/lib/python3.6/urllib/request.py", line 526, in open
        response = self._open(req, data)
      File "/opt/conda/lib/python3.6/urllib/request.py", line 544, in _open
        '_open', req)
      File "/opt/conda/lib/python3.6/urllib/request.py", line 504, in _call_chain
        result = func(*args)
      File "/opt/conda/lib/python3.6/urllib/request.py", line 1361, in https_open
        context=self._context, check_hostname=self._check_hostname)
      File "/opt/conda/lib/python3.6/urllib/request.py", line 1320, in do_open
        raise URLError(err)
    urllib.error.URLError: <urlopen error [Errno 110] Connection timed out>
    ERROR: pulling container failed!

    Try shelling into the container and pulling the container from the command line.

  16. vsoch commented on Jun 25, 2018

    @vsoch
    Member

    What we can try (and it would be helpful if you might) is to install singularity 5.1 (or the latest) in the container (and remove the older version first). If that works for you, I will rebuild tunel and provide it on Docker Hub!

  17. Smahane commented on Jun 25, 2018

    @Smahane
    Author

    I did look at the log and here is the one from today where i only opened the page and clicked a button. It doesn't have any errors that are obvious to the slowness.
    docker (1).log

    Sure i will try that. I assume installing singularity inside the docker container is similar to working inside singularity container? I'm not familiar with docker. I will give it a try

  18. vsoch commented on Jun 25, 2018

    @vsoch
    Member

    It could be the bind (see here moby/moby#21485) could you try stopping, removing, and creating a container without binding any volume? I'm sure that this is a Docker issue, logically there is no reason the web interface would be slow - it's Flask with gunicorn (meaning several workers).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions