Problem Description: We updated the OS and AMP, then did the usual MC instance setup with Aikar’s flags (reference). Testing on my pc at home (just a regular paper server setup, no AMP) the -Xms value allocates the full 10G. Once I remote upload everything to AMP, it doesn’t seem to allocate the full 10gb as the minimum. Pretty sure I am doing something wrong or missed a simple setting etc. One other difference is the home pc is on Java HotSpot 64-Bit Server VM build 19+36-2238
^ Top shows Essentials readout on my pc at home. Below that you can see the difference on the server with AMP. Then I added in some relevant info under that.
Below are the flags I use on the home pc for reference
Below are the “Additional java options” I use in AMP. Basically the same with a couple things removed from the start/end that I was told previously are handled by AMP
Just some searching here on the forum. I did try formatting the values like this -Xms10240M because I saw others doing it that way instead of -Xms10G. Pretty sure I am doing something wrong here so any help is much appreciated! Keep up the good work!
Ahh perfect! Would you happen to know how to adjust the minimum (Xms) value in the AMP panel? I have the maximum heap size set in the Java and Memory tab as shown in the pic already.
You don’t really need the Xms value, but you should be able to manually add the arg, you’d just need to remember to update it if you change the memory value.
Sounds good, where should I manually add the arg? Just putting -Xms10G in the “Additional java options” under the “Java and Memory” tab does not seem to have any effect. I really appreciate the info!
I have been searching for the answer to this question as well and have tested on multiple different Java versions/minecraft servers. Looking forward to a resolution!
It would just be under Java and Memory yeah. I’ve found that the Xms arg doesn’t do much at all, so it’s most likely been applied properly, just with no effect.
@Mike any ideas on how to change the -Xms value? I’m no expert on the subject, just a guy setting up an MC server hahaha.
explanation from Aikar:
G1 operates better with the more memory it’s given. G1 adaptively chooses how much memory to give to each region to optimize pause time. If you have more memory than it needs to reach an optimal pause time, G1 will simply push that extra into the old generation, and it will not hurt you The fundamental idea of improving GC behavior is to ensure short-lived objects die young and never get promoted. With the more memory G1 has, the better assurance you will get that objects are not getting prematurely promoted to the old generation. G1 Operates differently than previous collectors and is able to handle larger heaps more efficiently.
If it does not need the memory given to it, it will not use it. The entire engine operates differently and does not suffer from too large of heaps, and this is industry-wide accepted information that under G1 to keep Xms and Xmx the same!
Nope, original post already has a pic of the support and updates tab. AMP shows the -Xmx setting but nothing about -Xms. Is there anyone I can email within Cubecoders to take a look and tell me how to set it up properly?
I have the same problem and what you said isn’t exactly working @Mike, unless I’m doing it in the wrong place.
I’m using those as Additional Java options (MinecraftModule.Java.CustomOpts):
-Xmx15360M -Xms15360M -XX:+UseG1GC
Memory Limit (MinecraftModule.Java.MaxHeapSizeMB) is also configured to be 15360
But only the following JVM arguments are being applied (from Last Arguments):
-Xmx15360M -XX:+UseG1GC
It appears that custom memory configurations in Additional Java options are being suppressed (I believe Xmx is coming directly from Memory limit instead of the additional options)
CustomOpts is something different. You want the one specifically called “Additional Java Options” in AMP. Use the search box and search for “Additional” to find it.
Our issue is that -Xms is not applied at all, and there’s no “initial memory” configuration for setting it. -Xmx is also replaced by whatever’s configured at Memory limit, so I believe both memory flags are being removed before that. Unless we’re supposed to add memory configurations to the Additional Server Arguments?
I’ve checked, there’s no restriction on the behaviour of AdditionalOpts - so putting -Xms XXXXM in should be all that’s required. The flags shown in AMP won’t be reflected until you restart the server. In the case of Forge it’ll appear fairly early on in the string.