Skip to content
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

Performance Issue with SUB_INTERPRETER Mode Under High Concurrency #49

Open
Arrowa70 opened this issue Nov 15, 2024 · 0 comments
Open

Comments

@Arrowa70
Copy link

Arrowa70 commented Nov 15, 2024

I am using pemja as the Python script execution engine in a Conductor-based orchestration system. However, when the QPS is very high, meaning under high concurrency scenarios, the execution time for a Python script calculating the sum of squares (N=1000000) becomes extremely high. The time taken increases linearly over time, eventually reaching tens of seconds. I have tried both Python 3.8 and 3.11 versions, and also attempted switching ExecType to SUB_INTERPRETER, but the results did not vary much.
Additionally, through JVM monitoring, I observed that most threads in the thread pool are in a blocked state.
Additionally, in some of our actual business scripts (which include some batch parameter conversion logic without any I/O operations), the execution time can even reach up to hundreds of seconds. We have tried using Groovy, and the execution time for Groovy scripts is less than 1 second.
In theory, SUB_INTERPRETER should offer better performance, but in our use case, we did not observe any significant improvement. In some cases, there was even a performance degradation. Could you please clarify if there are any prerequisites for achieving performance improvements with SUB_INTERPRETER? Additionally, could you provide some best practice examples on how to configure and use pemja effectively in high concurrency scenarios?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant