pterodactyl / panel

Pterodactyl® is a free, open-source game server management panel built with PHP, React, and Go. Designed with security in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to end users.
https://pterodactyl.io
Other
6.84k stars 1.75k forks source link

Game server in Wings/Dockerized lastest version used high memory. This is memory leak ? #5234

Closed wcdfilll closed 1 month ago

wcdfilll commented 1 month ago

Current Behavior

I have tested these servers on Windows, specifically Minecraft and Discord Bot, and they only used around 5-7GB of actual RAM on average. I raise the question, when I run free -h on Ubuntu 22.04 while these servers are running, it shows the same amount of RAM usage as in the Windows environment. So, where has the remaining RAM, which seems to have increased exponentially, gone?

Expected Behavior

Game servers using Java (or not Java, I haven't tested, only Java) will use a lot of RAM. Here is a picture of 1 server out of 3 servers using 15gb RAM and block of free -h the actual amount of RAM the server uses, game servers should not use that much RAM

               total        used        free      shared  buff/cache   available
Mem:           192Gi        23Gi       144Gi        21Gi        24Gi       145Gi
Swap:          8.0Gi          0B       8.0Gi

image

Steps to Reproduce

  1. You can use a VM (I haven't tried this on a Physical Server).
  2. Install Wings following the official documentation.
  3. Move your Java server files to the new Node.
  4. Then, run those servers as usual. Let them run for about half a day.
  5. Afterward, I edited the CPU settings for my VM, turned the VM off, and restarted it several times to check if the CPU was running stably on the VM.
  6. Congratulations, the error you see is what I encountered. The RAM usage gradually increased, as if it accumulated and wasn't garbage collected (This step is a guess because I can't sit and test it for hours, you probably don't need to read this step)

Panel Version

1.11.7

Wings Version

1.11.3

Games and/or Eggs Affected

Minecraft (Paper)

Docker Image

ghcr.io/pterodactyl/yolks:java_17 or any yolks other

Error Logs

none error log

Is there an existing issue for this?

yesBad commented 1 month ago

There is no issue here. Docker shows the Java allocated amount, not actual usage. If you want to see the actual usage, use something like spark by lucko. Thanks.

wcdfilll commented 1 month ago

There is no issue here. Docker shows the Java allocated amount, not actual usage. If you want to see the actual usage, use something like spark by lucko. Thanks.

this make OOM killer start, how i prevent this happen. any solution ?

yesBad commented 1 month ago

There is no issue here. Docker shows the Java allocated amount, not actual usage. If you want to see the actual usage, use something like spark by lucko. Thanks.

this make OOM killer start, how i prevent this happen. any solution ?

A) Don't use OOM killer B) Give for example 8G to container and 7G for Java Xmx. So there's enough overhead. Usually I keep like 500Mb - 2000Mb

wcdfilll commented 1 month ago

There is no issue here. Docker shows the Java allocated amount, not actual usage. If you want to see the actual usage, use something like spark by lucko. Thanks.

this make OOM killer start, how i prevent this happen. any solution ?

A) Don't use OOM killer B) Give for example 8G to container and 7G for Java Xmx. So there's enough overhead. Usually I keep like 500Mb - 2000Mb

no that is not the problem the problem is why docker uses more ram than java it is still increasing see image image