-
Notifications
You must be signed in to change notification settings - Fork 131
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
[JENKINS-60821] - Let Jetty configure its own defaults #197
Conversation
Jetty knows better than us, so let Jetty configure its own defaults for the ThreadPool (min 8 max 200) and #acceptor/selector threads. This applies feedback from jetty/jetty.project#4492 We loos the thread naming - but all the jetty threads in the servers where called "Jetty Thread Pool"-something so we did not isolate them between the reverse proxy and the JenkinsRule or HudsonTestCase so the fact they are now called qtp-something is pretty much ok. Nothing else seems to use Jetty's QueuedThreadPool in Jenkins so any thread starting qtp is pretty much going to be the jetty thread pool - and it matches more what you would get when running jenkins with java -jar...
server = new Server(new ThreadPoolImpl(new ThreadPoolExecutor(10, 10, 10L, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(),new ThreadFactory() { | ||
public Thread newThread(Runnable r) { | ||
Thread t = new Thread(r); | ||
t.setName("Jetty Thread Pool"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can not apply naming with the QueuedThreadPool
without also specifiying the number of threads etc.
Use a QTP with the defaults and call setName() instead Uses a unique name per pool so you can identify the various pools/servers
with 5bdfd1e (thanks @sbordet) the threads now look like:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
As pointed out by @jglick it should be obvious from the name that the thread is in a thread pool (has a #xx after it) - so just remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
definitely a good change!
Unless there are objections (or someone else merges first), I'll merge this tomorrow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine with me
JENKINS-60821
Jetty knows better than us, so let Jetty configure its own defaults for the ThreadPool (min 8 max 200) and #acceptor/selector threads.
This applies feedback from jetty/jetty.project#4492
Whilst we are here - give all of the Jetty Thread pools different names so it is obvious which pool is which