Server lag with seemingly no solution... Please help!

Discussion in 'Spigot Help' started by Superburri132, Apr 8, 2020.

  1. Hello,

    My server is at almost perfect TPS with an extra GB of RAM available. However, for some reason, lag still exists on the server. I feel like I have tried everything to solve this to no avail. My hosting staff has switched nodes to my server and made further modifications and still lag is persisting. I have tried pretty much everything including:

    1.) Putting server view-distance to 6
    2.) network-threshold to 64
    3.) /wb fill to fill in unneeded worldborder chunks

    We are already on Paper and I don't believe plugins are the problem. Here are 15 minutes of timings: https://timings.aikar.co/?id=ec0617ba801e4befb96943e270b73598

    I just don't understand what could be causing this and we're due to open in 3-4 days. Please help!

    Thanks,
    Burrito
     
  2. Your timings reports you're using outdated JVM flags, can you post your startup script?
     
    • Informative Informative x 1
  3. Is there a way I can do that? I've asked my hosting support and they've said that that's impossible.
     
  4. What host do you use lol? I'm asking for the startup flags that's used to start the JVM (java -jar blah blah blah...)
     
  5. drives_a_ford

    Junior Mod

    The timings indicate you're experiencing lag spikes. But then the server is able to pick up the pace and make up for the lost time (hence the average 20 TPS).

    Looking at your timings. Now
    • I concentrated on the last 6332 ticks
      • At server startup all kinds of funky stuff happen
      • On average, just 6.19% of the tick is used
      • Out of 6332, there are only 4 ticks that are problematic
    • CombatTagPlug:ForceFieldTask
      • Runs every tick
      • Mostly doesn't take a lot of time
      • On the 4 laggy ticks it's used up 40% of your tick (on average)
        • It's possible it's not spread out equally among those 4 ticks
      • Looking at the source, it doesn't really seem to be doing a whole lot
    • Minecraft::Scheduled Block: Fire (SELF)
      • This is fire ticks
      • Runs twice a tick
      • Mostly doesn't take a lot of time
      • On laggy ticks it's used up 66% of the tick
        • It's possible it's not spread out equally among those 4 ticks
    As for why these take up such a large chunk of a few ticks, I'm unable to tell you. But it's clear that most ticks are handled with no performance issues and there's only a few problematic ticks. The server is able to compensate and catch up (because subsequent ticks have a lot of free time) so the average TPS remains at 20.
     
  6. Downloaded both of these to no avail.

    Here are my new timings with 45+ minutes and 11 players and no sign of any plugins being the issue: https://timings.aikar.co/?id=43e06953f6f74c07ac900ac1f51a3652
     
  7. Those plugins dump out the startup flags to your log file, so you can look at them and post them here, like someone asked you to. They don't affect the operation of your server.
     
  8. Hello! I am super new to servers so I apologize for acting like an idiot! Here are the startup flags!

    [MemCheck] Enabling MemCheck v1.01
    [04:22:32 INFO]: [MemCheck] Enabled metrics. You may opt-out by changing plugins/bStats/config.yml
    [04:22:32 INFO]: [MemCheck] Number of processors: 32
    [04:22:32 INFO]: [MemCheck] Physical memory: 257387 MB
    [04:22:32 INFO]: [MemCheck] Maximum heap: 4096 MB
    [04:22:32 INFO]: [MemCheck] Maximum metaspace: 512 MB
    [04:22:32 INFO]: [MemCheck] server.properties view-distance: 8
    [04:22:32 INFO]: [MemCheck] Command line options:
    [04:22:32 INFO]: [MemCheck] -Xmx4096M
    [04:22:32 INFO]: [MemCheck] -XX:+UseContainerSupport
    [04:22:32 INFO]: [MemCheck] -Dcofh.rf.crashOnOldAPI=false
    [04:22:32 INFO]: [MemCheck] -Dfile.encoding=UTF-8
    [04:22:32 INFO]: [MemCheck] -Dfml.readTimeout=240
    [04:22:32 INFO]: [MemCheck] -XX:+AlwaysPreTouch
    [04:22:32 INFO]: [MemCheck] -XX:+DisableExplicitGC
    [04:22:32 INFO]: [MemCheck] -XX:+UseG1GC
    [04:22:32 INFO]: [MemCheck] -XX:+UnlockExperimentalVMOptions
    [04:22:32 INFO]: [MemCheck] -XX:MaxGCPauseMillis=50
    [04:22:32 INFO]: [MemCheck] -XX:G1HeapRegionSize=4M
    [04:22:32 INFO]: [MemCheck] -XX:TargetSurvivorRatio=90
    [04:22:32 INFO]: [MemCheck] -XX:G1NewSizePercent=50
    [04:22:32 INFO]: [MemCheck] Number of processors: 32
    [04:22:32 INFO]: [MemCheck] Physical memory: 257387 MB
    [04:22:32 INFO]: [MemCheck] Maximum heap: 4096 MB
    [04:22:32 INFO]: [MemCheck] Maximum metaspace: 512 MB
    [04:22:32 INFO]: [MemCheck] server.properties view-distance: 8
    [04:22:32 INFO]: [MemCheck] Command line options:
    [04:22:32 INFO]: [MemCheck] -Xmx4096M
    [04:22:32 INFO]: [MemCheck] -XX:+UseContainerSupport
    [04:22:32 INFO]: [MemCheck] -Dcofh.rf.crashOnOldAPI=false
    [04:22:32 INFO]: [MemCheck] -Dfile.encoding=UTF-8
    [04:22:32 INFO]: [MemCheck] -Dfml.readTimeout=240
    [04:22:32 INFO]: [MemCheck] -XX:+AlwaysPreTouch
    [04:22:32 INFO]: [MemCheck] -XX:+DisableExplicitGC
    [04:22:32 INFO]: [MemCheck] -XX:+UseG1GC
    [04:22:32 INFO]: [MemCheck] -XX:+UnlockExperimentalVMOptions
    [04:22:32 INFO]: [MemCheck] -XX:MaxGCPauseMillis=50
    [04:22:32 INFO]: [MemCheck] -XX:G1HeapRegionSize=4M
    [04:22:32 INFO]: [MemCheck] -XX:TargetSurvivorRatio=90
    [04:22:32 INFO]: [MemCheck] -XX:G1NewSizePercent=50
    [04:22:32 INFO]: [MemCheck] -XX:G1MaxNewSizePercent=80
    [04:22:32 INFO]: [MemCheck] -XX:InitiatingHeapOccupancyPercent=10
    [04:22:32 INFO]: [MemCheck] -XX:G1MixedGCLiveThresholdPercent=50
    [04:22:32 INFO]: [MemCheck] -XX:MaxMetaspaceSize=512M