Exponential RAM increase after Update

OS Name/Version: Ubuntu 21.10

Product Name/Version: AMP Release “Triton” v2.3.2.10, built 21/04/2022 15:09

Problem Description: After applying the latest patch, my Instances RAM dramatically increased. I am running Forge and Spigot servers. None of the services were were idling over 4GB; now, I have some that idle at 25GB, ive even upped some to try and accommodate, but it keeps increasing.

top - 00:33:40 up 23:49,  9 users,  load average: 12.10, 5.78, 3.07
Tasks: 179 total,   1 running, 178 sleeping,   0 stopped,   0 zombie
%Cpu(s): 93.0 us,  6.6 sy,  0.0 ni,  0.3 id,  0.0 wa,  0.0 hi,  0.1 si,  0.0 st
MiB Mem :  32057.3 total,   1706.1 free,  29911.2 used,    439.9 buff/cache
MiB Swap:   4096.0 total,     38.8 free,   4057.2 used.   1754.0 avail Mem

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
 142103 amp       20   0   24.2g   1.9g  28276 S 173.1   6.0   1:32.23 java
 142034 amp       20   0   24.2g  19.4g  15316 S 166.1  61.9   4:23.44 java
 135704 amp       20   0   14.2g   5.1g   8996 S  43.9  16.4  32:31.01 java
 135783 amp       20   0    9.9g   2.0g  15620 S   7.3   6.5   8:13.84 java
 135664 amp       20   0 8124380 529232  10664 S   6.3   1.6   5:50.10 java
 135471 amp       20   0 1436352  13448   5652 S   0.3   0.0   0:10.46 AMP_Linux_x86_6
 135492 amp       20   0 1295308  15896   5028 S   0.3   0.0   0:10.89 AMP_Linux_x86_6
 135524 amp       20   0 1368784  12524   5764 S   0.3   0.0   0:23.99 AMP_Linux_x86_6
 135566 amp       20   0 2050464  29928   4844 S   0.3   0.1   0:08.29 AMP_Linux_x86_6
 135618 amp       20   0 1300200  27816   9256 S   0.3   0.1   0:10.35 AMP_Linux_x86_6
 142183 amp       20   0    9220   4064   3368 R   0.3   0.0   0:00.03 top

Actions taken to resolve so far: Restarted server, restarted service, stopped and restarted all instances, stopped all instances and run ’ ampinstmgr upgradeall --nocache and restarted all the instances

Edit: One additional thing I found was the “Invalid maximum heap size: -Xmx0M” error in the console. I went back into the VaultHunters instance and updated it; it had no effect. After posting this, I saw the ‘Create Above and Beyond’ server wasn’t running. Found the same error in its console; its running >24MB already.

Nothing has actually changed, AMP is reporting the memory usage differently. Turn on the full process metrics or the “simplified metrics” for more information.

Java is a virtual machine. If you set the heap limit to 24GB for example then its virtual pool size will be 24GB which is what AMP is reporting (the Virt column in (h)top). This is normal and expected.

If you turn on simplified metrics, AMP will instead report the physical RAM usage (which is less useful) as the memory figure.

AMP does not have any impact on an applications memory usage (beyond the heap size setting you can edit yourself) - it merely reports it. You can ask AMP to generate a startup script and you will observe the same behaviour when running the server outside of AMP.

I understand the heap size. Thats not the issue. Why is it suddenly eating up RAM? Not one of these servers had their heap size of 6GB prior to the patch.

I’ll drop the heap back down to 6GB later and report back the results.

Again, any memory usage issues are nothing to do with AMP. Running an application inside of AMP is no different from outside of it. You can verify this by asking AMP to generate a startup script and you’ll observe the same behaviour.