Guide Optimizing Paper - Remove lag spikes, Fix tps & Improve performance!

Discussion in 'Paper Discussion' started by frash23, Mar 28, 2016.

  1. electronicboy

    electronicboy New Member

    Joined:
    Oct 1, 2016
    Messages:
    16
    Likes Received:
    0
    What are you hosting that on, it's generally not a good idea to not run servers on toasters;

    Looks like the server just isn't able to keep up, only 121 ticks have actually had major lag, however overall it looks like GC is having issues keeping up with what is going on on the server... (21 old gen collections is generally a sign that GC isn't able to keep on top of the heap, this can be for various reasons, in this case it more specifically looks as if it's not able to keep up, however could also be that you just have a lot of persistent objects in the heap from plugins and stuff.
     
  2. mel_instagibson

    mel_instagibson New Member

    Joined:
    Jul 9, 2016
    Messages:
    6
    Likes Received:
    0
    Its a dedicated i7 6700k with 32GB, SSD with 3 servers running on it with a total of around 30 people when taking the timings. This server was the one with only like 2 people on it and has 7GB RAM dedicated to it, they all use the same configurations even. All i can see in those timings is that i should turn autosaving off but that didnt help either, would you have an idea how i can narrow down the cause of it without being a java developer? because alot of the things you told me dont mean anything to me. how would i find those persistent objects?

    And how do you see there are only a few ticks having issues and that there are 21 old gens?
     
    #122 mel_instagibson, May 19, 2017
    Last edited: May 19, 2017
  3. mel_instagibson

    mel_instagibson New Member

    Joined:
    Jul 9, 2016
    Messages:
    6
    Likes Received:
    0
    So i went from those flags:

    java -Xms7G -Xmx7G -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=100 -XX:+DisableExplicitGC -XX:TargetSurvivorRatio=90 -XX:G1NewSizePercent=50 -XX:G1MaxNewSizePercent=80 -XX:InitiatingHeapOccupancyPercent=10 -XX:G1MixedGCLiveThresholdPercent=50 -XX:+AggressiveOpts -XX:+AlwaysPreTouch -Dusing.aikars.flags=mcflags.emc.gs -XX:LargePageSizeInBytes=2M -XX:+UseLargePages -XX:+UseLargePagesInMetaspace -jar paperclip.jar

    to those flags:

    java -Xms7G -Xmx7G -XX:+UseG1GC -jar paperclip.jar

    And that actually fixed my problems... you might want to see this @Aikar ? any idea which flag couldve caused this? And yes, largepages are setup correctly and my overall ram allocation is good too. The other 2 servers have the same settings and use all the flags above and dont have issues :S
     
  4. Sweepyoface

    Sweepyoface The crazed
    Moderator

    Joined:
    Apr 20, 2016
    Messages:
    10
    Likes Received:
    2
    You should lower your memory allocation. Less is more.
     
  5. mel_instagibson

    mel_instagibson New Member

    Joined:
    Jul 9, 2016
    Messages:
    6
    Likes Received:
    0
    Is this a serious advise? because i dont see how there can be too much RAM... Oo
     
  6. Sweepyoface

    Sweepyoface The crazed
    Moderator

    Joined:
    Apr 20, 2016
    Messages:
    10
    Likes Received:
    2
    Yes. The JVM can use resources more efficiently when it isn't allocated much more than it needs.
     
  7. mel_instagibson

    mel_instagibson New Member

    Joined:
    Jul 9, 2016
    Messages:
    6
    Likes Received:
    0
    Ok thank you ill see if that improves things. Would it be a good idea to remove the Xms in that case?
     
  8. RoboMWM

    RoboMWM Moderator
    Moderator

    Joined:
    Feb 1, 2016
    Messages:
    118
    Likes Received:
    18
    Yes
     
  9. sandor

    sandor New Member

    Joined:
    Jun 22, 2017
    Messages:
    5
    Likes Received:
    0
  10. ssamjh

    ssamjh New Member

    Joined:
    Apr 21, 2016
    Messages:
    7
    Likes Received:
    0
    I posted this on Spigot but felt it should also be posted here.

    Important Message

    It should be made aware that the author of this thread is no longer with us. This means that there will be no reply if you ask a question. He was an amazing person to this community and I'm sure his work benefited hundreds if not thousands of people.

    https://www.spigotmc.org/threads/a-legacy-unforgotten-frash23.250894/
     
    • Friendly Friendly x 3
  11. arturek1666

    arturek1666 New Member

    Joined:
    Dec 7, 2016
    Messages:
    5
    Likes Received:
    0
    I would love to see this updated to 2017 mc version 1.12 there is some stuff that really change for example tacospigot changed quite a bit
     
  12. Aikar

    Aikar git am FixMinecraft.patch
    Paper Core Developer

    Joined:
    Feb 2, 2016
    Messages:
    38
    Likes Received:
    26
    Nothing really needs updating as far as Paper is concerned. and Tech hasn't done as much with Taco lately. So this guide is likely still up to date.
     
  13. hilaolu

    hilaolu New Member

    Joined:
    Thursday
    Messages:
    1
    Likes Received:
    0
    Some people may use this:
    -XX:+UseCompressedOops
    Does the flag really work?
     
  14. electronicboy

    electronicboy New Member

    Joined:
    Oct 1, 2016
    Messages:
    16
    Likes Received:
    0
    that flag is enabled by default in any modern version of Java
     

Share This Page