Lag and crashes and what not

Discussion in 'Performance Tweaking' started by Mithrandir, Aug 19, 2018.

  1. Network Description:
    - 4 servers: Survival, Factions, HungerGames & Paintball
    Network Hardware:
    It's this kimsufi host from ovh:
    View attachment 364753
    Problematic Server description:
    - Survival
    - 63 installed plugins (Used to have around 52, with the same simptoms)
    - 4 worlds managed by multiverse: Survival, Survival_nether, Survival_the_end, and PVE-EVENT (A paralel world where events are run and you can find other stuff to do such as shops, bosses, drops etc...)
    - 10 players average on the whole network (It's the most played server anyway, so the whole traffic is most probably there), 20 players on rare occasions.

    Symptoms: The server runs relatively fine all day, you can spot tps drops up to 14 tps, which obviously isn't great for only 10 players. Then around 3:30 A.M, the server starts hardcore lagging into crash, usually once a day at that time, no matter how many players. I once even made a server restart right before that, and it crashed at it's usual time. Can sometimes not lag nor crash at all for 1 or 2 days.
    Also, if the server is at more than 20 players, the lag risk really increases, but it doesn't usually crash in that situation, just lag.
    After a Survival Crash, the simptoms usually spread to other servers, usually Hub, which crashes shortly after Survival.
    Timings: (Yeah, worldguard consumes processing power 24/7, which it only does on survival for some reason, and even with nothing configured, just a default install. It's fully installed and configured the shit out of on factions, and it doesn't lag that bad there.)
    /Top: (TopLite)
    /Mem: (ClearLag)
    Notice the obscene ammount of tiles. Someone already told me to reduce hopper speed on a previous thread through Spigot, which I did, but it doesn't seem to be enough. Also, 3,401 chunks for 11 players = 309 chunks per head, how is that even possible? Are these chunks loaded?

    Survival plugins list: (One of them isn't loading, gotta check why)

    Any advice on how to optimize is appreciated.
    #1 Mithrandir, Aug 19, 2018
    Last edited: Aug 19, 2018
  2. The odd thing about this is how it crashes at a time every day and that it spreads...

    I’m thinking... maybe a plugin is trying to check for an update but fails in some horrible way and the server crashes? What time zone are you in? Because if it’s trying to check at midnight est and ur in California or whatever... idk it could be why...

    EDIT: Christ and the tiles... maybe a plugin is loading chunks...?
  3. Phoenix616

    Resource Staff

    Part of your issues seem to be hoppers. Either tone down the amount of them (by providing your players with some alternatives like pipes or automatic sorters), disable the listeners of plugins that use the InventoryMoveItemEvent (e.g. WorldGuard has a config option for that, this might slightly lower the security of protected regions though) or optimise how the InventoryMoveItemEvent is called (it gets called for each move attempt, even when the target block inventory is full. I wrote a slightly hacky plugin to fix that if you want to check if that's the issue)
  4. Hey sorry for the extremely late answer, you guys are realy helpfull. The hopper issue has definetly been brought up to me in previous ocasions, and for now I've nerfed hoppers by reducing their speed x3, and increasing their item load x3, with the spigot optimiziation configuration. It seems to be helping... players are doing a lot of cactus farms because they give good money, and there's tons of hoppers, maybe I should just nerf the value of cactus.

    @snadol Time zone: Madrid/Spain
    I can only suspect GriefPrevention, since it's the only difference between Survival and Factions servers, and Factions always runs smooth no matter the player ammount or render distance. But yeah, the ammount of load chunks and tiles per head is pretty unreasonable.

    @Phoenix616 Pipes... isn't that a mod? Doesn't vanilla automatic sorting actually require vanilla hoppers?
    I'll also give that MoveItemEvent a check, thanks.
  5. Phoenix616

    Resource Staff

    I was thinking of plugins that add these functionality in a way more lightweight manner than Vanilla hoppers. E.g. on my server we wrote a custom pipes plugin to work around issues like that (and give our players another cool feature ;D)