HomeGamesUpdatesPricingMethodology
Steam News4 August 20223y ago

Patch Notes: 1.8.1 - MP Lag Fixes

I recently joined an MP game hosted where the players were complaining of poor performance, and I identified some issues and fixed them.

Full notes

Full Voxel Turf update

Read the full published notes in a cleaner layout. The original post stays linked below.

What changed

1 fix0 additions3 changes1 removal
  • Performance
  • Server
  • Maps
fixedI recently joined an MP game hosted where the players were complaining of poor performance, and I identified some issues and fixed them.
changedThese performance upgrades mainly effect big MP maps, but because SP runs on an internal server SP get some small benefit.
changedThe two issues were to do with unloading chunks and autosaving. The server was checking *every* chunk *every tick* for *every player*. With 10k+ chunks loaded and 5 players running around this server chunk unloading was taking 200+ms every ticks! I've since changed it so that the server only checks a max 200 chunks for unloading every tick, and this number goes down if there are more players on the server. This check is effectively instant now.
removedThe second issue was with autosaving. For whatever reason it was taking 5 seconds to save lot data on their machine. On my test-big-map (16x16km) I was getting 500ms to save lot data. I have since multithreaded lot serialisation, reducing the save time to 100ms on my 24-thread machine, and moved the writing-to-disc stuff to a dedicated thread, knocking off another 50ms for a total speedup of 10x. Lot serialisation also occurs when a player logs into a server so this should also reduce/remove that lag spike.
changedVERSION 1.8.1 - 04/08/2022 =========== - [Performance] - vtserver: Lot serialisation is multithreaded. Reduces lag when autosaving, player log on and player log off. - [Performance] - vtserver: Lot saving to disc is done in a dedicated thread. Removes ~50ms of lag when saving on an SSD. - [Performance] - vtserver: Chunk unloading now only checks parts of the chunk array, rather than the whole array. Fixes constant lag in big MP maps.

I recently joined an MP game hosted where the players were complaining of poor performance, and I identified some issues and fixed them.

These performance upgrades mainly effect big MP maps, but because SP runs on an internal server SP get some small benefit.

The two issues were to do with unloading chunks and autosaving. The server was checking *every* chunk *every tick* for *every player*. With 10k+ chunks loaded and 5 players running around this server chunk unloading was taking 200+ms every ticks! I've since changed it so that the server only checks a max 200 chunks for unloading every tick, and this number goes down if there are more players on the server. This check is effectively instant now.

The second issue was with autosaving. For whatever reason it was taking 5 seconds to save lot data on their machine. On my test-big-map (16x16km) I was getting 500ms to save lot data. I have since multithreaded lot serialisation, reducing the save time to 100ms on my 24-thread machine, and moved the writing-to-disc stuff to a dedicated thread, knocking off another 50ms for a total speedup of 10x. Lot serialisation also occurs when a player logs into a server so this should also reduce/remove that lag spike.

VERSION 1.8.1 - 04/08/2022 =========== - [Performance] - vtserver: Lot serialisation is multithreaded. Reduces lag when autosaving, player log on and player log off. - [Performance] - vtserver: Lot saving to disc is done in a dedicated thread. Removes ~50ms of lag when saving on an SSD. - [Performance] - vtserver: Chunk unloading now only checks parts of the chunk array, rather than the whole array. Fixes constant lag in big MP maps.

Source

Steam News / 4 August 2022

Open original post

Changelog.gg summarizes and formats this update. How we read updates.