[GUIDE] Server Optimization⚡

Discussion in 'Performance Tweaking' started by Celebrimbor, Nov 6, 2017.

  1. Invisible-Bug is fixed in the last update today
     
  2. Celebrimbor

    Patron

    That’s good new. Heading in the right direction.
     
  3. Are these 2 plugins good for optimization?
    https://www.spigotmc.org/resources/entitytrackerfixer-fix-1-14-4-entitytick-lag.70902/
    https://dev.bukkit.org/projects/customvillage
     
  4. Celebrimbor

    Patron

    UPDATE
    Added dedicated section in Paper.yml for per-player-mob-spawns

    per-player-mob-spawns
    Def: false
    Opt: true
    Impact: Minor

    ➫ This implements singleplayer spawning behavior instead of Bukkit's random algorithms. This prevents the actions of others (i.e. Massive farms) from impacting the server's spawn rates.

    Note: If you lowered spawn-limits in Bukkit, consider resetting them closer to default. This setting lessens the need to lower spawns.
     
    • Like Like x 1
  5. Celebrimbor

    Patron

    entitytrackerfixer - Still looks shaky with some significant bug reports here and there. Wish it was ready for the guide.
    customvillage - Not sure this does much for performance. Villagers require adequate beds to breed, so not sure if this person created a plugin based on an isolated case or what. Never heard of indefinite villager reproduction.
     
  6. I use 3 plugins to fix some Minecraft exploits on my server, they are:
    https://www.spigotmc.org/resources/fixpack-1-13-1-14.68102/
    https://www.spigotmc.org/resources/dupe-fixes-illegal-stack-remover.44411/
    https://www.spigotmc.org/resources/2ls-exploitfixer-advanced-server-anticrash.62842/
    https://www.spigotmc.org/resources/bookexploitfix.5897/

    My server already has the LagAssist plugin installed, do you think the FarmLimiter and PandaWire plugins would be beneficial to its performance?
     
  7. Celebrimbor

    Patron

    Those plugins are not really to do with performance.

    The Farmlimiter would help if you have players with Large Mob Farms.

    PandaWire...it could help. I know it breaks a number of redstone contraptions. I'm pretty sure it's not compatible with Paper. Luckily, if you use Paper you get the benefit of their redstone algorithm which both outperforms Pandawire and does not break any devices. It's also free.
     
    • Useful Useful x 1
  8. Celebrimbor

    Patron

    It is a little sketchy. It can halt lag due to mobs, but once the lag stops, it starts ticking everything again to unfreeze mobs. So this has a tendency to just create stuttering lag spikes instead of consistent TPS loss. Maybe it's been revised to be more selective and more async with it's tasks. I would avoid it unless you're desperate, which goes for all lag reduction plugins.
     
    • Agree Agree x 1
  9. I have an update coming very soon for that plugin which addresses these issues and adds a few new things that people might like more than the whole TPS freeze system. Notably there's something which works in a similar vein to nerf-spawner-mobs, except it nerfs mob farms like so: https://i.imgur.com/68NLWST.gifv

    It basically kills the movementTick and some of the AI tick of farm mobs, which is often a hefty fraction of their total tick.

    What would be your opinion of this feature?
     
    • Friendly Friendly x 2
    • Winner Winner x 1
  10. Celebrimbor

    Patron

    Sounds nice.
     
  11. Please confirm ticks-per.monster-spawns in bukkit.yml is still working, we seems getting new mob spawning every tick when we set this value to 10, for all players and it spawned a huge amount of mobs, with per-player-mob-spawn: true and the default mob limit in bukkit.yml.

    Furthermore nerfing mobs isn't effective like it used to be. We found doTick() methods that ticking entities in both ChunkProviderServer (or the related methods if I could recall it) and EntityLiving.movementTick()
    Which could be doing something even if the mob is being nerfed.
    I could be wrong, correction will be appreciated.

    We have a plugin that nerf mobs to reduce lag a few years ago, but with paper 1.14.4, we could still see a lot of entity ticking and chunk (of course) consumptions in spark sampler.
    The plugin is here if you are interested, it's open source.
    https://www.spigotmc.org/resources/yasui.47214/
     
  12. Wow, all the owners of the plugins I use are here now.
     
  13. Celebrimbor

    Patron

    The setting works (afaik). Are you aware that 10 ticks is 0.5 seconds? 10 is still really fast. Also, the tick delay has no impact on the spawn numbers, just how fast it will try to spawn mobs if the cap is not reached.
    You can lower the mob caps until you reach a level you like. You probably have a lower spawn range and render distance as well, which makes the spawning condensed.
     
  14. Not really, we have view distance at 10 and spawn range 8, which are the vanilla default values.
    And I didn't see anywhere that actually handle the mob spawn is invoking this value (both getter method and the variable)

    I would try with 40 on next restart of the server anyway.
     
    #295 phoenixlzx, Sep 10, 2019
    Last edited: Sep 10, 2019
  15. Celebrimbor

    Patron

    Right. Then you might just try lowering the spawn numbers a little until you get to what you want. Spigot/Bukkit have been using these wacky spawn algorithms for so long that they've become normal. The 70 as default is probably way too high when single-player spawn rules are applied.
     
  16. Puremin0rez

    Moderator

    I personally use a hostile limit of 50 (everything else left default) and with per player spawning, everything seems to to be perfectly fine. 10 view distance, 8 mob spawn range.
     
    • Like Like x 1
    • Informative Informative x 1
  17. Celebrimbor

    Patron

    Yeah, might still be valid to lower rates even after per-player spawning is applied. Might make a language change on that.
     
  18. On 1.14.4? How many players online and are they distributed across the map?
     
    • Winner Winner x 1
  19. Celebrimbor

    Patron

    UPDATE
    Added EntityTrackerFixer to plugins list, but with disclaimer that is should only be used in cases of severe lag from entities. Hopefully the plugin continues to stabilize. Can remove disclaimer once more time passes.
     
    • Like Like x 2