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.

Guide to reduce lag in MP [Under construction]

Discussion in 'Multiplayer' started by Svardskampe, Apr 9, 2014.

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

    Messages:
    22
    Hey, as we all know that servers can be quite heavy on everyone, and never found such a guide on the internet myself, I'd like to take the initiative and condense all known information in a single topic. I have a 100/100 fibre optic connection myself, an i7 860, an HD7950 and 12GB of RAM which I use to host and play with.

    Initial settings

    Max players: This can vary in terms of activity of the players, but 6 seems to be the line where the lag increases enormously when more people join.
    Floating objects: Taxing as hell, 48 as maximum.
    Environment hostility: Not as taxing as you'd expect. Cataclysm and below will run just fine.
    Asteroid amount: depends on your RAM. Do you have 8GB? - Large will be your pick. If you have more RAM (also keep in mind that your system needs more as you will be running Windows and your own stuff as well, since there is no dedicated server yet). Extreme is for the people with higher RAM than 8GB, but you can get away with it on 8GB, depending on what kind of buffer you want to give yourself.
    Auto-save: off, a lag spike ensues every time you save, and I haven't met a lot of stability issues.
    Cargo ships: Preferably off. Depends on what your level of maintenance is (see below on SEToolbox). If you don't want to maintain it, then have it off. But of course you want to have fun as well. But in terms of lag; preferably off
    Weapons: Preferably off as well, but what fun is there in a server without weapons? So I would have this on on regardless though. And again, the increase in lag is merely temporarily when missiles and warheads are being fired, not a constant source.

    Server maintenance

    Now in terms of maintenance, when there is some lag, and you know you have flung some scrap into space, and you see cargo ships flying by at 2000km distance; Download SEToolbox and load your world.
    [​IMG]
    First, select on "type" and select all your floating objects by ticking the first one in the list, hold Shift, and select the last. Delete them all.
    Second, delete faraway entities by sorting the list on "Distance". Select all that are a safe distance away, say everything beyond 80KM and delete those. It's just cargo ships that flown away too far and scrap no one goes after anyway.

    Server policy

    This is something everyone can contribute to; proper policy to reduce lag.
    What completely detrimental to the framerate is, is lightning. Do not allow for constant stationary light source. No spotlights on the base. Spotlights are fine on mining ships, as they aren't active all the time, but just for a limited use of digging something away.

    Maintain the policy that you do not allow for stationary ships on dampeners. Have them landed on a magnetic foot, or just shut them down stationary in the space by pressing Y when sitting inside the cockpit. The thrusters tax the system in terms of light and activity, which is completely unnecessary when the ships are stationed anyway. Also, when people don't shut their ship down, their spotlights will stay on, which is detrimental because of aforementioned reason.

    Limit dynamic objects in use. Do not have constant rotors active, merely ones that are situational, like on doors or retractable paths from ships.

    When blowing something up, obliterate it completely so not a thousand entities float into space.

    Also take a look at the official performance guide here

    If people have more tips, please share them, and I will test them and incorporate them as well.
     
  2. Em3rgency Trainee Engineer

    Messages:
    31
    I've been running my (semi) private server since survival came out, and I've figured out all of these things myself by trial and error. I can attest that they DO work in reducing lag issues. Its just a shame that its so high maintenance. I have to check everything at least once a day, more if its been a particularly active day. Great job it writing it all up in one place ;)

    Also, something of personal note, I didn't notice any issues with lights on stations. Only on moving ships. What I'm thinking is basically, if the lights shadow and what not doesn't need to be recalculated (stations can't move in any way), theres no issue.
     
  3. Svardskampe Trainee Engineer

    Messages:
    22
    To test it, I built this pole on my multiplayer server with spotlights. And I can assure you that when lag starts to kick in, it does make a difference turning them off vs. turning them back on again. Turning them off suddenly limits lag a bit.

    [​IMG]
     
  4. Xocliw Public Relations Staff

    Messages:
    2,615
    I've always found this with spotlights, my first reaction to when there's lag in game is to search for a spotlight that's been left on. Performance of them and their shadows has been improved very little since launch.

    Hopefully the devs will sort it soon :thumb:!
     
  5. Bad_Idea Apprentice Engineer

    Messages:
    498
    The ram thing isn't always true, personally i usually run a 28 asteroid (SETools edited, of course) server with around 8 people on at all times, the lag isn't noticeably bad. I run 8GB of ram.
     
  6. Xocliw Public Relations Staff

    Messages:
    2,615
    Nice guide by the way, well presented and short but sweet. For beginners this will be very useful, so they don't have to spend hours working it out by themselves.
     
  7. marek_rosa Developer Staff

    Messages:
    115
    This is a very good guideline.

    I am adding our "performance advices": http://www.spaceengineersgame.com/performance-advices.html
     
  8. JamesL86 Senior Engineer

    Messages:
    1,091
    I always seem to get a little giddy when Marek pops in on a forum thread. :D
     
  9. Evis Apprentice Engineer

    Messages:
    240
    Hey Buddy, Nice Guide!

    On The Question: is gameplay still jittery out to 80km? When this sandbox first went live, I ventured into the abyss; I was shaking so much, it was like my player was dancing.

    I occasionally run a server with 8 gb ram, but usually see a correlation in CPU usage to user complains which I imagine wouldn't be a problem in a dedicated server environment. At present, if everyone has a strong connection, and there's no over-taxing of the host; the extreme asteroid setting doesn't seem to be a problem.

    On Drilling: I noticed is drilling and floating ore does significantly increase lag so limiting those is paramount. This isn't so bad with occasional use, but often occurs when many drills [5+] are actively deployed.

    On Lighting: The lighting impact on lag is disappointing, as much of the activity takes place in the shadows, particularly in hangers. I suppose using them in a limited fashion would have minimal impact, but difficult to say for larger bases. Then again, you can only render lights at a certain distance, so the key here (besides optimization) is to control their 'density.'

    On Cargo Ships: if you interact with the pilot seat, and then abandon it; it will continue on its track well off into the far reaches of space. Until I used SET, one had reached 1200 km. If you don't interact, it should naturally despawn.
     
  10. ozarkamax Junior Engineer

    Messages:
    542
    the alpha game world ends at 50 x 50 x 50 km. If you go beyond that, expect to wig out beyond control.
     
  11. BigDaddy Trainee Engineer

    Messages:
    82
    I did not know about the SE tools. I currently have 3 ships with beacons floating insanely far away. One at 5,000,000 meters. Hopefully I can fix that lol.
     
Thread Status:
This last post in this thread was made more than 31 days old.