ice icon indicating copy to clipboard operation
ice copied to clipboard

Support for ThreadPool SizeIO

Open bentoi opened this issue 3 years ago • 1 comments

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 avatar Dec 05 '22 10:12 bentoi

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

Ice.jar.zip

bentoi avatar Dec 05 '22 10:12 bentoi