ExecutorService stress handling

169 views
Skip to first unread message

Joe Elliott

unread,
Mar 29, 2011, 4:33:44 PM3/29/11
to haze...@googlegroups.com
I'm curious to understand the implications of overloading the ExecutorService with too many tasks.

Can somebody please confirm if these assumptions are correct:
1) If there are more being executed by a particular node than the 'maxPoolSize' for the target node, then any new task submitted will block until there is an available thread in the target node pool.
2) On the invoking node, the only threads being held while is task is in progress would be ones calling DistributedTask.get()

And a few questions:
3) Is there any way to configure a limit to the queue size so that any new tasks submitted once the limit of pending tasks is reached will immediately fail?
4) Is there any way to monitor the current size of any pending task queue?
5) Any suggestions on how to setup a callback when an executed task is complete?

thanks much,
 - joe

Fuad Malikov

unread,
Apr 11, 2011, 3:28:02 AM4/11/11
to haze...@googlegroups.com, Joe Elliott
On Tue, Mar 29, 2011 at 11:33 PM, Joe Elliott <joe.e...@gmail.com> wrote:
I'm curious to understand the implications of overloading the ExecutorService with too many tasks.

Can somebody please confirm if these assumptions are correct:
1) If there are more being executed by a particular node than the 'maxPoolSize' for the target node, then any new task submitted will block until there is an available thread in the target node pool.

Yes
 
2) On the invoking node, the only threads being held while is task is in progress would be ones calling DistributedTask.get()


Yes
 
And a few questions:
3) Is there any way to configure a limit to the queue size so that any new tasks submitted once the limit of pending tasks is reached will immediately fail?


 
4) Is there any way to monitor the current size of any pending task queue?


No for 3 and 4, but could be a nice feature. Please craate an issue, so that we can track.
 
5) Any suggestions on how to setup a callback when an executed task is complete?

DistributedTask.setExecutionCallback(ExecutionCallback<V> executionCallback) should serve your needs.
 

thanks much,
 - joe

--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To post to this group, send email to haze...@googlegroups.com.
To unsubscribe from this group, send email to hazelcast+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/hazelcast?hl=en.



--

@fuadm

Joe Elliott

unread,
Apr 11, 2011, 9:14:21 AM4/11/11
to haze...@googlegroups.com, Joe Elliott
Thanks much.  Issue created:  http://code.google.com/p/hazelcast/issues/detail?id=543

And setExecutionCallback() is also exactly what I was looking for.


Reply all
Reply to author
Forward
0 new messages