Currently due to the way Space Engineers dedicated servers are coded, the maximum CPU the game server can use is ONE full core, once you hit this limit you will start to experience a drop in sim speed/lag and at worse crashes. Whilst you are on a top of the line hardware you will still reach a limit due to the games coding. Although Space Engineers has improved this aspect somewhat now, and the server can to a certain degree use more resources, you will still see a slow down and should still follow the advise in this tutorial for the best performance of your game server.
So when this happens you need to reduce the world and run a cleanup. There are a few ways to do this which we will help with in this tutorial.
You can see your resource usage via looking at your performance monitor that will look something like this.
This shows the game server running at the maximum resource capacity it can, the flat lining shows it is unable to go higher. You are aiming to bring the resource usage down so the server is running smoothly, which will bring you a smoother gaming experience in the process.
You have a few options for cleaning up such as: SE Toolbox, SpaceMaster, Torch.
We now have an improved tutorial for cleaning up the server using SE Toolbox, you can access this here
Download here: https://github.com/midspace/SEToolbox
1- Install the program to your PC.
2. You will need to login to your control panel, click file manager.
3. Click saves, inside here is your maps.
4. Select the folder which has the map you are using, once selected the download button will appear click download.
5. Once downloaded the map will be in a ZIP file, find somewhere to extract it and then open the world in SE Toolbox.
Once open in SE Toolbox, you can see all aspects of your game world. Ships, floating objects, distances of all these items and more.
With a cleanup you are looking for ships that have drifted far away from the area you are working, floating objects, Auto generated ships. You can also run resource reports, showing whatthe world has in it by item. Lots of turrets / rotors or other resource intensive blocks can cause trouble in the world.
Deleting floating objects: Order the list by type, CTRL + CLICK the top floating object. Then find the bottom floating object of the list and press CTRL + SHIFT + CLICK. This should highlight them all. Then click delete (red cross) on the tool bar.
Checking for drifting ships/items: Order the list by distance, further the distance the more resources used on generating a bigger world, we advise to ensure everythign is kept to witihin 1000KM and expand as required. Infinite worlds need to be monitored for drifting items/ships.
Ships: The game will generate automatically ships and stations, overtime these will slow down your server and must be removed. You should delete all auto generated grids, they will re-spawn again over-time. We advise that you RENAME ships to include *KEEP* so when it comes to running a cleanup, you can just delete everything without *KEEP* in the name. Although watch out for rotors, pistons and wheels, as these can show up as a seperate grid, you will notice these as when you click on it, it will show you that it has a rotor, piston or wheel part in the grid. These should then be left.
Resource Report: Click WORLD > REPORT ALL RESOURCES. A new window will open, click GENERATE REPORT. This generates a report of the world showing block counts, block types, ships, stations and lots more and can help you get a good picture of your worlds content to assist with cleaning up, improving performance
Projectors: Projectors have a more likely chance to cause decreased performance and other isues on your server, you should try removing them to see if the problem is then resolved.
SpaceMaster (Ingame admin tool)
Space Master is an ingame admin tool used by pressing ALT+F10 it allows you to search through entities in the world and delete them, including deleting floating objects. There is alot of options for this tool but not much documentation so feel free to play around with it. If you use it and delete something you wanted we are unable to do anything about it so make sure you know what you are deleting. This official video from Keen gives you an overview.
Please note, SpaceMaster is not suitable to be used exclusively for your clean up efforts, its good to keep you going through the day, BUT you must also use SE Toolbox to ensure the best cleanup and best running of your game.
Torch + Essentials Plugin
There is also a way to cleanup the world using Torch and the Essentials plugin for it to setup automatic cleanups. This can help with your cleanup efforts, but SE Toolbox should still be used.
With our Space Engineers servers Torch and the Essentials plugin can be activated in just one click and easily configured via the configuration file or through in-game commands.
For assistance on setting up Torch automatic cleanups you should seek the Torch documentation or contact the Torch team via their Discord server, here is an invite link.
Other reasons for decreased performance
There are other things that can cause a decrease in performance or lag such as mods, in-game scripts and configuration settings.
The order of likelihood to cause lag is like so:
2) Bad mod
3) In-game script
4) Configuration setting
For mods and script please see our tutorial here , if after running a cleanup, testing for bad mods and bad in-game scripts. Please contact us at firstname.lastname@example.org or here and we'll be happy to look into your configurartion settings and provide further assistance to get your Space Engineers game server running perfect again.