-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EnhancedQueueExecutor could disable queue limits to reduce the queue size update overhead #43342
Comments
/cc @Sanne (core), @aloubyansky (core), @gsmet (core), @radcortez (core), @stuartwdouglas (core) |
My 2¢ is that we should treat |
I'm concerned of this case @dmlloyd :
To me, this seems that we really need a specific builder option to clearly state that user doesn't care about limiting the queue - and this will make Let me knwow wdyt |
Okay, yeah that makes sense. Thanks! |
Now that jbossas/jboss-threads#190 is merged (thanks @dmlloyd !) waiting for a new release to add the configuration option to quarkus yeeee |
@cescoffier @gsmet |
That's the perfect timing (after the LTS), so +1. |
Description
The quarkus configuration guide state that most users should (could) have an unbounded queue size for the worker thread pool and indeed the default jboss-thread queue size is
Integer.MAX_VALUE
.Due to an implementation detail, the
queueSize
information in jboss-thread is shared both among producer(s) and consumer(s) and there's no way to avoid the overhead (and its scalability implications) with the default settings, which still keep on updating the queue's size even if there's no practical limit to it.I would love to add a new jboss thread builder configuration i.e.
unlimitedQueue(boolean)
which disable the queue limit bookeeping per executor, instead of being a global system property (which can still be kept, but could be used as a default or a forced limit too, IDK): this, given that we don't expose MX metrics of our worker, would enable most users to benefit of this improvement, for free - given that most users don't limit queue size as suggested by our doc.It's important to explain the context of this enhancement, first:
NonBlocking
annotation - eg. the typical plaintext hello world endpoint, in shortIn this weird scenario usually native image tends to scale better (!!!) than JVM mode, but clearly is a quirk of a different problem.
Just for information/reference, in JCTools we track the size using 2 separate fields, instead of one, exactly for this reason
i.e. producerSequence (a long value) and consumerSequence (still a long value) and an additonal producerLimit (still a long)
This allow the producer(s) to:
This mechanism allow to reduce the sharing of information to the bare minimum to make progress - and usually deliver a very high speedup for in-memory and non-blocking tasks.
I know that's weird use case but if it can be a single liner:
it seems easy and no-brain enough to do it.
@dmlloyd @cescoffier
Implementation ideas
No response
The text was updated successfully, but these errors were encountered: