Ram issues

Discussion in 'Performance Tweaking' started by AxelTWC, Apr 17, 2021.

  1. Here is the timings report link. https://timings.aikar.co/?id=48d73fab98cf462e99bbca42fc114297

    My server always runs out of memory for no reason and we could not figure a way around it. We are using 6gb ram and it always does this once there are 14+ player's on the server. The server runs on Intel i7-7700K OC - 4.7 GHz / 5 GHz , v3 core and the cpu usage is always in between 18%-55% , which is really healthy. However the ram always spikes up from 54% to 100% or even crashing the server with just so little amount of players. Can anyone give me a helping hand and resolve this issue? Thanks in advance! TPS is btw , always or usually at 20TPS. But Free Memory ranges from 1000-300mb ram given with the command /lag
  2. Phoenix616

    Resource Staff

    If the server crashes it means that you don't have enough free memory on your machine. Make Xms the same value as your Xmx to avoid that when the server is running. (You can also click the link on the page to read about important flag arguments)
    • Agree Agree x 2
  3. Code (Text):
    -Xms5G -Xmx5G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar /pro/bin/mc/paper-spigot/1.16.5/paper-1.16.5.jar
    So i did this as my startup but even with 4 players, it is using around 4gb of ram leaving with 1.7 gb left , is that normal?
    #4 AxelTWC, Apr 17, 2021
    Last edited: Apr 17, 2021
  4. yes
    • Agree Agree x 1
  5. since the host is providing 6gb ram , should i use 5gb or 4gb tbh
  6. there should be atleast 1 to 1.5 gb of overhead. So between 4.5 to 5gb.
    • Agree Agree x 1
  7. do heap memory analyzing and find what is taking of your memory.