[ 
https://issues.apache.org/jira/browse/CAMEL-24290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18154466#comment-18154466
 ] 

Aurélien Pupier commented on CAMEL-24290:
-----------------------------------------

_Analysis generated by Bob (IBM Bob, AI assistant) on behalf of apupier. 
Figures are derived from the Develocity build scan timeline data and should be 
verified before acting on them._

h3. Critical path analysis of build scan loxdlowkzkqng

Scan: https://develocity.apache.org/s/loxdlowkzkqng/timeline (*2132.2 s*, 733 
projects). The previous scan, 5cnan53chrd7k, took 2158.1 s. The best recent 
scan, xbp2vcy3mdoye, took 2077.1 s (728 projects). The first scan, 
eb33cs73xhkq4, took 2303.4 s.

h4. Method
* Per-module span = first goal start to last goal end, taken from 
{{/scan-data/maven/<scan>/timeline}}.
* Dependency edges inferred from {{pom.xml}} files (parent, dependencies and 
plugins, with parent inheritance).
* Critical path = start at the last-finishing module and repeatedly step back 
to the dependency that finished last before the module started. The path has 53 
modules, and the gap between consecutive steps is at most 4.5 s.
* CPU = mean of the machine-wide {{allProcessesCpu}} metric (about 1 s 
sampling) over each module's span. "% time <=60% CPU" is the share of the 
module's time at or below 60% load. Idle-seconds = duration x (100 - mean CPU%).
* Module names link to the open "Improve test time" JIRA issue when there is 
one.

