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

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

  1. Psycho

    Psycho New Member

    Joined:
    May 22, 2016
    Messages:
    3
    Likes Received:
    0
    @frash23

    Any help with this? https://timings.spigotmc.org/?url=16597041

    I did most of the optimizations described here and it's not looking very good (in fact, I think the server is doing worse :/). I believe it has something to do with the new startup script.

    Here are the flags I use (taken from RemoteToolkit) (4GB of memory allocated to the server)
    -Dfile.encoding=UTF8,-Djline.terminal\=jline.UnsupportedTerminal,-DconvertLegacySigns=true,-XX:+AlwaysPreTouch,-XX:+DisableExplicitGC,-XX:+UseG1GC,-XX:+UnlockExperimentalVMOptions,-XX:MaxGCPauseMillis=50,-XX:TargetSurvivorRatio=90,-XX:G1NewSizePercent=50,-XX:G1MaxNewSizePercent=80,-XX:InitiatingHeapOccupancyPercent=10,-XX:G1MixedGCLiveThresholdPercent=50,-XX:+AggressiveOpts

    Our network is running another Survival server, a Forge survival server and a Creative server with the same flags (although lower memory allocation), using 13.5/16GB of our server's memory in total.
     
  2. frash23

    frash23 Active Member

    Joined:
    Feb 18, 2016
    Messages:
    133
    Likes Received:
    53
    I'd recommend switching to Paper first :)
    What hardware are you running this on?
     
  3. Psycho

    Psycho New Member

    Joined:
    May 22, 2016
    Messages:
    3
    Likes Received:
    0
    @frash23 I tried switching to Paper, but unfortunately that broke BKCommonLib & Traincarts, which is a big no-no on our server (as our rail network is our pride and joy). I will try Paper again when BKCommonLib & Traincarts are available for 1.9 to see if our problems persist.

    We run on a dedicated server (Windows OS - Yeah, I know :/) with Intel i7-3770 processor and 16 GB RAM (I can provide further information if you need it).
     
    #63 Psycho, May 22, 2016
    Last edited: May 22, 2016
  4. tuanjr

    tuanjr Member

    Joined:
    Feb 19, 2016
    Messages:
    44
    Likes Received:
    2
    I'm just discover: plugin called "leaderheads" make server laggy, it's eat huge amount of CPU. After remove Leaderhead, server run with ~140 player smooth, tps~ 19. Holy shit, from 100 player with tps ~10 to 140 player with tps ~19.
     
    • Agree Agree x 1
  5. Frozon

    Frozon Member

    Joined:
    Feb 16, 2016
    Messages:
    81
    Likes Received:
    7
    Is that Paper 1.9.4 or 1.9.2?
     
  6. tuanjr

    tuanjr Member

    Joined:
    Feb 19, 2016
    Messages:
    44
    Likes Received:
    2
    paperclip 1.9.2 buid 727
     
  7. Frozon

    Frozon Member

    Joined:
    Feb 16, 2016
    Messages:
    81
    Likes Received:
    7
    Okay thanks. From what I see, 1.9.4 has a few problems at the moment.
     
  8. RoboMWM

    RoboMWM Moderator
    Moderator

    Joined:
    Feb 1, 2016
    Messages:
    118
    Likes Received:
    18
    BKCommonLib works for me on paper, and Traincarts may or may not be updated for 1.9
     
  9. Psycho

    Psycho New Member

    Joined:
    May 22, 2016
    Messages:
    3
    Likes Received:
    0
    Paper 1.8 or 1.9? BKCL has a 1.9.2 compat version out, but TC not so much.
     
  10. manwithtrouble

    manwithtrouble New Member

    Joined:
    Apr 2, 2016
    Messages:
    20
    Likes Received:
    0
    timings: http://i.imgur.com/rv5UeCh.png

    having some lag issue with 60+ players, chunkUnload i think is causing a lot of tps lag? using the configs in the OP, with these startup flags from aikar's post
    Code:
    java -Xms28G -Xmx28G -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=100 -XX:+DisableExplicitGC -XX:TargetSurvivorRatio=90 -XX:G1NewSizePercent=35 -XX:G1MaxNewSizePercent=60 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=50 -XX:+AggressiveOpts -XX:+AlwaysPreTouch -jar server.jar
    playing on the server doesn't feel like tps is low, more like it's stuttering or having many short lagspikes.

    paper build 764
     
    #70 manwithtrouble, Jun 2, 2016
    Last edited: Jun 2, 2016
  11. frash23

    frash23 Active Member

    Joined:
    Feb 18, 2016
    Messages:
    133
    Likes Received:
    53
    I need actual timings, not a picture of them.
    Performance hits from chunks are currently an unsolved problem in Paper.

    Why are you allocating 28G?! Try 6-8 and up it if you start running out.
     
  12. manwithtrouble

    manwithtrouble New Member

    Joined:
    Apr 2, 2016
    Messages:
    20
    Likes Received:
    0
    i've switched to the 10gb version of aikars. what do you need to see in timings? i can't link directly because it shows players co-ordinates
     
  13. RoboMWM

    RoboMWM Moderator
    Moderator

    Joined:
    Feb 1, 2016
    Messages:
    118
    Likes Received:
    18
    Um, mine never showed player coordinates in timings from what I recall...
     
  14. manwithtrouble

    manwithtrouble New Member

    Joined:
    Apr 2, 2016
    Messages:
    20
    Likes Received:
    0
    in the chunks view it displays co-ordinates, or am i wrong?

    i've tried to change all the settings, changing between the <10gb and >10gb of aikars launch flags, and gimping server to really low limits and settings such as view distance to 4, but doChunkUnload usage still remains really really high. could it be because the server is using a hdd and not an ssd? there are no plugins using anything in the timings or being laggy, i barely have any. it's 90~ players on a single world/server, not split up. should that be able to run 20 tps with semi vanilla settings and barely no plugins (using only nocheatplus and some chat/info text stuff)?

    edit: is it possible to slow down or delay chunkUnload? or does it not work that way?
     
    #74 manwithtrouble, Jun 3, 2016
    Last edited: Jun 4, 2016
  15. tuanjr

    tuanjr Member

    Joined:
    Feb 19, 2016
    Messages:
    44
    Likes Received:
    2
    @frash23
    Can you help me with this timings. Server run mooth in 1 month with ~180 player (after upgrade to e3-1230v3), but suddenly lag, drop tps in one week ago. I don't know why, try everythings but can't fix that.
    here are paper timings: https://timings.aikar.co/v2/?id=c52f929b54c84a2fb480c8f005704a78&start=1465452216&end=1465452706
    here are spigot timings: https://timings.spigotmc.org/?url=17135367
    why so many tickEntity?
    i'm try mergedmobs, farm limiter, Mobs farm mamanger but still can't reduce it.
    this is worldguard report http://paste.enginehub.org/Ot3cDG.report
     
    #75 tuanjr, Jun 9, 2016
    Last edited: Jun 9, 2016
  16. kemmeo

    kemmeo Member

    Joined:
    Feb 22, 2016
    Messages:
    51
    Likes Received:
    8
    Any big changes going from 1.9.4 to 1.10?
     
  17. manwithtrouble

    manwithtrouble New Member

    Joined:
    Apr 2, 2016
    Messages:
    20
    Likes Received:
    0
    • Informative Informative x 1
  18. Techcable

    Techcable Benevolent Sith Dictator
    Administrator Waterfall Core Developer Paper Developer

    Joined:
    Feb 1, 2016
    Messages:
    282
    Likes Received:
    124
    Do you have profiling information from either Worldguard's builtin profiler or Yourkit?
     
  19. manwithtrouble

    manwithtrouble New Member

    Joined:
    Apr 2, 2016
    Messages:
    20
    Likes Received:
    0
    /wg profile http://paste.enginehub.org/nUrcCo.profile
    /wg profile http://paste.enginehub.org/BZEcC0.profile
    /wg profile -t * http://paste.enginehub.org/xMCcCS.profile
    just timings https://timings.aikar.co/v2/?id=7e1e91cab04146d19fe94f89a1315178

    not actually expecting to have 400+ in a single server/instance without it lagging, but here. (server is set to 28gb ram, on ssds, on a 6700k)
     
  20. Techcable

    Techcable Benevolent Sith Dictator
    Administrator Waterfall Core Developer Paper Developer

    Joined:
    Feb 1, 2016
    Messages:
    282
    Likes Received:
    124
    Your problem is with 'structure regeneration'. Is your world pregenerated?
     

Share This Page