Solved Random lag spikes

Discussion in 'Spigot Help' started by MTC, May 15, 2016.

  1. MTC

    MTC

    Hi,

    I'm facing lag spikes that come out of nowhere.. well I think it is somewhat related to mobs AI, especially pig zombies. In fact, I run a GTA server, so I usually spawn pig zombies and wolfs to make them target players.
    But I also remove them when player dies, or when they are too far from their targets.

    So the server goes well during several minutes (~ 5 to 10 minutes), and suddenly my TPS drops to 10, even 5 sometimes.. Here are the timings during a lag spike: [removed]

    I tried to remove all the cops (so basically all mobs of my servers), it run better, but after 30 minutes my TPS dropped again: [removed]

    Btw, my server run on Spigot 1.8.8. And I already "optimized" my spigot/bukkit/server.propreties with pretty low view-distance (4), entity tracking/activate range, etc..

    Any ideas ?

    EDIT: So I just did a simple test. I removed every cops, so my TPS went to almost 20.
    Then I spawned 10 cops (pigmen/wolf) around me, and then TPS dropped to 4.7 during few seconds.. Here are the crazy timings: [removed]
    Seriously I've no idea why spawning few mobs and make them targeting me would literally explode my TPS..

    SOLUTION: It came from LeaderHeads, due to too many statistics I think. I removed it and now lag spikes are totally gone.
     
    #1 MTC, May 15, 2016
    Last edited: May 16, 2016
  2. MTC

    MTC

    By looking the time when the lag spikes occurred, I realized that it happens every 5 minutes precisely.
    Even if there is no mobs, TPS drops every 5min, giving me strange timings:
    - [removed]

    Now I don't even know where to search to solve that..
     
    #3 MTC, May 15, 2016
    Last edited: May 16, 2016