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
Is your feature request related to a problem? Please describe.
When I configured Log4j2's WaitStrategy to SleepingWaitStrategy, I observed that the Log4j2-TF-11-AsyncLoggerConfig-4 thread consumed 105% CPU during stress testing. However, after replacing Thread.yield() with Thread.onSpinWait() within the SleepingWaitStrategy implementation, the CPU usage of Log4j2-TF-11-AsyncLoggerConfig-4 dropped to approximately 55%, and no log loss was observed.
Describe the solution you'd like
Replace Thread.yield() with Thread.onSpinWait() in SleepingWaitStrategy.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
When I configured Log4j2's WaitStrategy to SleepingWaitStrategy, I observed that the Log4j2-TF-11-AsyncLoggerConfig-4 thread consumed 105% CPU during stress testing. However, after replacing Thread.yield() with Thread.onSpinWait() within the SleepingWaitStrategy implementation, the CPU usage of Log4j2-TF-11-AsyncLoggerConfig-4 dropped to approximately 55%, and no log loss was observed.
Describe the solution you'd like
Replace Thread.yield() with Thread.onSpinWait() in SleepingWaitStrategy.
The text was updated successfully, but these errors were encountered: