2023-03-27 09:31:02 +02:00
|
|
|
(howto-admin-resize)=
|
2018-09-22 21:47:40 -05:00
|
|
|
|
2023-03-27 09:31:02 +02:00
|
|
|
# Resize the resources available to your JupyterHub
|
2018-09-22 21:47:40 -05:00
|
|
|
|
2021-02-09 09:07:51 +01:00
|
|
|
As you are using your JupyterHub, you may need to increase or decrease
|
2018-10-06 12:07:54 -07:00
|
|
|
the amount of resources allocated to your TLJH install. The kinds of resources that can be
|
|
|
|
|
allocated, as well as the process to do so, will depend on the provider / interface for your
|
|
|
|
|
VM. We recommend consulting the installation page for your provider for more information. This
|
2023-03-27 09:31:02 +02:00
|
|
|
page covers the steps your should take on your JupyterHub _after_ you've reallocated resources on
|
2018-10-06 12:07:54 -07:00
|
|
|
the cloud provider of your choice.
|
2018-09-22 21:47:40 -05:00
|
|
|
|
2018-10-06 12:07:54 -07:00
|
|
|
Currently there are instructions to resize your resources on the following providers:
|
|
|
|
|
|
2023-03-27 09:31:02 +02:00
|
|
|
- {ref}`Digital Ocean <howto/providers/digitalocean/resize>`.
|
2018-10-06 12:07:54 -07:00
|
|
|
|
2018-10-07 09:11:36 -05:00
|
|
|
Once resources have been reallocated, you must tell TLJH to make use of these resources,
|
2018-09-22 21:47:40 -05:00
|
|
|
and verify that the resources have become available.
|
|
|
|
|
|
2023-03-27 09:31:02 +02:00
|
|
|
## Verifying a Resize
|
2018-09-22 21:47:40 -05:00
|
|
|
|
2023-03-27 09:31:02 +02:00
|
|
|
1. Once you have resized your server, tell the JupyterHub to make use of
|
2021-02-09 09:07:51 +01:00
|
|
|
these new resources. To accomplish this, follow the instructions in
|
2023-03-27 09:31:02 +02:00
|
|
|
{ref}`topic/tljh-config` to set new memory or CPU limits and reload the hub. This can be completed
|
2018-10-06 12:07:54 -07:00
|
|
|
using the terminal in the JupyterHub (or via SSH-ing into your VM and using this terminal).
|
2018-09-22 21:47:40 -05:00
|
|
|
|
2023-03-27 09:31:02 +02:00
|
|
|
2. TLJH configuration options can be verified by viewing the tljh-config output.
|
2018-09-22 21:47:40 -05:00
|
|
|
|
2023-03-27 09:31:02 +02:00
|
|
|
```bash
|
|
|
|
|
sudo tljh-config show
|
|
|
|
|
```
|
2018-09-22 21:47:40 -05:00
|
|
|
|
2018-10-06 12:07:54 -07:00
|
|
|
Double-check that your changes are reflected in the output.
|
2018-09-22 21:47:40 -05:00
|
|
|
|
2023-03-27 09:31:02 +02:00
|
|
|
3. **To verify changes to memory**, confirm that it worked by starting
|
2018-10-06 12:07:54 -07:00
|
|
|
a new server (if you had one previously running, click "Control Panel -> Stop My Server" to
|
2021-02-09 09:07:51 +01:00
|
|
|
shut down your active server first), opening a notebook, and checking the value of the
|
2023-03-27 09:31:02 +02:00
|
|
|
[jupyter-resource-usage](https://github.com/jupyter-server/jupyter-resource-usage) extension in the upper-right.
|
2018-09-22 21:47:40 -05:00
|
|
|
|
2023-03-27 09:31:02 +02:00
|
|
|
```{image} ../../images/nbresuse.png
|
|
|
|
|
:alt: jupyter-resource-usage demonstration
|
|
|
|
|
```
|
2018-09-22 21:47:40 -05:00
|
|
|
|
2023-03-27 09:31:02 +02:00
|
|
|
4. **To verify changes to CPU**, use the `nproc` from a terminal.
|
2021-02-09 09:07:51 +01:00
|
|
|
This command displays the number of available cores, and should be equal to the
|
2018-09-23 14:44:51 -05:00
|
|
|
number of cores you selected in your provider's interface.
|
2018-09-22 21:47:40 -05:00
|
|
|
|
2023-03-27 09:31:02 +02:00
|
|
|
```bash
|
|
|
|
|
nproc --all
|
|
|
|
|
```
|
2018-09-22 21:47:40 -05:00
|
|
|
|
2023-03-27 09:31:02 +02:00
|
|
|
5. **To verify currently-available disk space**, use the `df` command in a terminal. This shows
|
|
|
|
|
how much disk space is available. The `-hT` argument allows us to have this printed in a human readable
|
2018-10-06 12:07:54 -07:00
|
|
|
format, and condenses the output to show one storage volume. Note that currently you cannot
|
|
|
|
|
change the disk space on a per-user basis.
|
2018-09-22 21:47:40 -05:00
|
|
|
|
2023-03-27 09:31:02 +02:00
|
|
|
```bash
|
|
|
|
|
df -hT /home
|
|
|
|
|
```
|