zeroc-ice / ice

All-in-one solution for creating networked applications with RPC, pub/sub, server deployment, and more.
https://zeroc.com
GNU General Public License v2.0
2.05k stars 593 forks source link

Support for ThreadPool SizeIO #1401

Open bentoi opened 1 year ago

bentoi commented 1 year ago

Today, Ice doesn't support configuring the number of threads that perform IO over connections. It's configured to a fixed value which is the minimum value of the number of processor cores or ThreadPool.Size.

In cases where the network stack is fast and a reply or request has a very large payload, the non-blocking send on the socket can take some time and prevent other requests from being sent in parallel if all the thread pool IO threads are busy.

A design that relies on sending very large requests or responses should be avoided since the request or reply will consume lots of memory and might lead to such issues. Implementing a Slice defined streaming interface or a read method that allows to receive the data in multiple chunks is a better solution.

In any case, we could provide a property to configure the number of IO threads.

bentoi commented 1 year ago

Here's an Ice.jar that provides support for a *.ThreadPool.SizeIO property.

Ice.jar.zip