How to Resize a Machine

Machines are Linux and Windows virtual machines with persistent storage, GPU options, and free unlimited bandwidth. They’re designed for high-performance computing (HPC) workloads.


You can resize your machine’s machine type and disk size depending on your needs. Resizing your machine incurs a prorated charge based on when you resized your machine. You can resize a machine using the Paperspace console, Paperspace API, or Paperspace CLI.

There are two ways you can resize your machines:

  • Change Machine Type. This option increases or decreases the amount of CPU or GPU on your machine. Increasing the amount of CPU or GPU on your machine improves your machine’s performance.

  • Increase Disk Size. This option permanently increases the size of your machine’s disk. Increasing the size of your machine’s disk increases the amount of data you can store.

You can resize one or both of these options based on what you need.

Considerations Before Resizing

  • The full disk size isn’t equal to the amount of storage available in your machine.

    The amount of storage available in your machine is the disk size minus the overhead of the machine. For example, the ML-in-a-Box template uses 28 GB of storage, which leaves 66 GB of available storage.

    To see an overview of the current storage usage on your machine, run a df -h command. The /dev/mapper/ubuntu--vg-root line shows you the size of your disk, the amount of disk used, and the amount of disk available.

    Filesystem                   Size  Used Avail Use% Mounted on
    tmpfs                         25G  1.5M   25G   1% /run
    /dev/mapper/ubuntu--vg-root   97G   28G   65G  31% /
    ...
    
  • You may have ran out of disk space due to cached data.

    Examples of cached data are Docker images or previous model versions you’ve trained. You can delete your cached data by going through your machine’s drive.

  • You can only update a machine type within the same machine type group.

    For example, if you’re using a CPU machine, then you can only resize your machine amongst the CPU machine types. Similarly, for GPU machines, if you’re using an A100 machine, for example, you can only resize the machine type amongst the other AX00 machine types. If you need a different machine type entirely, create a new machine.

  • We strongly recommend taking a snapshot of the machine before resizing.

    Snapshots are reliable backups of your machine. If your machine malfunctions, disconnects from Paperspace, or experiences issues like data corruption or system failures during resizing, you can use a snapshot to restore your machine to a working state with your data still intact.

  • You cannot decrease the size of a machine’s disk.

    You can only increase your disk size since decreasing may cause your machine to lose or corrupt your data. When you increase your disk size, this permanently expands your storage and is irreversible.

Resize a Machine

Using the Paperspace Console

Before resizing your machine, you need to turn off your machine.

Afterwards, go to the Paperspace console, in the top-right corner, click the dropdown menu, select CORE, then click the Machines tab. In the Machines section, find and select the machine you want to resize.

On the machine’s overview page, in the top-right corner, click the Settings tab. In the Settings page, there are two sections that resize your machine: Machine section and Disk size section.

The Machine section and Disk size section of the machine's Settings page.

To change your machine type, in the Machine section, click the dropdown menu, select the new machine type you want to use, then click CHANGE TYPE.

In your machine’s overview page, click the Details tab, in the right side, you should see your machine’s updated machine type.

To increase your storage, in the Disk size section, click the dropdown menu, select the new disk size you want to use, then click CHANGE SIZE.

In your machine’s overview page, click the Details tab, in the right side, you should see your machine’s updated disk size.

Using the Paperspace API

Before resizing your machine, you need to turn off your machine.

How to Resize a Machine Using the Paperspace API

When resizing a machine using the Paperspace API, you need to provide the following values:

  1. Create an API key to authenticate your requests to your Paperspace account and save it for use.

  2. Send a PUT request to https://api.paperspace.com/v1/machines/{machine-id}.

curl -X PUT \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $PAPERSPACE_API_KEY" \
  -d '{
        "id": "psm9u09bwu5i",
        "machineType": "a100-80g",
        "diskSize": 50
      }' \
  "https://api.paperspace.com/v1/machines/psm9u09bwu5i"

After the resize is complete, turn on your machine.

Using the Paperspace CLI

Before resizing your machine, you need to turn off your machine.

How to Resize a Machine Using the Paperspace CLI

When resizing a machine using the Paperspace API, you need to provide the following values:

  1. Install pspace, the Paperspace command-line tool.

  2. Create an API key to authenticate your requests to your Paperspace account and save it for use with pspace.

  3. Use the API key to grant pspace access to your Paperspace account.

pspace login --api-key your-api-key
  1. Finally, run pspace machine update <machine-id> -F [flags].
pspace machine update psm9u09bwu5i -F --machine-type a100-80g --disk-size 50

After the resize is complete, turn on your machine.

Verifying If Machine Resized

You can verify if your machine is resized properly either by viewing the Paperspace console under the machine’s Details page, or by fetching the machine’s specifications via Paperspace API or Paperspace CLI.

The Details page of the machine overview page.