From 147df3c14c77346884edf0b6b2b8730810d036bb Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Fri, 3 Mar 2023 00:19:12 -0800 Subject: [PATCH] Delay scheduler improvements It turns out, the scheduler is good enough right now - the main bottlenecks to scaling chunk workers is actually the chunk system locking behavior (mostly schedule lock, but ticket lock is there too) --- regiontodo.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/regiontodo.txt b/regiontodo.txt index 25908f7..b1691d7 100644 --- a/regiontodo.txt +++ b/regiontodo.txt @@ -1,5 +1,4 @@ Get done before testing: -- make scheduler load chunks better Pre-Test: List of things not fully tested - Task queue @@ -18,6 +17,12 @@ Get done after test: - sync load info - net.minecraft.commands.Commands - are the race conditions in the weather tick (advanceWeatherCycle) ok? +- make scheduler load chunks better? this requires additional work to: + -> reduce scheduler overhead (i.e at 5000 regions, on 16 threads -> overhead is 10%) + -> unsure how to reduce scheduler overhead, may need to rewrite it so that the queues + are per tick thread and thus it increases parallelism + -> reduce chunk system overhead (i.e at 20 workers, ~100 unique concurrent regions, overhead -> 10-30% on both workers AND tick threads (at tick threads ->8) + -> the only way out of the chunk system overhead is to make the scheduling more parallel - it requires scheduling lock and ticket lock Delayed and hopefully will not forget: - api for really a lot of shit