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

  2. BlackBeltPanda

    BlackBeltPanda New Member

    • Agree Agree x 1
  3. Broxxx

    Broxxx New Member

  4. MutFame

    MutFame New Member

  5. andris155

    andris155 New Member

  6. Chris_GSPvP

    Chris_GSPvP New Member

    I am currently using the following java flags for my Spigot servers:
    "{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:
    "{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:

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

    Thronius New Member

  8. electronicboy

    electronicboy New Member

    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.
  9. Thronius

    Thronius New Member

    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 :)
  10. electronicboy

    electronicboy New Member

    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
  11. Techcable

    Techcable Benevolent Sith Dictator Administrator Waterfall Core Developer Paper Developer

    • Informative Informative x 1
  12. weboy

    weboy New Member

    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" ?
  13. RoboMWM

    RoboMWM Moderator Moderator

    That flag prevents bad plugins from being able to suggest an explicit garbage collection via System#gc.
  14. Harald2017

    Harald2017 New Member

  15. RoboMWM

    RoboMWM Moderator Moderator

    Haven't looked into it that much, but I do notice you're using React; remove that and get some new timings.
  16. Harald2017

    Harald2017 New Member

  17. RoboMWM

    RoboMWM Moderator Moderator

    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.
    Last edited: Mar 23, 2017
  18. Harald2017

    Harald2017 New Member

    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

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

    Flop New Member

    Last edited: Apr 5, 2017
  20. mel_instagibson

    mel_instagibson New Member

    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


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

Share This Page