You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each undispatched coroutine spawns a separate threadLocal and if there are a lot of undispatched coroutines - threadLocal map on all threads becomes huge and server spend 100% of cpu on traversing threadLocal maps in order to find empty spot, shift entries and so on
Below a attach screenshots of heapdump from production application which have 2gb of heap.
It creates around 2k of UndispatchedCoroutines. In such scenario ThreadLocalMap on each thread is around ~700. ThreadLocalMap is resized when 75% of slots are used, which means there were at least 500 elements used in parallel at some point of time.
Earlier we had constant incidents when threadLocal map was reaching 1500 elements. At that point all cpu is being spent on threadLocal map updates.
0f.png">
issue seems to be quite critical, as far as i understand any highloaded server which relies on coroutines could become unavailable at any point of time
The text was updated successfully, but these errors were encountered:
Each undispatched coroutine spawns a separate threadLocal and if there are a lot of undispatched coroutines - threadLocal map on all threads becomes huge and server spend 100% of cpu on traversing threadLocal maps in order to find empty spot, shift entries and so on
Below a attach screenshots of heapdump from production application which have 2gb of heap.
It creates around 2k of UndispatchedCoroutines. In such scenario ThreadLocalMap on each thread is around ~700. ThreadLocalMap is resized when 75% of slots are used, which means there were at least 500 elements used in parallel at some point of time.
Earlier we had constant incidents when threadLocal map was reaching 1500 elements. At that point all cpu is being spent on threadLocal map updates.

0f.png">issue seems to be quite critical, as far as i understand any highloaded server which relies on coroutines could become unavailable at any point of time
The text was updated successfully, but these errors were encountered: