gpr_cpu_current_cpu function question

32 views
Skip to first unread message

wookieJ

unread,
May 28, 2019, 8:10:05 AM5/28/19
to grpc.io
Hi everyone, I have problem with gRPC with lots of "Cannot handle hot-plugged cpu" logs in stdout (https://github.com/grpc/grpc/blob/master/src/core/lib/gpr/cpu_linux.cc#L74). I want to ask you what returning value 0 in this function "gpr_cpu_current_cpu()" affects in gRPC and what would happen if it starts to return >0 value?

Yash Tibrewal

unread,
May 29, 2019, 6:32:55 PM5/29/19
to grpc.io
gRPC uses that for some stats-keeping operations in debug mode, and it also seems to be used in epoll1 polling engine for determining the neighborhood (epollex is the default). Overall, you should not be worried about this. 
Message has been deleted

wookieJ

unread,
May 30, 2019, 3:44:35 AM5/30/19
to grpc.io
So You mean it doesn’t matter what this function returns, the results will be the same? More threads would be created or something that could affect application? I also wonder what would happen if our host returns large number of cpu's even if we don't use them all, could it has negative consequences.

Yash Tibrewal

unread,
Jun 5, 2019, 2:17:15 PM6/5/19
to grpc.io
It does matter in debug mode for stats collection and would affect epoll1 polling engine but other than that there is no effect currently. This function does NOT affect the number of threads being created.
Reply all
Reply to author
Forward
0 new messages