-
Notifications
You must be signed in to change notification settings - Fork 60
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
Set Memory limits by container #201
Conversation
This is what the "LIMIT" looked like before I made these changes. My machine shows "15.35GiB" as the top limit for all containers.
|
Before:
After:
Does that look right, @DonRichards? |
@seth-shaw-unlv Yes. The values are set above the available limit so they are falling back on the local system's maximum available RAM. All of the ones showing "3.844GiB" have values that have 3GiB to 8GiB values set. So yes, this is expected behavior. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me.
In the event of a memory leak this should prevent the server from taking over the host and crashing. It also should improve the host environment during build time, improving the stability and expanding the functionality of this build.
I have recently have seen blazegraph and cantaloupe complete consume all my RAM during the build process ultimately crashing docker and other apps. This may be due to something I was doing within the containers but it brought the idea to my attention that a memory leak could cripple a host machine if there is no limits set.
Running
docker stats
should output this. The focus is on MEM USAGE / LIMIT and MEM %.What changed
Within the sample.env file is a variable for each one of these containers using the naming convention NAME_MEMORY_LIMIT.
Within each of the containers that a value can be set, a memory limit variable is added with a fallback value reflecting the software vendor's minimal requirements. This "fallback" value is for existing installations that don't already have the NAME_MEMORY_LIMIT variables within their .env file. This anticipates that possibility and doesn't prevent the build process from succeeding.
How to test
docker stats
on isle-dc to see the normal operation.make up
,docker-compose up -d
or how ever you plan on testing this then rundocker stats
again and it should have limits that reflect the sample.env.