You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "FAWC438 (via GitHub)" <gi...@apache.org> on 2023/04/11 15:18:51 UTC

[GitHub] [skywalking] FAWC438 commented on issue #10672: [Bug] Python agent critical performance regression

FAWC438 commented on issue #10672:
URL: https://github.com/apache/skywalking/issues/10672#issuecomment-1503593982

   This is a strange problem, because in the 0.8.0 python agent, the default value of this wait parameter is still 0 and does not produce any excessive CPU usage.
   
   I suspected that the new decorator syntax sugar in 1.0.0 affected it, but after I converted the decorator syntax sugar into normal python syntax, the bug still exists
   
   I compared the source code of version 1.0.0 and version 0.8.0 and I think that the `threading.Event()` object **_finished** that manages the thread might be the cause of the problem (but I'm very not sure). First, it directly called the wait() method that caused the bug; second, I noticed that it changed from a global variable in 0.8.0 to a class member in 1.0.0, and this object should obviously be shared by threads.
   
   Here is the relevant [Python official documentation](https://docs.python.org/3/library/threading.html#event-objects) about `threading.Event()`
   
   Of course, given the urgency of this bug, the simple method of changing the parameter value I mentioned earlier may solve the basic problem. However, there may be a slight impact on the performance of the internal queue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org