Extremely heavy server lag caused by large turret arrays

    Joined
    Jun 24, 2013
    Messages
    710
    Reaction score
    11
    I found a rather interesting issue.

    One of the factions on our server has built an impressive base with a lot of bobby_AI turrets.

    Now, somehow, these turrets are lagging the crap out of the server once they start firing, not sure why, but they are actually lagging the server so hard, that it would simply stop responding for a minute, or just freeze entirely.

    I tested this twice, by throwing in random AI ships.



    Both times, the following would happen:

    Once the turrets lock on and start firing, it takes 3 seconds before the server will stop responding. The server will only start to respond again when the foe gets far enough to be shot at.



    Our server is very capable, and there is no reason why an array of turrets should crash it, so that's why I think something must be malfunctioning within the AI blocks, or with the turrets themselves (maybe excessive collision detection that's not necessary?).

    Did anybody else run into this issue?
     
    Joined
    Jun 24, 2013
    Messages
    710
    Reaction score
    11
    This only seems to happen when at least some people are on the server.

    I tested it with white-list, nothing unusual, but with people around, crashes.
     
    Joined
    Jun 26, 2013
    Messages
    262
    Reaction score
    15
    • Legacy Citizen
    • Purchased!
    Do you know how the turrets are designed? Is the design basically a large block of checkerboarded AMCs? A sufficient number of turrets with that design, or ships with their AMCs in that design, or even just one ship with several thousand checkerboarded AMCs, is capable of doing that to a server. (How many probably depends on the server)

    P.S. Bogging down like that isn\'t crashing.

    Checkerboarded AMCs are the most power-efficient and DPS-efficient configuration that exists for AMCs, with only one major problem: They are hard on servers because they fire one projectile per weapon block, resulting in the servers having to look up tens of thousands of individual weapons, check their reload times, fire individual projectiles for each one, calculate collisions for them, calculate projectile bouncing and additional impacts, calculate power drain for firing every individual weapon unit, and so on. I suspect (and I may or may not be correct) that most of the slowdown is from checking the reload times constantly for every weapon unit, or trying to fire them while they\'re not ready, or something like that. Something seems to happen constantly which only causes these slowdowns as a result of having thousands of weapon units and trying to fire them, and it\'s probably not due to the AI aiming or anything like that because you can cause the same slowdown in a lone starship with a few thousand checkerboarded AMCs all linked to a single weapons computer when you hold down the fire button, with the game slowing to the speed of molasses and staying there so long as you hold down the fire button - and if you just click the fire button instead, it just freezes momentarily, fires all the guns, and goes back to an apparently normal speed (although who knows if you could still slow it down with more guns; at that point I was getting lagpauses trying to add more cannons to the cpu).