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

joseph :

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.

joseph :

@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.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=141059&siteId=1