Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit memory usage of container #92

Open
bijwaard opened this issue Jul 5, 2023 · 1 comment
Open

Limit memory usage of container #92

bijwaard opened this issue Jul 5, 2023 · 1 comment

Comments

@bijwaard
Copy link

bijwaard commented Jul 5, 2023

Hi,
I ran into memory problems when using this container, and managed constrained it significantly. UISP appears to calculate the number of workers it can use based on how much memory there is, but this is not so accurate on a server that also does other things (like my synology that runs a lot of other services). I discovered you can use the CLUSTER_SIZE variable to set the amount of workers to e.g. 1. It doesn't seem to use the configured memory limit of the container (which I now set to 256MB) but the memory of the host.

Furthermore, the postgresql memory use can be limited a bit, by changing e.g. the shared_buffers=8M, max_parallel_workers=2, changing max_connections didn't appear to work (tried before changing CLUSTER_SIZE variable, and it would not start anymore).

If anyone has more suggestions to limit memory usage, I'm all ears;-)

Kind regards,
Dennis

@hanjo
Copy link

hanjo commented Dec 2, 2024

This is an excellent observation. I was able to reduce memory usage from 1.6 to 1.3GB using CLUSTER_SIZE=1. Haven't tried postgresql settings yet.
What bothers me however is that there is a process (/usr/local/lib/erlang/erts-10.7.2.3/bin/beam.smp) that takes more than 1GB of RAM on my system. This seems to be a lot for such a tiny application. Can anybody comment what this is used for and if it can be limited?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants