You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of now, Netty will create 2*availableProcessers threads for the FeedbackServiceClient's bootstrap group. This is somewhat of a waste since pushy will only use 1 connection for the feedback service (it's obviously pointless to use more than one).
We can't set the io.netty.eventLoopThreads as we'll definitely want more than one for the regular apns client.
In FeedbackServiceClient constructor:
this.bootstrap.group(new NioEventLoopGroup(1));
The text was updated successfully, but these errors were encountered:
Another thought on this, but for the regular ApnsClientThread. Since pushy already creates a thread per connection, it might make sense to set the netty group to only 1 thread. For example, right now on my machine (8 core), a pushManager with 1 thread will end up creating 16 threads for netty. The other 15 threads for netty will be wasted.
Is there any benefit to having netty use more than 1 thread when pushy already has a thread per connection?
Or should the ApnsClientThread share the same bootstrap group for all ApnsClientThreads? (I know this one is definitely not simple)
This is somewhat of a waste since pushy will only use 1 connection for the feedback service (it's obviously pointless to use more than one).
Definitely true.
Is there any benefit to having netty use more than 1 thread when pushy already has a thread per connection?
Nope. This has actually been a TODO in my head for a while. Didn't realize quite how many threads we were using, though, so thanks for calling attention to it. #10 should do the easy stuff. I'd love to condense everything into a single bootstrap group, but will save that for a future enhancement.
As of now, Netty will create 2*availableProcessers threads for the FeedbackServiceClient's bootstrap group. This is somewhat of a waste since pushy will only use 1 connection for the feedback service (it's obviously pointless to use more than one).
We can't set the io.netty.eventLoopThreads as we'll definitely want more than one for the regular apns client.
In FeedbackServiceClient constructor:
The text was updated successfully, but these errors were encountered: