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

[WFCORE-3185] Run parallel boot tasks in coarser grained chunks #2935

Merged
merged 1 commit into from Apr 14, 2019

Conversation

@bstansberry
Copy link
Contributor

bstansberry commented Nov 13, 2017

https://issues.jboss.org/browse/WFCORE-3185

Instead of doing parallel boot with 1 task per extension (during extension initialization) and then 1 per subsystem (during subsystem op handling) this instead groups work into coarser grained chunks, with the number of chunks based on the number of available processors. Default setting is 1 subsystem chunk per processor, and 2 extension chunks per processor. This can be tweaked via unsupported system properties, which only exist to allow us WildFly devs to experiment with different values and on different types of systems.

On my 4-5 year old laptop this results in 8 chunks for subsystem work and 16 for extensions.

The number of threads used will be 2x the number of subsystem chunks, as the subsystem work needs separate chunks for Stage.MODEL vs Stage.RUNTIME, and the MODEL tasks block waiting for the overall boot op (and hence the RUNTIME tasks) to complete. So, 16 threads. This 2x behavior is partly why by default I use 2x the # of extension chunks as subsystem ones -- the threads will be started regardless, so using them for extension work incurs no additional cost for starting up threads. Also, quite a lot of classloading/IO may be involved in extension initialization (for example ideally all the extension's management integration classes would be loaded then.)

Testing over the summer showed no noticeable increase or decrease in boot time from this on my system. The number of threads used is much lower though, which is the point. With existing code booting WildFly's standalone-full-ha.xml results in spawning 72 threads vs the 16 here. (Note that disabling parallel boot altogether slowed down boot by about 400ms on my machine.)

@ropalka

This comment has been minimized.

Copy link
Contributor

ropalka commented Nov 13, 2017

I had a quick look. Decreasing number of threads during the boot sequence is very good step forward.

@bstansberry bstansberry force-pushed the bstansberry:WFCORE-3185 branch from 172140e to 4866fdb Nov 14, 2017
@bstansberry bstansberry force-pushed the bstansberry:WFCORE-3185 branch from 4866fdb to 4231bd2 Jan 17, 2018
@bstansberry bstansberry force-pushed the bstansberry:WFCORE-3185 branch from 4231bd2 to 1f34a85 Feb 16, 2018
@bstansberry bstansberry force-pushed the bstansberry:WFCORE-3185 branch from 1f34a85 to dcc977c Mar 16, 2018
@wildfly wildfly deleted a comment from wildfly-ci Mar 26, 2018
@wildfly wildfly deleted a comment from wildfly-ci Mar 26, 2018
@bstansberry

This comment has been minimized.

Copy link
Contributor Author

bstansberry commented Mar 26, 2018

retest this please

@bstansberry bstansberry force-pushed the bstansberry:WFCORE-3185 branch from dcc977c to 3966fa6 Aug 10, 2018
@bstansberry bstansberry force-pushed the bstansberry:WFCORE-3185 branch from 3966fa6 to 9ac513e Oct 22, 2018
@wildfly wildfly deleted a comment from wildfly-ci Oct 23, 2018
@bstansberry bstansberry force-pushed the bstansberry:WFCORE-3185 branch from 9ac513e to 68e5e6c Nov 10, 2018
@bstansberry bstansberry force-pushed the bstansberry:WFCORE-3185 branch from 68e5e6c to 3ff5450 Jan 5, 2019
@bstansberry bstansberry force-pushed the bstansberry:WFCORE-3185 branch from 3ff5450 to 337170e Mar 24, 2019
@wildfly wildfly deleted a comment from wildfly-ci Mar 24, 2019
@wildfly wildfly deleted a comment from wildfly-ci Mar 24, 2019
@wildfly wildfly deleted a comment from wildfly-ci Mar 24, 2019
@wildfly-ci wildfly-ci added the deps-ok label Apr 10, 2019
@bstansberry bstansberry merged commit 6fd44f3 into wildfly:master Apr 14, 2019
8 checks passed
8 checks passed
Dependency Tree (Pull Request) - merge TeamCity build finished
Details
Full integration - Linux Finished TeamCity Build WildFly Core / Pull Request / WildFly Core Full - Integration Linux - JDK 8 : Tests passed: 4852, ignored: 134
Details
Full integration - Windows Finished TeamCity Build WildFly Core / Pull Request / WildFly Core Full - Integration - Windows - JDK 8 : Tests passed: 4845, ignored: 139
Details
Linux - JDK 11 (Pull Request) - merge TeamCity build finished
Details
Linux - JDK 8 (Pull Request) - merge TeamCity build finished
Details
Linux - Security Manager - JDK 8 (Pull Request) - merge TeamCity build finished
Details
Windows - JDK 11 (Pull Request) - merge TeamCity build finished
Details
Windows - JDK 8 (Pull Request) - merge TeamCity build finished
Details
@bstansberry bstansberry deleted the bstansberry:WFCORE-3185 branch Apr 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.