Threading issues
How to fix this threading issue that exists only on Windows?
https://spark.lucko.me/FlCb0anrpw
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
17 Replies
⌛
This post has been reserved for your question.
Hey @oakwookoak! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
What about that would be an issue?
It tells you that most threads are waiting most of the time meaning there is no work these threads have to do which is perfectly fine
server suffers huge server lag spikes because we have to wake up sleeping io threads
example: we have one sudden job to complete and io threads are sleeping at this moment
Sure that waking up these threads is the issue?
and not it just doing other work before waking up the threads?
If so, what makes you sure?
well, i have to apologize first, im not a dev.
additional information:
we added spinwait in order to fix world saving times on windows, but this introduced mspt spikes when opening loot chest in shipwreck which contains treasure map and we reverted it.
What's mspt?
millisecond per tick
oh some Minecraft specific thing
How are you currently waiting for tasks?
budget is 50ms and it completes in 7 seconds
probably show the code would be the best option for me...
https://github.com/RelativityMC/FlowSched/tree/491bc6a731b724d44072bfb7d51eea3433214cb6
GitHub
GitHub - RelativityMC/FlowSched at 491bc6a731b724d44072bfb7d51eea34...
A collection of scheduling implementations for Java - GitHub - RelativityMC/FlowSched at 491bc6a731b724d44072bfb7d51eea3433214cb6
Why aren't you just using
ExecutorService
to submit tasks?
These are well-tested performant ways to manage tasks
With that, you can use PriorityBlockingQueue
for ensuring prioritiesbecause it is too basic for us
What capabilities are you missing?
As I said, you can make it use priorities
it got rejected for an unknown reason for me
message search shows last
PriorityBlockingQueue
reference has been written in 2021If you want an efficient implementaton, use
ExecutorService
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.
Post Closed
This post has been closed by <@1170276321138593886>.