Notebook startup actions

Post author
Alisa Manning

What are the "behind the scenes" actions that occur when I start up an R kernel in a Terra Notebook? For instance, when I started an R notebook today, objects were automatically loaded into memory -- from a previous day's work, perhaps? I didn't want this behavior and even when I restarted the R kernel & cleared output, I had to wait several minutes to be able to start working.

 

Comments

3 comments

  • Comment author
    Sushma Chaluvadi

    Hi Alisa -

    Here are the general steps of what happens when you start a new cluster

    1. A virtual machine is created if you are creating a NEW cluster

    2. A docker container is started within the virtual machine that was initiated. This docker container contains the core software that your notebook will need.

    3. The ipynb notebook is localized to the virtual machine so that you can access it.

    4. The Notebook is opened in the jupyter Kernel.

     

    If you are not creating a new cluster, the virtual machine persists and it will contain objects that were perhaps generated as output from the notebook you were working.

     

    Here is a document that explains in further detail each step of the background processes of a Notebook! Hope this helps but please let us know if you have any further questions.

     

     

    0
  • Comment author
    Alisa Manning

    Thanks! This is very helpful. The missing piece is what happens when you re-start a paused cluster and re-connect to a Notebook. Does the R environment get saved to an object at 'cluster pause' and reloaded when the kernel restarts?

    0
  • Comment author
    Sushma Chaluvadi

    Alisa,

    You keep everything that’s persisted to disk — e.g. installed packages, saved files, etc. You lose everything in memory in the kernel — e.g. variable assignments, etc. We don’t persist kernel state on the cluster so the R environment does not get saved and reloaded.

     

    0

Please sign in to leave a comment.