-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[BUG] Cosmos library takes 100% CPU on Windows #6112
Comments
@David-Noble-at-work Can you please look into this? |
I've recompiled the project to try different values for the timer: |
Hey, we are testing this particular timer change on our end, and still waiting to get an update from a windows machine perspective. We have tested this on Mac and linux, and it works fine for us, so you should be safe / good to keep this setting. |
@David-Noble-at-work - any updates on this ? |
@david-lpg I had a chat with David, and we couldn't see any CPU difference at least on linux, not sure about windows. So you are good to go with 100 milliseconds on the timer. In addition to above, I would like to mention that we have exposed these options to our Rntbd (TCP Transport Client) in v3.6.0 release. Here is the changelog and way to provide these options: Here is more information on how to use it: https://github.com/David-Noble-at-work/azure-cosmos-examples#using-system-properties-to-modify-default-direct-tcp-options |
@david-lpg please close this if this fixes your issue. |
Sorry for the delay, I had to work on an other project lately. I tried today to use the config file to modify the requestTimerResolution parameter. This seems to work even if I don't really know which side effects this parameter could have on my application. I'll use it for now. But the real fix would be to use netty 4.1.44.Final (4.1.42.Final at the moment). Thanks for your help. |
Thanks @david-lpg We will update netty versions in next release. |
Describe the bug
Due to a bug in netty (netty/netty#9710, already solved but no version of netty with this correction is available yet), the RntbdRequestTimer makes an infinite loop (Sleep(0)) when running on a Windows machine.
To Reproduce
Run a Spring application with the cosmos library on Windows.
Code Snippet
In RntbdRequestTimer:
this.timer = new HashedWheelTimer(FIVE_MILLISECONDS, TimeUnit.NANOSECONDS)
Expected behavior
This could be solved by:
Setup (please complete the following information):
Additional context
I use this library through spring-data-cosmodb hosted in an Azure Function.
The text was updated successfully, but these errors were encountered: