[Solved] Lagspike on RTP

Discussion in 'Performance Tweaking' started by Leomelonseeds, Jul 24, 2018.

  1. Recently each time any of my players so /rtp, there is a 2-3 second tps lagspike affecting every online player. I have already pregenned the world and such. I use the RandomCoords rtp plugin.

    System specs:
    Intel i3 @ 3.4GHz
    2T HDD
    8G DDR3 ram, 6G allocated to Minecraft.

    Any help is much appreciated :)
     
  2. I think it may be a drive speed issue.

    Even if the world was pre-generated, a HDD is too slow to pull the information it needs to send to the client.

    Also, it's recommended to run servers of SSD's as they have the read/write speeds to provide data to 100's of players quickly. HDD's don't have that ability sadly.
     
  3. Post a timings report.
     
  4. Preload the world with the world boarder plugin, upgrade your HDD to an SSD, upgrade to some DDR4 ram, and worse case scenario upgrade your cpu though that looks to be the only okay part of your hosting solution, in that order.
     
  5. "upgrade to some DDR4 ram" - i'm sorry, but that's usually not going to work without upgrading the CPU. And then you might as well go rent a proper server.
     
  6. Half of the above replies are nonsense.

    This is the best solution. RandomTP plugins all have the same "issue" where players are teleported into a completely remote area where no chunks are generated yet. The server then has to, depending on server view distance, generate and write over 100 chunks. Obviously this caused somewhat of an impact on the machine. Suggesting to use better hardware is just stupid in my opinion as you can literally remove the need for better hardware by pre loaded the entire random TP range.
     
    • Agree Agree x 1
  7. Guys, I found the reason. The plugin was using Random.org to teleport, and once I set the option to false, there was no lag whatsoever. I am also finding that the time that other plugins take to communicate with external webpages and servers, and that players take a long time to log in. What might be the cause of this?
     
  8. And this is why you don't do drugs.
    <smoke weed every day gif here>

    Plugins shouldn't even be communicating to other servers/websites to begin with, unless absolutely needed to provide the functionalities it comes with. And if they do, it should be done in a non-blocking way.
     
  9. Guys, I found all the solutions. The plugin communication slowness (ie. buycraft) was caused by putting DROP instead of REJECT in Iptables, which somehow made everything slower. Now my server is running like a charm :D

    Thanks everyone for your help!