Skip to content

Commit

Permalink
Add docs for resource limits (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
polypixeldev committed Apr 29, 2024
1 parent 5c66959 commit e60a128
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions SETUP.md
Expand Up @@ -20,6 +20,22 @@ The server runs [Proxmox VE](https://www.proxmox.com/en/proxmox-virtual-environm

The Nest VM is the VM that users will access and host their stuff on. It runs Debian 12 Bookworm. It's configured with all 8 CPU cores and 52 GiB of RAM.

#### Resource Limits

Every user on Nest has resource limits setup to prevent abuse of Nest and to make sure there's enough resources for everyone. The default limits are:
- 50% (total) CPU time
- 2GB memory
- 15GB disk

CPU time and memory are configured through systemd & cgroups. These default limits are defined in `/etc/systemd/system/user-.slice.d/50-memory.conf`, and can be overridden for users in `/etc/systemd/system/user-<id>.slice.d/50-memory.conf`.

Note that to apply changes to either the CPU time or memory limits, you must run `systemctl daemon-reload`.

Disk space limits are configured through `quota`. The following command is run by Nest Bot to set the default disk space limit:
```sh
setquota -u <user> 15G 15G 0 0 /
```

### Secure VM

The Secure VM is the VM that hosts all critical Nest services:
Expand Down

0 comments on commit e60a128

Please sign in to comment.