#linux #asknostr

Is there a way to give certain processes priority if memory gets bogged down?

E.g., I'd like the ssh server to always have top priority on a headless device, so if some other processes are bogging things down, I can still "get in" to fix things.

On my raspberrypi 4 running umbrel, it seems like things get bogged down and ssh server is the first thing to go. I can ping the device just fine--but ssh connection just gets refused.

...or is this "not how any of this works"?

Reply to this note

Please Login to reply.

Discussion

Buy another pi4 & spread the load. A pi5 might help. A real computer wouldn't have this issue.

If you run the other processes in containers you can limit how much memory they can access.

Most people use docker for this. https://docs.docker.com/engine/containers/resource_constraints/

I think everything on the umbrel is in a container...but ty might look into this...

I wonder if you can identify which cgroup(s) the containers run in and limit the memory of the containers that are consuming toouch memory.

https://medium.com/@kasunmaduraeng/docker-namespace-and-cgroups-dece27c209c7