Notebooks consume resources on the machines running in your ArcGIS Notebook Server site. Because these resources are limited, ArcGIS Notebook Server has administrative settings to restrict their usage.
ArcGIS Notebook Server uses containers—virtualized operating systems—to isolate each notebook author's environment. Containers allow each author to use a subset of your server resources without their work or resource use interfering with others. These containers are allocated and maintained by the Docker component running on your machine.
Each notebook author is allocated one container, which is opened when they open their first notebook. Only the notebook author can work in their container, and the computer resources they use in their container are isolated from other containers.
When the container opens, its virtual operating system and settings are configured through a container image. This is one of two container images you received from Esri.
Included with this container image is a notebook runtime, which is a collection of Python modules and dependencies. The contents of the runtime are available in each notebook that runs in the container.
The container image used depends on the notebook author's privileges in the portal as follows:
- Authors who've been granted the Create and Edit Notebooks privilege only have their container loaded with the Standard container image. The Standard notebook runtime for their notebooks includes ArcGIS API for Python and several hundred third-party Python libraries.
- Authors who've also been granted the Advanced Notebook privilege have their container loaded with the Advanced container image. The default notebook runtime for their notebooks is the Advanced runtime, which includes all modules from the Standard runtime along with ArcPy and its related libraries. They have the option to specify an individual notebook's runtime and can use either the Standard or the Advanced runtime in their notebooks.
By default, a container is allocated a certain amount of RAM and a certain number of CPU core shares. These default resource limits are determined by the runtime being run by the container as follows:
- The Standard runtime allots 1 CPU core and 4 GB of RAM per container.
- The Advanced runtime allots 2 CPU cores and 6 GB of RAM per container.
As an ArcGIS Notebook Server administrator, monitor the number of notebook authors working in your site and which runtime each is using. Depending on these factors, you may need or want to change the resource limits set for ArcGIS Notebook Server.
Configure resource limits for your ArcGIS Notebook Server site
In Windows deployments of ArcGIS Notebook Server, notebook containers are hosted on the machine within a Linux virtual machine (MobyLinuxVM) running in the Microsoft Hyper-V virtualization server. This Linux virtual machine governs the resource limits available for use by the containers.
![Windows ArcGIS Notebook Server architecture Windows ArcGIS Notebook Server architecture](GUID-8D6EF1D8-EE8E-439A-BA38-3A8C0E09B3D0-web.png)
Accordingly, you can use the Docker Desktop settings panel to limit the resources available to ArcGIS Notebook Server and the containers running in your server site.
- Right-click the Docker button in your Windows system tray and click Settings. From the settings menu, click Resources > Advanced.
- You will see options that you can use to change the following settings:
- CPUs—The number of CPU cores available to containers on your machine. By default, this is set to two cores. You can update this value depending on the resources available on the machine and the CPU limits set for the notebook runtimes.
- Memory—The amount of memory available to containers on your machine. By default this is set to 2 GB. Increase this to a minimum of 6 GB. You may want to increase this, depending on the resources available on the machine and the memory limits set for the notebook runtimes.
- Swap—The amount of disk space that containers can use for memory if the above limit is reached.
- Disk image size—The size of the disk image. Review and update this value as needed if installing Docker container images for Notebooks results in an out-of-disk-space error.
- Disk image location— The directory where containers and images are stored.
Note:
Revisit this step anytime you make updates to CPU or memory resources configured for notebook runtimes. - When you're satisfied with the resource limits you've set, click Apply.
Update the resources used by each runtime
As an administrator, you can update the maximum CPU and memory that's available per container by changing the resources that each notebook runtime uses by default. If there are multiple users authoring notebooks concurrently, you can monitor your site's usage and adjust these settings as necessary using ArcGIS Notebook Server Manager.
- Sign in to your ArcGIS Enterprise portal as an administrator and open ArcGIS Notebook Server Manager.
- Open the Settings page and click Runtimes.
- Select the runtime with the resource limits you want to update, and click the Edit icon.
- Update the Max CPU (in cores) and/or Max Memory (in GB) values for the runtime.
- Click Save to confirm the update.
Monitor your running containers
Because each container in your ArcGIS Notebook Server site uses computing resources while running, you should regularly monitor the active containers in your site and their level of activity. You can use resources in the ArcGIS Notebook Server Administrator Directory to view information about your site's running containers and notebooks.
Tip:
For a quick view of each container, you can also use ArcGIS Notebook Server Manager.
Note:
There is a known failure when accessing container statistics through the ArcGIS Notebook Server Administrator Directory or Manager. You can use the docker stats command from a command line window on your Notebook Server machine to get Docker container statistics. For more information, see the Docker documentation.
If a running container has not been used recently, or if you know its owner has completed their work with notebooks, you can use the directory to terminate the container. Doing so will not delete the notebook portal items and does not prevent the portal member from opening a new container. The terminated container will no longer consume memory or CPU.
- Sign in to the ArcGIS Notebook Server Administrator Directory. The URL is formatted https://notebookserver.domain.com:11443/arcgis/admin.
- Browse to system > containers.
The containers resource page lists each running container, with the user name of the portal member who owns the container shown in parentheses.
- Click a container link to open its information resource.
On the container's resource page, you can view information about it.
- Click Container Sessions to view a list of notebooks running in the container.
Each notebook has one kernel, which serves as its computation engine for all operations. Note the value given for each kernel's last_activity; this timestamp indicates how recently each notebook has been accessed, run, or edited.
- If you identify a container that is running but is unused, consider terminating it. Optionally, from the container's resource page, click Terminate Container, and confirm the operation.
This stops and destroys the running container; it's an irreversible operation. The next time that the portal member opens an ArcGIS Notebook, a new container will open.