What is docker swarm memory? Docker should be able use all available memory - regardless wether it runs in standalone or swarm mode. On all my swarm nodes, the reported total memory in docker info | grep Memory matches the memory reported in free -h.
When I execute free -h I have the following result:
root@smartcity:/home/sistemasfiware# free -h
total used free shared buff/cache available
Mem: 8,6G 7,3G 135M 24M 1,2G 1,0G
Swap: 3,8G 70M 3,7G
What I mean is that I would like to increase the Mem Value assigned (Memory value of a docker node to a higher value ). How could I do that ?
Thanks
Gorka
The problem that I have is that I am working in a Jhipster system which enters information in a MongoDB Docker.
In a specific moment I have the following problem :unable to create new native thread and Ihave read that one of the possible solutions wa to increase RAM memory to the maximum.
Regards
Gorka
You never bothered to share your docker-compose.yml or and other relevant information about the container at hand. If you didn’t specifcly declare resource constraints for cpu and ram, then docker will use all available ram.
If you realy look for advise, you will need to share your docker-compose.yml AND the Dockerfile you use to create the image AND the entrypoint script and all the scripts it calls between containerstart and start of your main process. Additionaly i will require the output of java --version to understand which version you are using. Also I need to know the exact JAVA_OPTS that are used. Java11 is the first version that actualy respects the CGROUP limits of the Container. Older Java versions (8-10) got the functionaliy backported.
This is not the output i asked for! Funny how people suddenly become experts and are able to judge what grade of detail would be enough. There was a reason for that… please google jdk8 in containers to figure out the reason yourself.
-Xmx defines the maximum heap size, -Xms defines the minimum heap size. So if memory is your conerns, then set -Xmx to -Xmx1024m or -Xmx2048m. Though, normaly those settings are set to JAVA_OPTS. I guess the entrypoint script of the image appends _JAVA_OPTIONS to JAVA_OPTS.
Your problem is not a docker problem. It is a problem how your jHippster application is configured in the container. You might want to take this issue to the jHippster community.