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 Java memory leaks from crashing the host #111

Open
aksm opened this issue May 24, 2023 · 4 comments
Open

Limit Java memory leaks from crashing the host #111

aksm opened this issue May 24, 2023 · 4 comments

Comments

@aksm
Copy link
Contributor

aksm commented May 24, 2023

What?

When Cantaloupe is hit too hard (bots) Java can eat into kernel memory and crash the host. One potential option as suggested by @DiegoPino is to use the docker runtime option of --kernel-memory:

https://docs.docker.com/config/containers/resource_constraints/#--kernel-memory-details

Will test and report back.

@DiegoPino
Copy link
Member

@aksm please look also at docker-compose / per service limits

@DiegoPino
Copy link
Member

hitting cantaloupe via apache benchmark and disabling temporarily the cache might help hit the limits. doing a docker stats might help seeing if the limits are respected

@aksm
Copy link
Contributor Author

aksm commented May 26, 2023

After some load testing against Cantaloupe on a large image, the host server showed an almost 5% memory usage above that which was set in docker-compose for the container. I would guess that number will vary based on hardware/architecture/OS and amount of load over time so we'll need to account for the overhead. Maybe that's as simple as adjusting the upper limit on the service and adding a warning about the delta in documentation? @DiegoPino thoughts?

@DiegoPino
Copy link
Member

a 5% sounds ok as part of the docs. basically document how to limit/a the docker-compose level (not all services I guess or all but with examples that work?) and assume that overhead. System is also using memory so we need to add an extra 10 to 20%?

Also: AWS EC2 machines don't provide 16Gbytes (even for a 16Gbyte system) but 15.2 Mbytes

Last thought. Filesystem memory/cache , basically swap?

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