Welcome to Keen Software House Forums! Log in or Sign up to interact with the KSH community.
  1. You are currently browsing our forum as a guest. Create your own forum account to access all forum functionality.

Server Sim Speed?

Discussion in 'Multiplayer' started by Sensei, Mar 20, 2017.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. Sensei Trainee Engineer

    Messages:
    57
    Hey Keensoft! I want more than anything in this game to go online into a dedicated server, and build my castle with other players who to help or go to war with.

    Today I tried to join the two most popular MP servers. One had 14 players, the other had six. The first one had a server simspeed of 0.33- it was such a chore to climb up the hill I started on at 1/3 speed, jumping like I was on the moon, that I gave up and left. A similar story for the next most popular one, with 6 players: 0.4-0.6 sim speed fluctuating up and down, it was a chore to do basic tasks and I left.

    This game has basically no public multiplayer community at all, and I suspect that's because servers become unplayable once they've been running for a while.

    I ask, to Keen and other players/admins, are there any dedicated server settings that can help a game run better, aside from resetting and deleting everything people have made? How much construction can a server handle before the simspeed drops significantly, in your experience?

    And I beg: Keen! Please focus on this, above all else! No cool new features in this game matter to me if the basic act of walking around in multiplayer is doomed to be absolutely miserable on any server that has a decent amount of things built.
     
    • Like Like x 1
  2. ibisgrunk Apprentice Engineer

    Messages:
    183
    bump that ^^, and note that if you play siege warfare it really gets slow... sometimes with as few as 4 playing... fracturing objects and projectiles. a drawbridge can be a two minute event closing and crafting simply intolerable. this game has to be able to prove itself of capable of handling what it is hoping for- building and destroying in real time. as it stands now the game cannot meet the performance demands in my experience. agreed this is a priority. nothing would be better than 20 folks shooting catapult shot at each other, what i think the dream here is.
     
    • Agree Agree x 1
  3. Sir_Moodz Apprentice Engineer

    Messages:
    377
    Main problem with most servers is that they use a "server cpu" They are slow but have many cores. Good for doing a lot of different things, bad for physics simulation.
    If you want to avoid simspeed lag look at the following math: people * ( √(static objects) * dynamic objects² ) = cpu load
    Try to use the medieval master cleanup tool to remove all dynamic objects smaller than about 3-4 blocks, because they never despawn and people seem to forget about them. Doing only that will give some old servers easily 50% performance boost.
    Also try not the make massive cities, especially if a lot of people are active there.
    Never expect good simspeed when large buildings are collapsing. This is impossible with current hardware. But there is definitely still room for improvement.

    The main thing the game needs (and SE could use this even more) is to be able to split the simulation into several grids so multiple cpu threads can be used. As long as people build far enough from each other this will practically solve all simspeed problems and allow servers of 50+ people.
    To do this they will need to change a lot of core code and it will not be easy, but I believe its the only real solution to multiplayer, other than waiting 10 years for better hardware...

    Another reason why the above here is absolutely a must, is because of the mechanical blocks that will soon be here. Automation is what currently kills SE multiplayer, and it will wreck ME multiplayer as well.
     
    • Like Like x 1
  4. ibisgrunk Apprentice Engineer

    Messages:
    183
    >> i would like to make this into a Ten Commandments thing for server admins and caring players: (1) clean up any and all less than 4 block dynamic objects not having purpose, (2) reduce city and village sizes, maybe think more castle and less urban (3) collapsing is always fun because everyone stops what they are doing and types into chat which inevitably results in someone admitting to a falling tower or such, (4) and realize more automation means slower sim speed.

    your formula may replace my favorite of F=M*A, with people * ( √(static objects) * dynamic objects² ) = cpu load. So being the moron, basically half the static and twice the dynamic is the cost?

    so when i join a game sometimes the siege craft are vibrating wildly. you often hear the wood snapping and going crazy in audio. i assume this is some locked physics engine in the rope drum tension? i have seen a trebuchet destroy itself and rebuild itself in an endless loop. and i mean like a Slinky... That cant be good? Note that sometimes the same weird effect is in the automated farm stuff, i have seen stuck farm machinery which again cant be good?

    also two easy detectors for a server wanking: how slow the drawbridge operates, and how slow the food crafting goes... either of those being awful and its a good time to leave the server imo.

    quick question -- do fires, as in lit wall torches and braziers, add to the chaos? how does fire work, dynamic or static, or does it matter?
     
  5. Sir_Moodz Apprentice Engineer

    Messages:
    377
    Fire objects are 100% locally and do not affect servers, for the server its just an object with a Boolean variable (on/off)

    trebuchets destroying them self is (or was?) a bug with server sync and is not related to server performance

    big dynamic objects that are vibrating is a bug I think, has existed for a long time and I think it happens after server restarts but i'm not sure.
    Also happens sometimes when server performance is low.

    That formula is not meant to be accurate and there are many other factors that can be important, but I think generally it should be close enough.
    I'l explain it with some numbers:

    You have a city with 10 people, 2000 static objects and 50 dynamic.
    10 * ( √(2000) * 50² ) = 10 * (45 * 2500) = 1 125 000
    Adding 1 player to the city increases server load by 10%
    Adding 1 dynamic object increases server load by 4%
    Adding 1 static object increases server load by 0.025%

    This is just one example and each number heavily depends on the other numbers to calculate the final result
    example: 50 people in an empty field works fine, but 50 people in a huge city is impossible. Or building a complex dynamic object is no problem in the wild even with several people, but building it alone in your massive castle full of statics causes lag
     
  6. ibisgrunk Apprentice Engineer

    Messages:
    183
     
  7. Sir_Moodz Apprentice Engineer

    Messages:
    377
    a smaller world won't do much good, since the game uses a view distance. This unloads objects far away from any players.
    The world is also procedurally generated, voxel data (or farming related data) is only saved when you alter the terrain, so a very big world is just as big as a tiny one.

    In general older worlds will become much slower and changes to voxels, which are permanent, will have the same performance impact as static blocks. This is why its not always a good idea to have big mines and stuff near your already big town.
    Also I think voxels should be restored the same way abandoned buildings decay, but maybe a lot longer before it happens.
     
  8. Sensei Trainee Engineer

    Messages:
    57
    This is all, of course, dependent on a few factors which we don't know, and it would be neat if Keen could answer for us.

    Here are a few unknowns which could affect ME server sim speed:

    Client information culling:
    How much information is being sent to clients that isn't necessary? This was one of the things that made Space Engineers multiplayer go from "unplayable" to "playable" as I recall, even while the game was still dependent on Steam Networking. At first, players were being sent EVERYTHING in the game world, now in SE players are only sent information about objects they might be able to see, if an object is far away from a player then its position, speed, etc are not sent to that player. I don't know if this primarily affected simpeed or just networking stuff, but I'm curious how aggressively ME culls this information. The comments about many small structures increasing CPU load a lot makes me wonder if every separate structure is being sent to all players, like SE used to do.

    Structural Integrity:
    Obviously, everyone wants Structural Integrity on because they want buildings to collapse when you shoot them with a catapult. This places a huge load on the CPU whenever changes are made to a structure such as adding a block, removing a block, or damaging a block. There may be some room for optimization there but it basically can't be avoided that this will be one of the most intense operations the game offers, and might cause temporary simspeed reduction. However, what about when structures are NOT being modified? Is the server constantly doing expensive updates on each structure to check if something has been changed, or for live loads? If so, how often? I don't know if this is happening, but if it is, it could be avoided by reducing the frequency with which structural integrity is updated (especially to ONLY when structures change, if possible) and also possibly staggering out updates, so that, say, some structures update every even-numbered game tick, and some every odd game tick, so that only half of structures are being updated each tick. Furthermore, is structural integrity being checked for structures with no players nearby? If there isn't a player within catapult range, structures should definitely "sleep" and not be updated.

    Garbage Cleanup:
    What garbage cleanup is currently implemented in ME? Both structures and voxel changes need to be remembered, and eliminating those is obviously helpful. People seem to be saying that manual garbage cleanup is necessary, is there any automated way to delete certain structures and revert certain voxel changes? Maybe voxel changes not within a certain distance of a structure could be reverted, and structures which haven't been seen by a player in a certain (configurable) amount of time could self-delete. I remember one of the weekly update videos discussing a garbage cleanup in which structures would slowly decay in a realistic fashion- was this implemented? If it is/will be, server admins should be able to disable it in favor of a simple, 'ugly' garbage cleanup which poofs structures out of existence all at once, because this seems like a process which could consume a lot of CPU time. Also, server admins, have any of you implemented scripts which clean up objects aggressively, like the SE servers where everything without a beacon is deleted frequently? If someone hasn't made something like this already (maybe "all structures without a banner") it could possibly be very helpful.
     
    • Like Like x 1
    • Agree Agree x 1
Thread Status:
This last post in this thread was made more than 31 days old.