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

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

  1. croderdai

    croderdai New Member

    Joined:
    Sep 26, 2016
    Messages:
    4
    Likes Received:
    0
  2. BlackBeltPanda

    BlackBeltPanda New Member

    Joined:
    Mar 13, 2016
    Messages:
    13
    Likes Received:
    0
    • Agree Agree x 1
  3. Broxxx

    Broxxx New Member

    Joined:
    Aug 18, 2016
    Messages:
    2
    Likes Received:
    0
  4. MutFame

    MutFame New Member

    Joined:
    Dec 25, 2016
    Messages:
    1
    Likes Received:
    0
  5. Chris_GSPvP

    Chris_GSPvP New Member

    Joined:
    Oct 6, 2016
    Messages:
    2
    Likes Received:
    0
    I am currently using the following java flags for my Spigot servers:
    Code:
    "{JAVA}" -Xmx{MAX_MEMORY}M -Xms{START_MEMORY}M -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=45 -XX:+DisableExplicitGC -XX:TargetSurvivorRatio=90 -XX:G1NewSizePercent=50 -XX:G1MaxNewSizePercent=80 -XX:InitiatingHeapOccupancyPercent=10 -XX:G1MixedGCLiveThresholdPercent=50 -XX:+AggressiveOpts -XX:+AlwaysPreTouch -jar "{JAR}" nogui
    Most of the servers run between 4GB and 6GB, is this enough to run well? I also gave my BungeeCord java flags with 2 additional flags:
    Code:
    "{JAVA}" -Xmx{MAX_MEMORY}M -Xms{START_MEMORY}M -XX:+UseG1GC -Dio.netty.recycler.maxCapacity.default=20000 -XX:G1HeapRegionSize=4M -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=45 -XX:+DisableExplicitGC -XX:TargetSurvivorRatio=90 -XX:G1NewSizePercent=50 -XX:G1MaxNewSizePercent=80 -XX:InitiatingHeapOccupancyPercent=10 -XX:G1MixedGCLiveThresholdPercent=50 -XX:+AggressiveOpts -XX:+AlwaysPreTouch -jar "{JAR}" nogui
    It this even needed? Also, how much GB should my BungeeCord have? He has 1GB right now.

    My htop ouput:
    [​IMG]

    My RAM on my panel is now 65% aswell, it was 30% before. Is this normally?
     
  6. Thronius

    Thronius New Member

    Joined:
    Dec 8, 2016
    Messages:
    4
    Likes Received:
    0
  7. electronicboy

    electronicboy New Member

    Joined:
    Oct 1, 2016
    Messages:
    16
    Likes Received:
    0
    Your servers performance is fine, only thing you could really improve upon is cutting down on entities, but not even that is much of a real concern with those timings, maybe however a spider spawner or something somewhere on the map, that's the only "flag" in regards to performance really. 20 TPS is excellent but not a goal, it's virtually impossible for perfect 20 TPS especially when factors of computers sucking at math, anything above ~18 is pretty much ideal.
     
  8. Thronius

    Thronius New Member

    Joined:
    Dec 8, 2016
    Messages:
    4
    Likes Received:
    0
    Well the thing is, when I reach over 35 players, everyones connection starts to degrade, ping jumps up higher by 50-100ms for everyone and almost nobody has 5 bars on tab. I use ReliableSite dedi with 1Gbps port, but it seems its problem with their connection, not the actual server, just needed feedback to be sure I am correct on that part :)
     
  9. electronicboy

    electronicboy New Member

    Joined:
    Oct 1, 2016
    Messages:
    16
    Likes Received:
    0
    Try getting timings when the server is actually lagging, it's not too uncommon for a plugin to be doing something horrible that causes a massive performance degradation at a certain point. Beyond that, try speaking to RSnet, if it actually is a networking issue they're the ones who'll be able to help
     
  10. Techcable

    Techcable Benevolent Sith Dictator
    Administrator Waterfall Core Developer Paper Developer

    Joined:
    Feb 1, 2016
    Messages:
    282
    Likes Received:
    124
    • Informative Informative x 1
  11. weboy

    weboy New Member

    Joined:
    Feb 24, 2017
    Messages:
    1
    Likes Received:
    0
    Question,
    You say to set the "chunk-gc", i assume is the garbage collector for chunks.
    Later you say to add the startup flag "-XX:+DisableExplicitGC", don't this flag disable the effects of "chunk-gc" ?
     
  12. RoboMWM

    RoboMWM Moderator
    Moderator

    Joined:
    Feb 1, 2016
    Messages:
    118
    Likes Received:
    18
    No.
    That flag prevents bad plugins from being able to suggest an explicit garbage collection via System#gc.
     
  13. Harald2017

    Harald2017 New Member

    Joined:
    Mar 20, 2017
    Messages:
    3
    Likes Received:
    0
  14. RoboMWM

    RoboMWM Moderator
    Moderator

    Joined:
    Feb 1, 2016
    Messages:
    118
    Likes Received:
    18
    Haven't looked into it that much, but I do notice you're using React; remove that and get some new timings.
     
  15. Harald2017

    Harald2017 New Member

    Joined:
    Mar 20, 2017
    Messages:
    3
    Likes Received:
    0
  16. RoboMWM

    RoboMWM Moderator
    Moderator

    Joined:
    Feb 1, 2016
    Messages:
    118
    Likes Received:
    18
    Do you have any timings that span an hour? Also, is this three different servers on the same box? (If not, you only need one timings report).

    Otherwise, my guess right now is something to do with block ticking. It's firing 2400 times a tick on average, not sure if that's normal or not, or what could be causing it though. And as such, this is causing it to be saved more often than it needs to be(?)

    Either way, it seems you're maintaining 20tps with these timings.

    Oh, and you might want to turn push-based hoppers on.
     
    #117 RoboMWM, Mar 23, 2017
    Last edited: Mar 23, 2017
  17. Harald2017

    Harald2017 New Member

    Joined:
    Mar 20, 2017
    Messages:
    3
    Likes Received:
    0
    No this is the same Server, we are running a few servers via Bungee/Waterfall now, but only have issues with this one, here is a Timings Report for an whole hour

    https://timings.aikar.co/?id=407d017afb614dc9b57cead65c42f66b

    Alright, we will have a go with the "push-based hoppers" on.
    Thank you so much already for looking into it.
     
  18. Flop

    Flop New Member

    Joined:
    Apr 2, 2017
    Messages:
    1
    Likes Received:
    0
    #119 Flop, Apr 2, 2017
    Last edited: Apr 5, 2017
  19. mel_instagibson

    mel_instagibson New Member

    Joined:
    Jul 9, 2016
    Messages:
    6
    Likes Received:
    0
    hey, could anyone help me figure out why the performance of my server is SO bad with a maximum of 5 players on? i swear i tried literally everything, my java flags are like suggested too. ive tried for 2 weeks now and cant figure out why its spiking that much. literally a spike every 2 minutes
    https://timings.aikar.co/?id=84d6749e21934ac8983244c3a49279e0

    :((

    I will even pay for this or give root access to my server thats how desperate i am already. fucking depressing.
     

Share This Page