h4. What changed since the previous scan (5cnan53chrd7k)
* The project count is unchanged (733), so the 26 s gain is test time, not 
module count.
* [JBang :: Core|https://issues.apache.org/jira/browse/CAMEL-26818]: 204 s to 
174 s ({{surefire:test}} 159 s to 129 s). This is the main gain.
* Jetty 62 s to 52 s, 
[Management|https://issues.apache.org/jira/browse/CAMEL-25965] 94 s to 88 s, 
Core 192 s to 188 s ({{surefire:test}} 154 s to 152 s, {{compiler:testCompile}} 
22 s to 19 s).
* Netty (318 s) and Netty HTTP (318 s) are unchanged. Netty is back on the path 
and blocks Netty HTTP.
* AWS2 Kinesis is not on the path in this scan. CAMEL-28061 is now Resolved: 
{{surefire:test}} went from 113 s to 104 s and {{failsafe:integration-test}} 
from 34 s to 42 s.
* The saturated middle of the path changed again: it now goes through Master 
(122 s), JMX (78 s) and Flink (53 s).
* Machine-wide mean CPU went down again (69.5%, 67.1%, now 65.9% over the last 
three scans).

h4. New issues for the longest saturated modules
Netty and Netty HTTP run back to back (about 640 s from 948 s to 1649 s) at 98% 
and 86% CPU. Their {{surefire:test}} takes 310 s and 312 s. Two issues were 
created:
* [CAMEL-28073|https://issues.apache.org/jira/browse/CAMEL-28073] Improve test 
time of camel-netty
* [CAMEL-28074|https://issues.apache.org/jira/browse/CAMEL-28074] Improve test 
time of camel-netty-http

h4. Critical path modules of at least 10 s (scan loxdlowkzkqng, path order)
||Module||Start (s)||Duration||CPU %||% time <=60% CPU||Idle-s||Longest goal||
|Maven Plugins :: Camel Maven Package|25|13.1 s|26|100|10|surefire:test 6 s|
|Util|39|12.0 s|29|100|9|surefire:test 7 s|
|Support|60|14.4 s|24|93|11|compiler:compile 3 s|
|Core Model|98|11.2 s|13|100|10|compiler:compile 2 s|
|XML IO|109|25.1 s|66|40|9|jaxb2:schemagen 7 s|
|*Core*|139|*188.4 s*|24|88|*142*|surefire:test 152 s|
|[Management|https://issues.apache.org/jira/browse/CAMEL-25965]|327|87.7 
s|27|100|64|surefire:test 81 s|
|Test :: JUnit6|415|18.2 s|52|67|9|surefire:test 17 s|
|Saturated stretch (Master to Box :: Component, 7 modules, see note)|433 to 
827|25 to 122 s each|95-98|0|0-4|Master 118 s, JMX 70 s|
|Spring XML|844|71.5 s|76|21|17|surefire:test 45 s|
|Test :: Spring :: JUnit6|916|32.5 s|55|59|15|surefire:test 31 s|
|[*Netty*|https://issues.apache.org/jira/browse/CAMEL-28073]|948|*317.8 
s*|98|0|5|surefire:test 310 s|
|ISO-8583|1266|12.3 s|97|0|0|surefire:test 11 s|
|Jetty|1279|52.2 s|92|0|4|surefire:test 44 s|
|[*Netty HTTP*|https://issues.apache.org/jira/browse/CAMEL-28074]|1331|*318.0 
s*|86|18|46|surefire:test 312 s|
|REST OpenApi|1649|18.2 s|52|72|9|surefire:test 17 s|
|Platform HTTP :: Vert.x|1667|23.3 s|26|100|17|surefire:test 22 s|
|Platform HTTP :: Main|1690|13.5 s|71|21|4|surefire:test 12 s|
|OAuth|1704|33.3 s|42|82|19|surefire:test 31 s|
|AI :: MCP Server|1737|49.8 s|44|72|28|failsafe:integration-test 36 s|
|Catalog :: Camel Catalog|1790|27.1 s|18|100|22|surefire:test 22 s|
|YAML DSL|1826|20.6 s|47|81|11|surefire:test 15 s|
|JBang :: Run|1857|22.4 s|43|64|13|surefire:test 18 s|
|[*JBang :: 
Core*|https://issues.apache.org/jira/browse/CAMEL-26818]|1879|*174.2 
s*|20|100|*139*|surefire:test default-test 129 s|
|JBang :: Plugin :: TUI|2053|48.2 s|51|54|24|surefire:test 19 s|
|Launcher|2102|26.1 s|28|85|19|surefire:test 13 s|

Note on the grouped row: it covers Master, Flink, IBM :: Cloud Object Storage, 
JMX, RocketMQ, Diagram and Box :: Component, which together take about 394 s.

h4. Long modules that also have CPU available (ranked by idle-seconds)
# *Core*: 188 s at 24% CPU, 142 idle-s.
# [*JBang :: Core*|https://issues.apache.org/jira/browse/CAMEL-26818]: 174 s at 
20% CPU, 139 idle-s.
# [*Management*|https://issues.apache.org/jira/browse/CAMEL-25965]: 88 s at 27% 
CPU, 64 idle-s.
# [*Netty HTTP*|https://issues.apache.org/jira/browse/CAMEL-28074]: 318 s at 
86% CPU, 46 idle-s.
# AI :: MCP Server, Catalog, OAuth and JBang :: Plugin :: TUI: about 19-28 
idle-s each.

h4. Long modules where the machine is saturated
* [Netty|https://issues.apache.org/jira/browse/CAMEL-28073] (318 s), [Netty 
HTTP|https://issues.apache.org/jira/browse/CAMEL-28074], Jetty, and the middle 
stretch (Master, Flink, JMX, RocketMQ and others, roughly 430-830 s). These are 
CPU-bound, so running their tests in parallel is unlikely to help. Only lighter 
tests would.

h4. Module spans across the last three scans (seconds @ start, then mean 
machine CPU %)
||Module||xbp2vcy3mdoye||5cnan53chrd7k||*loxdlowkzkqng*||
|Build|2077|2158|*2132*|
|Projects|728|733|*733*|
|Core|179 @124, 28|192 @145, 26|*188 @139, 24*|
|[Management|https://issues.apache.org/jira/browse/CAMEL-25965]|87 @303, 25|94 
@338, 36|*88 @327, 27*|
|[Netty|https://issues.apache.org/jira/browse/CAMEL-28073]|316 @923, 99|322 
@940, 99|*318 @948, 98*|
|[Netty HTTP|https://issues.apache.org/jira/browse/CAMEL-28074]|309 @1296, 
90|308 @1324, 85|*318 @1331, 86*|
|Jetty|68 @1227, 95|62 @1262, 94|*52 @1278, 92*|
|[JBang :: Core|https://issues.apache.org/jira/browse/CAMEL-26818]|174 @1826, 
27|204 @1874, 22|*174 @1879, 20*|
|JBang :: Plugin :: TUI|47 @2000, 57|50 @2078, 50|*48 @2053, 51*|
|Launcher|26 @2047, 35|26 @2128, 29|*26 @2102, 28*|
|Spring XML|77 @813, 80|69 @840, 75|*72 @844, 76*|
|AI :: MCP Server|52 @1689, 57|53 @1725, 56|*50 @1737, 44*|
|AWS2 Kinesis|142 @966, 99|160 @980, 99|*158 @987, 99*|
|CoAP|173 @485, 98|163 @534, 97|*158 @523, 97*|
|Master|110 @409, 98|134 @448, 97|*122 @433, 96*|
|Cassandra CQL|418 @464, 96|198 @514, 97|*208 @512, 96*|

h4. Caveats
* Dependency edges are inferred from pom files, not reported by Develocity. The 
Core -> Management spine and the Jetty -> Netty HTTP -> ... -> JBang :: Core 
tail are the stable parts. The middle of the path depends on Maven {{-T1C}} 
scheduling and differs between scans.
* CPU is machine-wide (all processes on the agent), not per module, and sampled 
at about 1 s.
* The data does not show why a module leaves CPU idle (serial tests, sleeps or 
timeouts). That needs a look at the surefire configuration and per-test 
durations.
* It has not been checked which commits each scan includes.


> Improve Continuous Integration to support larger workload
> ---------------------------------------------------------
>
>                 Key: CAMEL-24290
>                 URL: https://issues.apache.org/jira/browse/CAMEL-24290
>             Project: Camel
>          Issue Type: Task
>          Components: build system
>    Affects Versions: 4.21.0
>            Reporter: Aurélien Pupier
>            Priority: Major
>
> Our 2 CI systems (Jenkins and GitHub actions) are already under heavy loads 
> and the planned future will surely increase the load and the need for a more 
> stable CI.
> Currently Jenkins is taking between 4 and 5 hours when things are going well. 
> Can go up to 20 hours when all streams in //
> On GitHub, it happens regularly that the jobs are queued for several hours.
> We have few full green build per week on Jenkins. (We are at one or two per 
> year last year, so already a lot better but not enough to really sustain new 
> workloads efficiently).
> Having a CI failing only for real issues will also help all committers to 
> react faster
>  
> There are several factors for increased, and potential new increase:
>  * Increased number PRs with more review, so more cycle
>  * Increased number of backports
>  * Increased cadence of dependencies release
>  * Longer LTS ? , more streams to maintain?
>  * Shared GitHub runners with all Apache projects (and several of them are 
> facing the same workload increase)
> Several areas identified which worth at least some investigations:
>  * stability of Workflows run: it gives more confidence to the build, avoids 
> the need to rerun to check that it is "just" flaky or an infra hiccups
>  ** develocity help tracking flaky tests (especially flaky tests causing 
> failure)
>  ** -one last test is failing very often: SjmsConnectionRecoveryTest- 
> -[https://issues.apache.org/jira/browse/CAMEL-24284-] DONE no failure since 
> 1st September
>  ** several failing less often (every months)
>  *** useful Develocity dashboard 
> [https://develocity.apache.org/scans/tests?search.query=project:camel%20tag:main%20-maven.environment.jvmVersion:*26*&search.relativeStartTime=P28D]
>  **** beware of tests which failed for good reasons (it caught regressions)
>  **** beware of all the tests which were already fixed (there was a huge 
> session of fix, so maybe need to wait a month to have a clearer view and/or 
> play with the the timeframe)
>  **** I filtered on main and excluded JDK 26 for now. Because i have JDK 26 
> has tests which are failing for an identified bug and a lot of stability 
> improvements were done on main only
>  **** based on previous warning, the current curated list is:
>  ***** MasterEndpointIT 
> [https://develocity.apache.org/scans/tests?search.query=project:camel%20tag:main%20-maven.environment.jvmVersion:*26*&search.timeZoneId=Europe%2FParis&tests.container=org.apache.camel.component.zookeepermaster.MasterEndpointIT&tests.test=testEndpoint]
>  ***** MongoDB: 
> [MongoDbBulkWriteOperationsIT|https://develocity.apache.org/scans/tests?search.query=project:camel%20tag:main%20-maven.environment.jvmVersion:*26*&search.timeZoneId=Europe%2FParis&tests.container=org.apache.camel.component.mongodb.integration.MongoDbBulkWriteOperationIT],
>  
> [MongoDbCredentialsFromUriConnectionIT|https://develocity.apache.org/scans/tests?search.query=project:camel%20tag:main%20-maven.environment.jvmVersion:*26*&search.timeZoneId=Europe%2FParis&tests.container=org.apache.camel.component.mongodb.integration.MongoDbCredentialsFromUriConnectionIT]
>  and 
> [MongoDbFindOneAndReplaceOperationIT|https://develocity.apache.org/scans/tests?search.query=project:camel%20tag:main%20-maven.environment.jvmVersion:*26*&search.timeZoneId=Europe%2FParis&tests.container=org.apache.camel.component.mongodb.integration.MongoDbFindOneAndReplaceOperationIT]
>  ***** 
> [SpringFileAntPathMatcherRemoteFileFilterTest|https://develocity.apache.org/scans/tests?search.query=project:camel%20tag:main%20-maven.environment.jvmVersion:*26*&search.timeZoneId=Europe%2FParis&tests.container=org.apache.camel.itest.ftp.SpringFileAntPathMatcherRemoteFileFilterTest]
>  CAMEL-24618
>  ***** 
> [CassandraIdempotentRespotoryIT|https://develocity.apache.org/scans/tests?search.query=project:camel%20tag:main%20-maven.environment.jvmVersion:*26*&search.timeZoneId=Europe%2FParis&tests.container=org.apache.camel.processor.idempotent.cassandra.CassandraIdempotentRepositoryIT]
>  ***** and certainly a few others currently buried in the list of already 
> fixed ones
>  ** and also several flaky during the run but passing in less than 3 
> attempts, slowing down the build
>  *** 
> [https://develocity.apache.org/scans/tests?search.query=project:camel%20tag:main&search.relativeStartTime=P28D&search.timeZoneId=Europe%2FParis&tests.sortField=FLAKY]
>  ***  
>  ** -one Jenkins workspace leak to fix due to some jbang tests- CAMEL-23795 
> DONE
>  * modification of test matrixes
>  ** testing a single JDK/OS permanently and push to weekly/nightly others on 
> jenkins?
>  ** -Reduce test matrix on maintenance stream?- DONE
>  * Optimize usage of available resources
>  ** see if we can build on smaller instances of Jenkins, for Linux it will 
> allow to move up from 4 to ~20 instances available.
>  ** use several threads (but requires a far better stability and robustness 
> of tests and ensure no port conflict) 
> [https://issues.apache.org/jira/browse/CAMEL-24318]
>  *** to check also if we can do the pure compile in // with all threads and 
> then launch tests as of now (1 threads used although 22 are available on big 
> machines)
>  **** on GitHub there are already 2 phases but it is using mvnd; [it is 
> taking around 18 
> minutes|https://github.com/apache/camel/actions/runs/30412528538/job/90451766586#step:9:1]
>  **** on jenkins it means to split in different phase
>  **** to test for sonar scanner ([currently 1 thread is 
> used|https://develocity.apache.org/s/fjldcrmqc7bds] and it is taking between 
> around 30 minutes)
>  *** on Jenkins, I think we could attempt to provide a specific job for this 
> experiment with specific develocity tag so that can filter out/in the results 
> easily
>  ** also seems 3.5G of Memory is used for the build, maybe we could use more 
> when in //
>  *** 32G in total on large jenkins machine
>  *** but [develocity seems to report only 1.7 
> max|https://develocity.apache.org/s/kuigqxgdpicsy/performance/build] is used 
> currently
>  *** maybe an indication that we could now run on smaller Jenkins node as 
> this Memory constraint seems to date from 2018 and it has not changed, good 
> chance that jenkins nodes size has been improved since that time
>  * several s390x and ppc64le in //, currently [3 
> ppc64le|https://jenkins-ccos.apache.org/view/Shared%20-%20ppc64le%20nodes/]  
> and [6 
> s390x|https://jenkins-ccos.apache.org/view/Shared%20-%20s390x%20nodes/] nodes 
> are referenced as shared node but a single one is available at a time
>  ** started dicussion here 
> [https://the-asf.slack.com/archives/CF6PY5M4N/p1787908008691489]
>  ** Bug opened in Jenkins [https://github.com/jenkinsci/jenkins/issues/27318]
>  * improve performance of the product/test code itself maybe the trickier one 
> but also the most beneficial for our end users
>  * use of Develocity build cache (not a big fan of not rebuilding but could 
> be something to reuse in some configurations)
>  * use of Develocity test selection
>  * improve scalpel to reduce even more the scope of PR tests
>  *  [DONE] improve [fetch based branch for scalpel change detection on GitHub 
> which is taking almost 5 
> minutes|https://github.com/apache/camel/actions/runs/30429114691/job/90501998254#step:3:1]
>  * gating PR builds?
>  ** have a specific account for AI agents which does not trigger build 
> automatically
>  ** only a subset triggered automatically then full test suite launched on 
> demand for all? for specific accounts?
>  * see if budget to provide more github runners and/or jenkins nodes
>  * check for performance bottleneck in the build and test process (develocity 
> build scan performance can give some ideas)



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to