-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Issue with HTTP Thread Utilization and Request Backlog Under High Load #511
Comments
Hey!
Can you please clarify what you mean here by "Proxygen HTTP worker threads" vs "Folly IO consumer threads"?
HTTP connections, rather than individual requests, are routed to worker threads. If the HTTP connections are non-uniform (i.e. some connections are sending more requests/data than others), some imbalance may be expected. |
Can you please clarify what you mean here by "Proxygen HTTP worker threads" vs "Folly IO consumer threads"? |
Yep, it mostly depends on protocol:
|
That seems pretty high? Normally the number of HTTP workers shouldn't exceed the number of CPUs you have, as they are designed to be non-blocking. Reducing the thread count ought to smooth out your distribution some?
This is a potential problem, since gzip compression is CPU intensive, but the default filters run on the IO threads. If compression is a bottleneck, you may want to uninstall the proxygen compression/decompression filters from the HTTPServer, and instead handle compression/decompression in your folly CPU bound thread pool. You can then tune the IO : CPU worker ratio and hopefully even out your core usage. |
Thanks @afrind and @hanidamlaj for your input. I attempted to increase the number of HTTP worker threads to 192, which somewhat improved the distribution, but occasional hiccups in QPS still occur. It appears that requests are accumulating in the HTTP threads, with some threads handling more than 10 requests. Additionally, I have not enabled the enableContentCompression setting under HTTP options, so I assume the HTTP layer is not performing compression or decompression tasks. Could you suggest an effective way to tune the HTTP server threads or help identify the bottleneck causing request accumulation in the HTTP threads? |
Hi @afrind and @hanidamlaj , |
Hi @hanidamlaj ,
|
Hey – sorry for the delay. Do you have a minimal repro you can share? |
Hi,
I am encountering a issue in my proxygen based http server application where I am using Proxygen HTTP threads as worker threads and Folly IO threads as consumer threads. The configuration includes the default HTTP server options, with a thread count of 240 for Proxygen and 384 for the IO worker threads.
Under high load, I observe that some HTTP threads are handling more than one request simultaneously, reaching up to 8 concurrent requests, while other HTTP threads are not fully utilized. This uneven load distribution is resulting in increased response times, as requests are placed in a wait state.
Additionally, I’ve noticed a significant backlog of gzip-compressed requests, and the load balancer seems to be directing more load to these specific threads.
Could you please advise on how to configure the system to limit the number of concurrent requests handled by each HTTP thread to a maximum of 3? Moreover, I’d like to prevent the accumulation of a specific type of request in the backlog.
Server Configuration: 48 core, Intel(R) Xeon(R) Silver 4214 CPU @ 2.20GHz
Any insights or suggestions would be greatly appreciated.
Thank you.
The text was updated successfully, but these errors were encountered: