-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
Load testing the standard Python SDK examples for callouts gives CPU saturation under load of 20-30%. There are a few reasons for this:
- The number of gRPC server worker threads defaults to 2.
- Python GIL limiting thread scalability. Even adjusting (1) to a larger number like 8 does not linearly improve the situation.
This limited concurrency leads to gRPC timeouts and other issues under load, despite there being plenty of CPU available. If you instead run the gRPC server under Python multiprocessing library (https://docs.python.org/3/library/multiprocessing.html), as per https://github.com/grpc/grpc/blob/master/examples/python/multiprocessing/server.py, full CPU utilization on a many core processor is possible and the pathologies disappear.
Metadata
Metadata
Assignees
Labels
No labels