Recognized Fixing Server Stability - Decay

    Joined
    Dec 17, 2015
    Messages
    57
    Reaction score
    11
    This idea is simple, create a 1-2 week time limit to the life of any entity that hasn't been interacted with.

    Once the time limit is reached it would decay over the course of a couple of days due to "space rocks " causing block disintegration.

    Basically utilizing the effects the Sun already has over time to rid databases of unused entities like planet parts/cores, asteroids, direlect stations/ships etc.
     

    Nauvran

    Cake Build Server Official Button Presser
    Joined
    Jun 30, 2013
    Messages
    2,346
    Reaction score
    1,195
    • Master Builder Bronze
    • Competition Winner - Small Fleets
    • Legacy Citizen 10
    Fixing collision detection is probably more important, besides things in unloaded sectors doesnt impact a server since, well it's not laoded in.
    Otherwise this would be nice enough, I've seen too many people leaving cores floating around everywhere.
     

    therimmer96

    The Cake Network Staff Senior button unpusher
    Joined
    Jun 21, 2013
    Messages
    3,603
    Reaction score
    1,053
    • Legacy Citizen 10
    • Top Forum Contributor
    I've seen too many people leaving cores floating around everywhere.
    Core cleanup is something that would be nice, but the main suggestion would cause more lag, having to load in each sector, check for entities to kill and actually doing the damage to them
     

    jayman38

    Precentor-Primus, pro-tempore
    Joined
    Jul 13, 2014
    Messages
    2,518
    Reaction score
    787
    • Purchased!
    • Thinking Positive
    • Legacy Citizen 4
    Fixing collision detection is probably more important, besides things in unloaded sectors doesnt impact a server since, well it's not laoded in.
    Otherwise this would be nice enough, I've seen too many people leaving cores floating around everywhere.
    I suspect this will primarily help most servers' spawn sector by removing abandoned builds. Collision Detection sounds unrelated, as it is very unlikely that the average player will accidentally run into a core in open space. Collision detection sounds off-topic, unless you happen to know that the dev team is keen on collision development right now.

    Core cleanup is something that would be nice, but the main suggestion would cause more lag, having to load in each sector, check for entities to kill and actually doing the damage to them
    The sector would not need to be loaded in. Each entity could have a "last interaction" date and time saved somewhere. Then at periodic intervals, the server runs through its full entity list one at a time, doing heavy damage to all entities which have interaction timestamps older than a server-set time limit.

    I recommend that the server destroy entire chunks when damaging abandoned ships, especially in unloaded sectors. Maybe remove entire docked entities. Single-chunk small-ships like single cores will be wiped out on the first pass. Larger builds might take longer to wipe out, but if the faction block is in the chunk removed, the rest of that entity becomes a source of blocks for anyone who finds and salvages the derelict. Changing the color of the radar diamond of abandoned ships would help identify these abandoned ships and encourage salvaging operations.

    When running through these entity checks, the server should do some basic checks, to make sure it is not already overloaded with other things, like a big battle or massive salvage operation. And of course, there should be a server setting that changes the interval of this regular check or turns it off completely.
     
    Joined
    Nov 1, 2014
    Messages
    317
    Reaction score
    98
    • Legacy Citizen
    • Purchased!
    I think some extra admin/cleanup tools would fit the bill nicely, not sure if I'd like stuff to just decay on its own. For example, something that shows ships/stations that have not been touched in a certain amount of time, and has a batch delete or individual delete options, meaning the admin still has to click a button to do this.
     

    therimmer96

    The Cake Network Staff Senior button unpusher
    Joined
    Jun 21, 2013
    Messages
    3,603
    Reaction score
    1,053
    • Legacy Citizen 10
    • Top Forum Contributor
    I suspect this will primarily help most servers' spawn sector by removing abandoned builds. Collision Detection sounds unrelated, as it is very unlikely that the average player will accidentally run into a core in open space. Collision detection sounds off-topic, unless you happen to know that the dev team is keen on collision development right now.



    The sector would not need to be loaded in. Each entity could have a "last interaction" date and time saved somewhere. Then at periodic intervals, the server runs through its full entity list one at a time, doing heavy damage to all entities which have interaction timestamps older than a server-set time limit.

    I recommend that the server destroy entire chunks when damaging abandoned ships, especially in unloaded sectors. Maybe remove entire docked entities. Single-chunk small-ships like single cores will be wiped out on the first pass. Larger builds might take longer to wipe out, but if the faction block is in the chunk removed, the rest of that entity becomes a source of blocks for anyone who finds and salvages the derelict. Changing the color of the radar diamond of abandoned ships would help identify these abandoned ships and encourage salvaging operations.

    When running through these entity checks, the server should do some basic checks, to make sure it is not already overloaded with other things, like a big battle or massive salvage operation. And of course, there should be a server setting that changes the interval of this regular check or turns it off completely.
    Regardless, it would still be opening entities and performing actions on them, using precious CPU and RAM on objects that no one can see and are causing zero lag because they're not loaded.

    Try it, despawn_all is a command we have for removing all entities that contain a certain string of text in them. A few servers used to use them for getting rid of MOBS_ . It would absolutely murder performance because the database was being hit by so many querys that you couldn't load any new sectors.

    This is a bad idea on several fronts.

    1. It will use performance trying to remove objects that aren't costing any performance.
    2. People might not play the game for a month, come back and all their shit is gone. For literally zero benefit to the server beyond possibly lowering database size, which isn't that much of a problem unless the server is very popular, and even in that case, not a problem because hard drives are so big.
     
    Joined
    Dec 17, 2015
    Messages
    57
    Reaction score
    11
    Jayman has the idea down. All we keep doing is expanding the database memory size, so each time an autosave happens its not just a 1 min autosave....its a 10 minute autosave. Filling hundreds of Gigs of memory inevitably forcing a restart every 6 months.
     
    Joined
    Mar 30, 2013
    Messages
    729
    Reaction score
    281
    • Purchased!
    • TwitchCon 2015
    • Legacy Citizen 5
    Starmade servers seem to barely utilize available CPU and RAM though.

    Although I'm against the suggestion, I think more space junk is a good thing.

    In fact, I wish there was a setting that made it so ships didn't vanish after the overheat timer concluded.

    As someone said, ships chilling in unloaded sectors isn't hurting anything, except database size but who cares about that? Does the game even save sectors that haven't been loaded in since the last auto save?
     
    Joined
    Oct 11, 2015
    Messages
    21
    Reaction score
    9
    • Purchased!
    It is not an issue. Auto-save checks this, just look at server logs.
    I also agree with therimmer96, this is what will exactly happen, when unloaded and currently unprocessed sectors will be loaded in massive amounts just to clean them. As of collision calculations, it is for now major lag cause, especially with bigger ships with more turrets. When turrets in addition are also set to AI controlled, there is sometimes massive lag. It happens with ships with more than 300k - 500k blocks.
     
    Last edited:
    Joined
    Jul 21, 2013
    Messages
    2,932
    Reaction score
    460
    • Hardware Store
    Thinking about it, the problem of lag during database cleanup[not damaging old entities, just flat out removing them] can be avoided by having the server only perform cleanups when there are no players online. It doesn't matter how much the server lags if nobody is on it.
     
    Joined
    Dec 3, 2013
    Messages
    552
    Reaction score
    182
    • Legacy Citizen 9
    • Purchased!
    • Community Content - Bronze 1
    What would happen with fleets? For example, I intend to have fleets do much of my work. I don't plan on entering into those ships after creation, factioning them and setting up AI or fleet stuff as needed. SO If I am sending fleets around, why should they decay? What about the new factions that will claim territory and fight between themselves and players? In theory they could go a VERY long time without any interaction from players. Should they decay?

    I guess my main complaint is this: How would it fit in with fleet control, without making fleets useless and/or making all the ships temporary?
     

    jayman38

    Precentor-Primus, pro-tempore
    Joined
    Jul 13, 2014
    Messages
    2,518
    Reaction score
    787
    • Purchased!
    • Thinking Positive
    • Legacy Citizen 4
    What would happen with fleets? For example, I intend to have fleets do much of my work. I don't plan on entering into those ships after creation, factioning them and setting up AI or fleet stuff as needed. SO If I am sending fleets around, why should they decay? What about the new factions that will claim territory and fight between themselves and players? In theory they could go a VERY long time without any interaction from players. Should they decay?

    I guess my main complaint is this: How would it fit in with fleet control, without making fleets useless and/or making all the ships temporary?
    I would imagine AI, fleet commands, and other interactions would reset the interaction clock on the entity, so they would never "expire".

    The StarMade universe is about to be made more dynamic with a fauna system and multiple dynamic factions, run by AI. All these should reset interaction clocks, so that dynamic fleets don't spontaneously die, even if they are never touched by a player.
     
    Joined
    May 18, 2015
    Messages
    287
    Reaction score
    165
    • Purchased!
    I don't think the ships should decay, I think they should be stolen by pirates! When the timer runs out, the ship begins moving toward the nearest pirate station. If it reaches the station sector, then it joins the pirate ranks, and may come back to haunt you, spawning in with a wave of pirates.

    Note, that nothing is actually moving, just the ship coordinates would be changed every so often, and it would only get loaded when the current sector it's in is visited by a player.

    Stations could first change to un-factioned, decayed stations. Then a few pirate ships are placed around them. Finally, they change into a pirate station.
     
    • Like
    Reactions: jayman38
    Joined
    Mar 2, 2016
    Messages
    2
    Reaction score
    0
    This idea is simple, create a 1-2 week time limit to the life of any entity that hasn't been interacted with.

    Once the time limit is reached it would decay over the course of a couple of days due to "space rocks " causing block disintegration.

    Basically utilizing the effects the Sun already has over time to rid databases of unused entities like planet parts/cores, asteroids, direlect stations/ships etc.
    This would have the opposite effect, constantly loading unloading sectors would cause insane lag. When shit is unloaded it doesn't lag.