-
-
Notifications
You must be signed in to change notification settings - Fork 554
Adding sections for memory tweaking and docker stats #283
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
Conversation
|
Hi.. I found something.. setting just the environment section on docker-compose.yml doesn't work for me
Please, do not approve this doc changes yet.. will continue working on this. |
|
Probably a problem in syntax, with double quote |
|
Is working, but I need to add I can add this into the docs.. but I'm wondering if there is another way to make sure it uses JAVA_OPTS without modify Dockerfile. |
|
Also.. the problem arises when executing the registry, because the memory parameters are not used when registry is in docker compose: and jhipster-registry.yml defines the image from docker hub. In this case, I don't have control on CMD line to setup ${JAVA_OPTS} |
|
OK found it.. it works when setting up this "_JAVA_OPTIONS" environment variable... this one is used by default by the JVM. If you agree, I can modify docs using this variable instead of JAVA_OPTS |
|
@danielbruti It's strange, I thought _JAVA_OPTIONS was the old name of the variable. Also it shouldn't be necessary to modify the Dockerfile to edit the env var from docker-compose. But if it happens to be the case, I will add this to the jhipster's app and registry's Dockerfile on the CMD line. |
|
@PierreBesson setting up |
|
Ok. I guess we can go with _JAVA_OPTIONS. |
pages/docker_compose.md
Outdated
|
|
||
| ## <a name="8"></a> Memory Tweaking | ||
|
|
||
| In order to optimize memory usage for applications running in the container, you can setup Java memory parameters on Dockerfile or docker-compose.yml |
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.
Can you use backquotes around filenames? Like docker-compose.yml
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.
Done.. I also modified raw data. docker stats {% raw %}$(docker ps --format={{.Names}}){% endraw %}
|
strange! I always use JAVA_OPTS |
|
@danielbrutti can you try exactly (without -> " ) this, and no additional "command" in docker-compose file |
|
Is this ready to be merged or not? Doesn't look like you agree on the comments... And I also did one comment in the code that wasn't closed. |
|
Hi, I'll finish this today, had hard weeks on work. |
|
Just pushed last changes. It did not work with So I left |
|
I didn't know about this |
|
OK, I will remove it.. I'm not a fan of use anything different of JAVA_OPTS... but for some reason it didn't work for me. However, I'm ok with remove _JAVA_OPTIONS since is not the standard. |
|
@danielbrutti : for your information, with my current customer, we manage to run a full stack microservices with Docker on our test environment. I didn't put any specific configuration about memory, everything works perfectly ! |
|
@pascalgrimaud yes, I read is working for everyone, just failing to me :P |
|
I just removed the options from docs. |
|
@danielbrutti : your analyze helps me a lot on my current project, we had to optimize our memory on our machines. So big thanks! I will analyze and do more tests, then I will PR an update on this documentation. |
|
@pascalgrimaud : glad to hear that it did helped you! Let me know if there is anything I can help. |
|
I can see Xmx, 2 times. Maybe you miss Xms ? |
|
@pascalgrimaud yes you are right, is Xms. Thanks! |
|
The JAVA_OPTS works fine for me as shown below in case this may help
But when we set JAVA_OPTS we will override the spring profile variable and to fix it I have this in my docker-compose
|
Hi,
I just added information about a docker stats command and a new section for memory tweaking in case someone else had the issue I had.
Thanks,
Daniel