-
Notifications
You must be signed in to change notification settings - Fork 778
system with OpenGrok docker containers maxed out memory #3089
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
Comments
The Inside an OpenGrok Docker container the memory is by large taken by the Tomcat process. The indexer could also take a sizable chunk of memory - that is only temporary however might lead to in kernel buffer space inflating significantly. That said, this falls into memory that can be reclaimed. |
Cache doesn't seem to have taken it.
I've checked
The only thing running on this server is the containers. It was rebooted a little while ago and the only thing that I loaded after that was the containers. |
Also, it might be worth checking what processes are actually swapped out (https://stackoverflow.com/a/7180078/11582827). |
What does the output from:
say ? It should match the output from:
|
24439736
It doesn't. 24982634496 |
Thank you!
59gb of the swap is going to the containers, and another ~26gb of RAM are, too. Not sure where another 30gbs are (since there are currently 10gb free), but at least it doesn't look like the containers are running on air and good wishes anymore. So, 85gb between 6 containers, so ~14gb per container. The top swapper there, at the bottom, is a one-project container (which is weird, because I read the issue someone opened for multi-projects being memory guzzlers), but the one just above it is ~120 projects. Each 16gb. Is that normal? Is there a formula for gauging normal here? |
I guess what I'm really asking is: Should I expect the containers to take up this much memory, in which case I need to ask for a server upgrade (the existing machine won't carry more than it does now, and I need it to), or is this not normal (e.g. "containers usually take up... 8gb"), in which case, I need to fix something? |
The values have just different magnitude. The
so some 23 GiB. |
The webapp could to be memory hungry. https://github.com/oracle/opengrok/wiki/Tuning-for-large-code-bases#web-application has some tips on how to size the JVM heap for the web app. When the suggester was introduced I had to scale up the default heap size quite a bit for our internal deployment (with hundreds of mid sized projects). Now, in Tomcat logs you might see some memory leaks being detected however these are not under our control (see #2899); AFAIK all OpenGrok leaks in the web app were plugged. |
For reference, almost empty (2 small projects indexed - OpenGrok and sudo) OpenGrok container is reported to consume ~1.35 GiB in |
Define "small"? Because my smallest container is 4 projects that add up to roughly 7gb, and looking at swap and stats, it seems to take up around 5gb of memory. |
these are 2 clones of the OpenGrok source repository and 3 clones of sudo source repo. Looking at the stats of the container now it grew to 2.79GiB, will keep an eye on it. |
Actually, there seems to be something fishy going on with the Tomcat process, respectively JVM. Getting a JVM heap dump (gotcha: The growth of RSS is not linear it seems. When the container was started it began under ~1 GiB which then quite quickly shoot into the ~2 GiB range and eventually ended in ~3 GiB. I then let the container run over night and it remained around the ~3 GiB with very little growth. |
Fixed in the image with OpenGrok 1.3.11. |
Like I mentioned in #3071, I have separate containers set up for several branches my team is working on.
I currently have 5 containers set up and... I'm running out of memory.
The server has 64gb of ram plus 64gb of swap and I'm currently 100% out of ram and about 54gb into the swap, with only about 10gb left.
That means ~19gb per container, but when I run docker stats I have two containers using ~10-16, each, and the others using amounts in the mbs, not gbs.
The only thing running is the OpenGrok containers, and killing them does free mem in a big way.
Nearly all container are one project. One container has 124 projects... but surprisingly enough, it's barely taking any memory.
I can't account for anything causing this.
The text was updated successfully, but these errors were encountered: