Github user mtaylor commented on the pull request:
https://github.com/apache/activemq-artemis/pull/468#issuecomment-211517118
@bgutjahr This all look good to me, except the unbounded default pool
setting :D, for reasons I mentioned above. We have had people complaining that
it grows out of control under high load. Which as I mentioned is the original
reason for the change.
How about we add the setting to time out threads in the pool as shown in
the link above but keep the default the same. Using a multiplier of the cores
is a reasonably standard way to calculate defaults and it's usually reflection
on the system resource, but we could easily change this, if there is a lot of
objection. This is also how Netty instantiates some of it's thread pools.
I wonder if there is a thread pool policy that could prevent the pool
growing too large, but not behave like a fixed pool. Ideally we'd like to pool
to grow organically, up to a certain number. I was unable to find an
appropriate policy using ThreadPoolExecutor in the JDK.
https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadPoolExecutor.html.
But perhaps there's another way to handle this? Any suggestions?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---