That's what I understood it to be as well - we actually did some testing
with batching and saw no improvement. I just wanted to double check!
Here's the JVM flags I'm using. This service is running in a docker
container which can result in Java not getting the correct CPU core count.
Due to
An explicit goal of gRPC is to making batching not necessary. You should
be able to use unary, or streaming, or any RPC kind really without worrying
about the performance.
Can you list your JVM flags you use?
On Monday, September 10, 2018 at 10:04:40 PM UTC-7, Kos wrote:
>
> Hey Carl,
>
>
Hey Carl,
Yup the way you've described it is exactly how I have it setup.
private def channelBuilder(address: String): ManagedChannel = {
val interceptor =
MonitoringClientInterceptor.create(Configuration.allMetrics())
val builder = NettyChannelBuilder
.forAddress(address,
It should be one ManagedChannel per host*. There are a lot of batching
opportunities possible when using just one channel. For example, TLS
encryption can work on larger block sizes at a time. Another example is
that netty can poll on fewer threads, meaning fewer wakeups across all your
Hi Carl,
I did run a Yourkit run against my service and what I see is many threads
being created for the event loop group - they're all named something like:
'grpc-default-worker-ELG-...'. I did some reading on your other posts and
saw you recommended using an ELG bounded to 1-2 threads. I
More info is needed to figure out why this is slow. Have you use JProfiler
or Yourkit before? There are a couple Java profilers (perf, even) that can
tell you where the CPU is going to. Also, you should consider turning on
gc logging to see if memory is being consumed too fast.
Our tuned
Hi Carl,
Thanks for responding! I've tried a couple different executors and they
don't seem to change the behavior. I've done FixedThreadPool with the
number of threads = # of cores * 2, the ForkJoinPool.commonPool as you
recommended, and the Scala global ExecutionContext which ultimately is a
Can you try setting the executor on both the channel and the server
builder? I would recommend ForkJoinPool.commonPool().
On Monday, August 27, 2018 at 11:54:19 PM UTC-7, Kos wrote:
>
> Hi,
>
> I'm using gRPC in a new Scala service and I'm seeing unexpectedly high CPU
> utilization. I see