Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does -Xms really disable XX:MaxRAMPercentage? Shouldn't it be -Xmx that disables XX:MaxRAMPercentage?

According to Eclipse and IBM, if you specify -Xms, -XX:MaxRAMPercentage is ignored. Shouldn't it be

  • if you specify -Xmx, -XX:MaxRAMPercentage is ignored
  • and if you specify -Xms, XX:InitialRAMPercentage is ignored?

Quoted from both Eclipse and IBM:

Note: If you set a value for -Xms, these options are ignored.

Notice: you might consider marking this at a duplicate of Do java flags Xms and Xmx overwrite flag XX:+UseCGroupMemoryLimitForHeap? , but in that question they ask if Xmx overrides XX:MaxRAMPercentage respectively. Here I want to know if Xms overrides/disables XX:MaxRAMPercentage.

like image 232
joseph Avatar asked Oct 23 '25 08:10

joseph


1 Answers

@Holger's comment answers this question.

  • @Holger tested openjdk 11, and observed -Xms had no affect on -XX:MaxRAMPercentage=75.0
  • @joseph tested openjdk 8, and also observed -Xms had no affect on -XX:MaxRAMPercentage=75.0

Those Eclipse and IBM docs are incorrect.

like image 195
joseph Avatar answered Oct 24 '25 22:10

joseph



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!