threads num = concurrency * 2 + xxx

18 views
Skip to first unread message

zuobe...@gmail.com

unread,
Apr 13, 2020, 11:28:44 PM4/13/20
to envoy-dev
Hi,I have a question.
Why is the number of envoy threads doubled when I set --concurrency, 
for example, when I set:envoy-static -c envoy.yaml --log-path ./error.log --log-level trace --concurrency 64 , 
There are 142 threads in total

Yuchen Dai

unread,
Apr 14, 2020, 4:57:15 AM4/14/20
to zuobe...@gmail.com, envoy-dev
By default you should have another N+1 Google grpc client thread, where N = concurrency.

$ sudo eu-stack -p `pgrep envoy` | fgrep "Function_handler"  | awk '{print $5}' |sort |uniq -c
     49 Envoy::Grpc::GoogleAsyncClientThreadLocal::GoogleAsyncClientThreadLocal(Envoy::Api::Api&)::$_0>::_M_invoke(std::_Any_data
      1 Envoy::Server::GuardDogImpl::start(Envoy::Api::Api&)::$_3>::_M_invoke(std::_Any_data
     48 Envoy::Server::WorkerImpl::start(Envoy::Server::GuardDog&)::$_3>::_M_invoke(std::_Any_data

-Yuchen

--
You received this message because you are subscribed to the Google Groups "envoy-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to envoy-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/envoy-dev/1675fa0d-4c8d-4872-a772-fdf49155215b%40googlegroups.com.

zuobe...@gmail.com

unread,
Apr 14, 2020, 8:03:50 AM4/14/20
to envoy-dev
Yuchen,thank you very much for your response!

在 2020年4月14日星期二 UTC+8下午4:57:15,Yuchen Dai写道:
By default you should have another N+1 Google grpc client thread, where N = concurrency.

$ sudo eu-stack -p `pgrep envoy` | fgrep "Function_handler"  | awk '{print $5}' |sort |uniq -c
     49 Envoy::Grpc::GoogleAsyncClientThreadLocal::GoogleAsyncClientThreadLocal(Envoy::Api::Api&)::$_0>::_M_invoke(std::_Any_data
      1 Envoy::Server::GuardDogImpl::start(Envoy::Api::Api&)::$_3>::_M_invoke(std::_Any_data
     48 Envoy::Server::WorkerImpl::start(Envoy::Server::GuardDog&)::$_3>::_M_invoke(std::_Any_data

-Yuchen

On Mon, Apr 13, 2020 at 8:28 PM <zuobe...@gmail.com> wrote:
Hi,I have a question.
Why is the number of envoy threads doubled when I set --concurrency, 
for example, when I set:envoy-static -c envoy.yaml --log-path ./error.log --log-level trace --concurrency 64 , 
There are 142 threads in total

--
You received this message because you are subscribed to the Google Groups "envoy-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to envo...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages