L.J.W
L.J.W

Reputation: 1595

netty 4 performance: multi channels or only one?

I use Netty 4.0.23 in my RPC framework, I found in client, when creating multi channels, performance is better than creating one channel. Why? Any method to improve performance in one channel?need I move encode/decode from Netty io worker thread to user thread?

Upvotes: 1

Views: 1534

Answers (1)

trustin
trustin

Reputation: 12351

It is because when creating multiple channels, you'll utilize multiple CPU cores. When creating a single channel, you'll utilize only a single CPU core.

As the number of the channels increases, you will not see this performance improvement anymore because your CPU or your remote peer's CPU will be maxed out soon.

Upvotes: 1

Related Questions