-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
High CPU usage on Windows #5591
Comments
Note that if this turns out to be difficult to fix, we can also just prioritize platform networking for data and get rid of our custom networking implementation altogether. |
➤ Jonathan Reams commented: I think fixing this issue is an unknown amount of work right now. Just "switching to Windows IOCP" would likely solve this issue, but would also be a substantial re-write of how we do networking on windows. We could also pull in ASIO - which our networking library is somewhat based on - which has actually good IOCP support and use that as an alternate networking impl on windows. I have no good estimates what that would do for binary size or performance, but it won't peg any CPUs - at least not for the same reasons. We could also just bump up the priority of platform networking projects on platforms that support windows. Regardless of what we do, I think this is likely a forever bug that's not going to be solvable within the next month or two without re-shuffling some other priorities. |
➤ James Stone commented: We have merged a mitigation in #5594 I am reducing the priority of this, but we can keep it open until we have a better long term solution. |
➤ marysiapietraszewska commented: Will be fixed by introducing platform networking |
We are witnessing a high CPU usage on Windows for some time now. The problem was first noticed on our CI which runs on GH Actions and two core VMs. We managed to reproduce it locally by setting an affinity of the process to only two cores (simulating the environment on GH Actions) and this is the profile information we managed to capture.
This seems the offending function
the code with highest CPU usage is
This takes 89% of the execution time.
Here a screenshot of the profiling session
Note that because of an debug assertion on Windows the SDK is actually paused and not running. But these background threads are continuing to pump the CPU.
Here is another screenshot using ProcessExplorer
The code is prefixed with this comment which shows that we have a special path for Windows in that function
wait_and_advance
We think this is of high priority since it taxes the CPU to 100% and makes any Realm Sync operation run really slow.
EDIT: This is witnessed on Windows
The text was updated successfully, but these errors were encountered: