docs: add cgroup memory troubleshooting to install doc (#16920)

originally thought this fit under [Unofficial Install
Methods](https://coder.com/docs/install/other), but we don't talk about
Raspberry Pi anywhere, so ~the general Install doc might be a better
fit~ moved to admin>templates>troubleshooting


[preview](https://coder.com/docs/@3-cgroup-mem/admin/templates/troubleshooting#coder-on-raspberry-pi-os)

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
Co-authored-by: M Atif Ali <atif@coder.com>
This commit is contained in:
Edward Angert
2025-03-14 14:58:01 -05:00
committed by GitHub
parent 1ec39f4c55
commit a2131a7616
5 changed files with 58 additions and 2 deletions

View File

@ -170,3 +170,59 @@ See our
to optimize your templates based on this data.
![Workspace build timings UI](../../images/admin/templates/troubleshooting/workspace-build-timings-ui.png)
## Docker Workspaces on Raspberry Pi OS
### Unable to query ContainerMemory
When you query `ContainerMemory` and encounter the error:
```shell
open /sys/fs/cgroup/memory.max: no such file or directory
```
This error mostly affects Raspberry Pi OS, but might also affect older Debian-based systems as well.
<details><summary>Add cgroup_memory and cgroup_enable to cmdline.txt:</summary>
1. Confirm the list of existing cgroup controllers doesn't include `memory`:
```console
$ cat /sys/fs/cgroup/cgroup.controllers
cpuset cpu io pids
$ cat /sys/fs/cgroup/cgroup.subtree_control
cpuset cpu io pids
```
1. Add cgroup entries to `cmdline.txt` in `/boot/firmware` (or `/boot/` on older Pi OS releases):
```text
cgroup_memory=1 cgroup_enable=memory
```
You can use `sed` to add it to the file for you:
```bash
sudo sed -i '$s/$/ cgroup_memory=1 cgroup_enable=memory/' /boot/firmware/cmdline.txt
```
1. Reboot:
```bash
sudo reboot
```
1. Confirm that the list of cgroup controllers now includes `memory`:
```console
$ cat /sys/fs/cgroup/cgroup.controllers
cpuset cpu io memory pids
$ cat /sys/fs/cgroup/cgroup.subtree_control
cpuset cpu io memory pids
```
Read more about cgroup controllers in [The Linux Kernel](https://docs.kernel.org/admin-guide/cgroup-v2.html#controlling-controllers) documentation.
</details>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 83 KiB

View File

@ -49,7 +49,7 @@ To start the Coder server:
coder server
```
![Coder install](../images/install/coder-setup.png)
![Coder install](../images/screenshots/welcome-create-admin-user.png)
To log in to an existing Coder deployment:

View File

@ -60,7 +60,7 @@ To start the Coder server:
coder server
```
![Coder install](../images/install/coder-setup.png)
![Coder install](../images/screenshots/welcome-create-admin-user.png)
To log in to an existing Coder deployment: