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 Degradation in Kubernetes with pytest-xdist #1108

Open
OriMeyuhas opened this issue Jul 11, 2024 · 0 comments
Open

Performance Degradation in Kubernetes with pytest-xdist #1108

OriMeyuhas opened this issue Jul 11, 2024 · 0 comments

Comments

@OriMeyuhas
Copy link

I’m experiencing significant performance degradation when running tests with pytest-xdist in a Kubernetes environment compared to running them locally.

Environment Details

Local Machine:

•	CPU: 8 cores
•	Memory: 16 GB
•	Command: pytest -n 8 (all distributions are working well)
•	Running Time: 10-15 minutes
•	Screenshot: 

image

Dedicated Machine on Kubernetes:

•	Pod Configuration:
•	CPU: 24 cores
•	Memory: 48 GB
•	Resources Requests and Limits: Correctly set
•	Command: pytest -n 21 --dist=loadfile
•	If using --dist=load or --dist=worksteal, workers are getting crushed and tests fail.
•	Running Time: 35-57 minutes
•	Screenshot: 

Screenshot 2024-07-11 at 18 08 05

Despite having significantly more resources in Kubernetes, the test running time is much longer, and using --dist=load or --dist=worksteal causes failures.

I need help understanding why this performance degradation is happening and how to optimize pytest-xdist in Kubernetes.

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