gRPC Server Core Affinity

126 views
Skip to first unread message

shak...@gmail.com

unread,
Feb 13, 2017, 6:24:32 PM2/13/17
to grpc.io
Hi, my understanding is once started the server maintains a pool of threads which it dispatches work to as a connection is established. Is there any way to specify the core affinity to these threads if we don't want them floating?

Carl Mastrangelo

unread,
Feb 21, 2017, 5:24:41 PM2/21/17
to grpc.io, shak...@gmail.com
What language?

Cliff Burdick

unread,
Feb 21, 2017, 8:09:49 PM2/21/17
to Carl Mastrangelo, grpc.io
C++

shak...@gmail.com

unread,
Mar 3, 2017, 10:40:46 AM3/3/17
to grpc.io
Do you think this is possible?

Craig Tiller

unread,
Mar 3, 2017, 10:57:27 AM3/3/17
to shak...@gmail.com, grpc.io
We don't have API's in place for the synchronous API, but for the async API this is fairly easy (and indeed much of the point of that API) - you get to call CompletionQueue::Next, and the thread that's calling that function can be bound to a core.

On Fri, Mar 3, 2017 at 7:40 AM <shak...@gmail.com> wrote:
Do you think this is possible?

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/30965964-0276-4327-9b1c-c141535cfef1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Cliff Burdick

unread,
Mar 3, 2017, 11:28:10 AM3/3/17
to Craig Tiller, grpc.io
Thanks for the answer

On Fri, Mar 3, 2017 at 7:57 AM, Craig Tiller <cti...@google.com> wrote:
We don't have API's in place for the synchronous API, but for the async API this is fairly easy (and indeed much of the point of that API) - you get to call CompletionQueue::Next, and the thread that's calling that function can be bound to a core.

On Fri, Mar 3, 2017 at 7:40 AM <shak...@gmail.com> wrote:
Do you think this is possible?

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscribe@googlegroups.com.

Arpit Baldeva

unread,
Mar 3, 2017, 12:10:06 PM3/3/17
to grpc.io, shak...@gmail.com
With Synchronous API, for integrators interested in having a little more control on the behavior of the thread pool (so for example, assigning the thread to the a particular core), they can define GRPC_CUSTOM_DEFAULT_THREAD_POOL and provide the implementation of the thread pool interface (which is literally just 1 function that adds work to the pool).
Reply all
Reply to author
Forward
0 new messages