#Docker container ram usage

80 messages · Page 1 of 1 (latest)

mystic solstice
#

Hi, I host minecraft servers on my pterodactyl panel. The server consumes about 12GB ram, but every time any player connects the docker container starts consuming about 100Mb ram. However, the ram never clears, it just builds up.

zinc charm
#

That's how JVM GC works

mystic solstice
cyan flax
zinc charm
#

But the current described behavior looks like he's already using Aikar flags

#

Hm

#

Ok but

zinc charm
cyan flax
#

Send me your java flags

zinc charm
#

Using Aikar flags would improve performance a lot but it will also increase memory usage which tbh shouldn't be a reason to worry about

mystic solstice
#

java -Xmx12288M -Xms12288M -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:G1NewSizePercent=40 -XX:G1MaxNewSizePercent=50 -XX:G1HeapRegionSize=16M -XX:G1ReservePercent=15 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=20 -XX:G1MixedGCLiveThresholdPercent=80 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Djava.awt.headless=true -Daikars.new.flags=true -Dusing.aikars.flags=https://mcflags.emc.gs -jar skyblock.jar --nogui

mystic solstice
zinc charm
#

hm

mystic solstice
#

For container only

zinc charm
#

You should just perform restarts every 3 AM or sth

#

That's unfortunately how JVM works

#

Memory usage will be growing and growing

mystic solstice
#

I perform restart every day at 4am but 30 gigs increase in about 4-6 hours

zinc charm
#

But

#

From 12 GB to 30 GB?

mystic solstice
#

Yes minecraft is running max 10gb but container 30 xd

zinc charm
#

The other cause of the growth may be memory leaks in your plugins

#

It shouldn't grow that fast

mystic solstice
#

That should increase minecraft server ram not only container

zinc charm
#

Doesn't it increase Minecraft server RAM usage as well?

mystic solstice
#

Nope, just container

zinc charm
#

kinda sus

#

don't know how to fix

mystic solstice
#

Me too 😄 Its my first time with this problem

zinc charm
#

i have never had a problem like that

#

My container sometimes uses 37 GB but it grows up to it after 24 hours from starting the server with 32 GB flag

mystic solstice
#

Can i somehow create heapdump from docker? 😄

zinc charm
#

hm

#

how many players play on your server

#

more than 100?

mystic solstice
#

Yes 😄

zinc charm
#

concurrently?

mystic solstice
#

Yes

#

About 90 on just skyblock

zinc charm
#

So

#

Hard to explain

#

Even harder to fix

mystic solstice
#

I think Ill soon run servers in screen xd

sinful mica
#

If you're setting your Xmx to 10GB and you're container memory is filling up to 30 GB, your server has a memory leak. Nothing do with pterodactyl/docker

#

And it's a leak in native memory space

mystic solstice
sinful mica
#

If you have a memory leak, there is no way to "clear" it. You need to fix or remove what ever code/plugin is causing it

zinc charm
#

And then you should report it to Paper

mystic solstice
quartz marsh
#

@mystic solstice I think it might be a bug with the most recent panel update. I'm getting this exact problem-- spigot reports proper ram usage, the panel reports 4GB+ more.

mystic solstice
#

Yes

#

I tested it

quartz marsh
#

This is on the latest panel version, correct?

mystic solstice
#

Yes

sinful mica
#

at worst, it's a docker issue. The panel doesn't really have any way to effect it.

#

but no issues on any of my minecraft or other Java servers

quartz marsh
#

yeah, makes sense. i'll try restarting and such

rugged parrot
#

I had the same issue but with other game

#

try to update docker and disable swap memory from panel

#

but is strange, the same docker version with wings 1.5.3 (panel 1.7.2) the issue is not visible

#

GRUB_CMDLINE_LINUX_DEFAULT="swapaccount=1 cgroup_enable=memory"

#

and put this on grub linux & linux default

#

GRUB_CMDLINE_LINUX=“swapaccount=1 cgroup_enable=memory"

south dune
#

I have the same issue, I made dumps and analyzed them to see if there is any leak, couldn't find anything.

Is there another way to find a possible leak without removing the jars one by one?

#

I have the same situation as the OP, +100 players in one server, 16gb ram for Minecraft and 32 for the container.

The ram fills up until it goes OOM, even with 102gb for the container OOM can happen

valid smelt
#

same here!

quartz marsh
#

Yeah, when I use a backup on my Windows machine outside of wings and such, I don't get this issue. Very strange. I may set up a test ptero server on my Linux partition to test version as well, maybe I can reproduce it consistently.

quartz marsh
tawny hill
#

or someone have fixed?

quaint hazel
#

the JVM has some additional overhead thats not seen via the spigot readouts

#

(which is why aikar specifically called out to ptero users to not allocate the entire amount of RAM to the server in his optimization guide)

#

to allow for JVM overheads

#

wait, 18.4 for 11.7, weird

#

could you create a heap dump or smth similar using spark