Please enable JavaScript for things to display properly!

Light Suppression

Light update suppression is the delaying of light updates and then stopping the server to effectively delete them.

Technical explanation

When a block being moved, placed, or broken, a light update is produced. These light updates are placed in a queue for the light thread to process. When the light thread gets to that update it processes it and the light level is changed in the world. The light thread and the main game thread are asynchronous; if one thread is slowing down, the other can still keep going. Light Suppression works by filling that queue with too many light updates, which will cause the light thread to lag behind the main game thread, meaning that any new light updates queued from the main thread will only be processed if the light thread gets a chance to “catch up”. When the server is stopped, any unprocessed light updates are deleted and thereby not processed, so the light level will stay in this incorrect state.

Use

  1. A light suppression machine is run. This typically consists of flashing redstone lamps or, in older light update suppressors, moving blocks. Light updates from light sources typically take longer to process.
  2. After approximately 20k light updates are in the queue the machine is stopped. Normally the length of queue maxes out at around 3 seconds because if it were any longer the server thread would wait to let the light thread catch up.
  3. A light update that is to be deleted is produced.
  4. The server is stopped either through the /stop command or crashing with an update suppressor. Results with /stop can be inconsistent so /save-all flush can be ran before to fix that.

History

In 1.17 a basic form of thread syncing was added limiting the light queue to about 20,000 light updates. Previously the light update queue was could be as big as the server’s allocated memory.