# The problem about JVM

**URL:** <https://community.sonatype.com/t/the-problem-about-jvm/8674>\
**Category:** Sonatype Nexus Repository\
**Tags:** docker\
**Created:** [May 17, 2022, 4:49am UTC](https://community.sonatype.com/t/the-problem-about-jvm/8674 "2022-05-17T04:49:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jiangbaiheng](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@jiangbaiheng](https://community.sonatype.com/u/jiangbaiheng)\
**Post date:** [May 17, 2022, 4:49am UTC](https://community.sonatype.com/t/the-problem-about-jvm/8674/1 "2022-05-17T04:49:31Z")

</div>

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:

 ![1652762073740_C195B026-0E79-4e1b-81FE-42492B36C2C8](https://canada1.discourse-cdn.com/flex047/uploads/communitysonatype/original/2X/8/88e51b774d781d6ff46ebdf896abb7f680ef7abc.png)

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

---

<div class="post-metadata">

**Author:** ![rseddon](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/rseddon/32/341_2.png) [@rseddon](https://community.sonatype.com/u/rseddon)\
**Post date:** [May 17, 2022, 3:27pm UTC](https://community.sonatype.com/t/the-problem-about-jvm/8674/2 "2022-05-17T15:27:31Z")

</div>

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

Rich

---

<div class="post-metadata">

**Author:** ![jiangbaiheng](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@jiangbaiheng](https://community.sonatype.com/u/jiangbaiheng)\
**Post date:** [May 18, 2022, 9:57am UTC](https://community.sonatype.com/t/the-problem-about-jvm/8674/3 "2022-05-18T09:57:51Z")

</div>

Thank you very much，I get it.
