Skip to content
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

ConcurrentPool should not use the thread-local cache when running on a virtual thread #10568

Closed
lorban opened this issue Sep 22, 2023 · 4 comments · Fixed by #11498
Closed

ConcurrentPool should not use the thread-local cache when running on a virtual thread #10568

lorban opened this issue Sep 22, 2023 · 4 comments · Fixed by #11498

Comments

@lorban
Copy link
Contributor

lorban commented Sep 22, 2023

Jetty version(s)
12.0.x

Enhancement Description
ConcurrentPool has a thread-local cache that can be optionally enabled to increase the pool's performance for certain kinds of pooled objects. But this is counter-productive when the thread is a virtual one, so the pool should avoid using the cache in that case.

@lorban
Copy link
Contributor Author

lorban commented Oct 6, 2023

Recent benchmarks have shown that for Jetty 12, the concurrent pool's thread local cache tends to lower the performance when combined with the THREAD_ID strategy, which is the only time where the cache is enabled.

So it looks like the thread local cache should be removed, which would sort this issue out as a side effect.

@gregw
Copy link
Contributor

gregw commented Oct 6, 2023

THREAD_ID strategy is essentially a threadlocal hash anyway.

@gregw
Copy link
Contributor

gregw commented Mar 11, 2024

See fix in #11504

@lorban
Copy link
Contributor Author

lorban commented Mar 13, 2024

@gregw We already removed the thread local from ConcurrentPool as part of #10787 and deprecated the constructors that refer to it so I think we can close this issue.

@gregw gregw closed this as completed Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants