Is it good to set the max and min JVM heap size the same?

前端 未结 5 565
故里飘歌
故里飘歌 2020-12-29 02:05

Currently in our testing environment the max and min JVM heap size are set to the same value, basically as much as the dedicated server machine will allow for our applicatio

5条回答
  •  猫巷女王i
    2020-12-29 02:42

    Definitely yes for a server app. What's the point of having so much memory but not using it? (No it doesn't save electricity if you don't use a memory cell)

    JVM loves memory. For a given app, the more memory JVM has, the less GC it performs. The best part is more objects will die young and less will tenure.

    Especially during a server startup, the load is even higher than normal. It's brain dead to give server a small memory to work with at this stage.

提交回复
热议问题