Closed Hegelim closed 2 years ago
Those 2 need a better name
number_of_netty_threads
: number of threads available to Java frontendnetty_client_threads
: number of threads available to Python backendThe default is the number of logical cores available to JVM for both which is a reasonable default that maximizes throughput, increasing it more may cause thread oversubscription which will tank performance
What the ideal configuration should be is often a benchmark and see approach, you can use https://github.com/pytorch/serve/tree/master/benchmarks#auto-benchmarking-with-apache-bench to help you out
Thanks for your reply! Any idea why my netty threads is 0 even though I set it explicitly in config.properties
?
Since there's a new issue about this will close this for now
Hi,
What would be the best practice in terms of setting these two parameters along with the number of worker processes for the model? Lets say we have 1 model and 4 physical CPUs. Is it better to have the sum of number_of_netty_threads
, netty_client_threads
and the default_number_of_workers
to be <=4? Or for the threads, since they are much lightweight, we dont care about potential oversubscription and we can set 4 worker processes, a couple of client and netty threads aside?
I have read configurations here https://pytorch.org/serve/configuration.html I am wondering do
number_of_netty_threads
andnetty_client_threads
have anything to do with performance (throughput)? When I start my TorchServe model usingconfig.properties
that looks like belowThe model started properly. However, the model has 0 for
number_of_netty_threads
andnetty_client_threads
, what might be causing the issue?