Problem/Motivation
After #3614401: Allow install profiles to opt out of being installed and #3614153: Install system module alongside other modules in the installer it looks like we can reduce the CPU and concurrency for functional tests without an increase in wall times.
At the moment, core pipelines make the following simultaneous CPU requests (e.g. ignoring lint jobs which run before):
Functional js: 36
Functional: 128
Kernel: 48
Build: 8
Nightwatch: 16
This is a total CPU request of 236.
The maximum CPU for an AWS instance type is 192 according to https://aws.amazon.com/ec2/instance-types/general-purpose/
This issue reduces the CPU request by 47.
236 - 47 = 189
Steps to reproduce
Proposed resolution
Nightwatch tests now regularly finish in 2m-2m30s so move them to the penultimate job next to build tests which finish in a similar amount of time, and reduce the CPU request since it's not making a big difference.
Mark a few functional tests with group #slow so that the jobs are more evenly balanced.
Bring the CPU request for functional tests down from 14 to 10.
Overall reduction of 47 CPU request for every core test pipeline.
Remaining tasks
At least some of these issues should land first so we get a realistic idea of what we need:
#3615455: Install database driver modules alongside other modules
#3614401: Allow install profiles to opt out of being installed
#3614825: Allow additional modules to be installed alongside the profile modules
#3615423: Avoid rebuilding the container in tests just to create a directory
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3614817
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3614817-pp-2-reduce-parallel
changes, plain diff MR !16576
Comments
Comment #2
catchComment #3
catchOpened #3614825: Allow additional modules to be installed alongside the profile modules too. A combined pipeline of the three issues + some individual test optimisations has functional tests finishing in about 90s each with no changes to parallel. Going to try going down to 4 from 8 and see how it looks.
Comment #4
catchWent for reducing the CPU and concurrency rather than the number of jobs - this is on the basis that smaller jobs are more likely to fill space on machines that are already in use - e.g. if a machine has 10 CPUs spare it can fit a 10 CPU request job but not a 16 CPU request job.
This should give us a baseline of the jobs taking a while, but then rebasing when the three issues in front of this land should get us back to relatively speedy.
Comment #6
catchComment #7
catch#3574200: Get rid of 2-phase kernel boot in installer looks like it should allow a fourth container rebuild to be dropped.
Comment #8
catchComment #9
catchComment #10
catchComment #11
catchOK I think at least a first round of this is unblocked at this point.
Reduced CPU and concurrency for functional tests a fair bit.
We've dropped some nightwatch tests due to removed modules with more to go, so moved those to the end because they finish faster now.
Kept functional js tests where they are because those still finish last at the moment.
Once some more issues land we might be able to do even more, but might as well see how this goes for a while.
Comment #12
dcam commentedBased on the pipelines that have run for this issue and other recent pipelines for main it appears that this is achieving the goal of reducing concurrency without impacting the wall time. So I think this is OK. I didn't find any issues with the moved configuration.
Comment #13
catchRebased again now that #3615455: Install database driver modules alongside other modules is in and updated the issue summary.
Comment #14
catchComment #15
catchNoticed on https://git.drupalcode.org/issue/drupal-3589236/-/jobs/11790005 that we currently have five slow build tests, so went ahead and increased concurrency to 6 for those from four, but without raising the CPU because we already have 8 allocated there.
Comment #16
catchLast commit worked for build tests - tests themselves finished in 1m44s https://git.drupalcode.org/project/drupal/-/jobs/11875750 Leaving RTBC because this is a one character change.
Comment #17
longwaveCommitted and pushed 29d9d03650f to main. Thanks!