The problem about JVM

I start Nexus3 Repository with docker, the start command is ‘’‘docker run -d --name nexus_service -p 8081:8081 -p 8082:8082 -p 8083:8083 -v /docker_nfs_nexus/:/nexus-data -e INSTALL4J_ADD_VM_PARAMS="-Xms2703m -Xmx2703m -XX:MaxDirectMemorySize=2703m" sonatype/nexus3 ’‘’‘

But,when the porcess run about 12hour,the memory used 4G , about 50%,the hosts servers total memory is 8G,the picture like this:

I think I set the max memory size is 2703M,but it is not work.
Do you know why?

You’ve allocated 2703mb of heap, and 2703mb of direct memory. So a total of 5406mb of memory.


Thank you very much,I get it.