Changing container memory does nothing

OS Name/Version: Ubuntu 20.04

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

Problem Description:

My server has 64g memory and no matter what I change the Container Memory setting to for an instance, it always shows that the full memory is available to the instance and can go above what I have set.

image

When I run docker inspect AMP_DEV, the output shows memory is set to 0 while the other settings seem fine (i.e. nanocpu shows the correct number).

Steps to reproduce:

  • Create an instance
  • Set container memory
  • Doesn’t change in instance

Actions taken to resolve so far:

  • Restarted instance: no change
  • Restarted ADS: no change
  • Restarted machine: no change
  • Deleted and recreated instance: no change

It doesn’t matter how many instances I have either. I set my main game server instance to 48g and it shows 64g when managing the instance. I set my second “dev” instance to 8g, shows 64g and goes over 8g when rust is started.

The AMP instance inside the container doesn’t know what the containers memory limit is, so it just reports the amount that the system has installed. This will probably change at some point but it’s really just a display issue.

So then when the server application is started, why does it use so much more memory than the restricted amount?

image

This is the same server named DEV and that’s over 2x the memory setting of 8192mb.

Because its using swap space. Turn on the full metrics to see physical RAM usage split out.

Sure enough. Thanks. Oddly enough, it’s using 21g “memory” right now, but only 6.8g “physical ram” and 0 swap.

Similar question, how do I interpret the memory usage value (8933) here?

I have 6 GB in the Ubuntu VM. I am using PaperMC. I allocated 4 GB to Java. I set the advanced Java option for starting RAM to 2 GB and max RAM to 4 GB. This is using the Docker option.

The Physical RAM usage makes sense. But why does Memory Usage show 8933 MB? And was the Docker memory reporting fixed from this thread? Because I don’t see 6 GB reference anywhere here even though the VM guest has 6 GB.

Make sure you’re on the latest version (the .12 release) - we’ve changed how some of the metrics reporting works.