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

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 5cnan53chrd7k

Scan: https://develocity.apache.org/s/5cnan53chrd7k/timeline (*2158.1 s*, 733 
projects). The previous 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 54 
modules, and the gap between consecutive steps is at most 4.4 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. Goal execution from the details link (bw5egmw7tor2k)
Camel :: Cassandra CQL {{failsafe:integration-test}}: 172 s (it was 395 s in 
the previous scan). It is not on the critical path: its module span is 514-712 
s at 97% CPU, running alongside Azure :: Event Hubs, Azure :: ServiceBus, CoAP 
and Disruptor.

h4. Why the build is 81 s slower than the previous scan
* The project count grew from 728 to 733.
* The path is shifted later: Core starts at 145 s instead of 124 s, because the 
first modules (Util, Support, Core Model) each got a few seconds slower. 
Machine-wide mean CPU dropped from 69.5% to 67.1%.
* Several {{surefire:test}} executions got slower at once: Core 138 s to 154 s, 
Management 78 s to 85 s, JBang :: Core 132 s to 159 s, AWS2 Kinesis 85 s to 113 
s.
* The saturated middle of the path is different: CoAP (163 s), Smooks (67 s), 
AWS2 Kinesis (160 s) and OptaPlanner (109 s), instead of Elasticsearch, Kinesis 
and DFDL.
* Several modules slowing at once points to agent-level noise as much as to 
code changes. It has not been checked which commits each scan includes.

h4. Critical path modules of at least 10 s (scan 5cnan53chrd7k, path order)
||Module||Start (s)||Duration||CPU %||% time <=60% CPU||Idle-s||Longest goal||
|Maven Plugins :: Camel Maven Package|27|12.7 s|31|100|9|surefire:test 6 s|
|Util|41|12.4 s|37|67|8|surefire:test 6 s|
|Support|62|15.6 s|37|94|10|surefire:test 3 s|
|Core Model|101|12.7 s|31|100|9|compiler:compile 3 s|
|XML IO|114|26.5 s|70|31|8|jaxb2:schemagen 7 s|
|*Core*|145|*192.3 s*|26|87|*142*|surefire:test 154 s|
|[Management|https://issues.apache.org/jira/browse/CAMEL-25965]|338|94.4 
s|36|94|60|surefire:test 85 s|
|Test :: JUnit6|432|16.3 s|70|25|5|surefire:test 14 s|
|Saturated stretch (AI :: Resource to Platform HTTP :: Jolokia, 15 modules, see 
note)|448 to 1250|10 to 163 s each|89-99|0-6|0-4|CoAP 163 s, [AWS2 
Kinesis|https://issues.apache.org/jira/browse/CAMEL-28061] 160 s, OptaPlanner 
109 s|
|Spring XML|840|68.7 s|75|21|17|surefire:test 44 s|
|Test :: Spring :: JUnit5|909|31.2 s|52|62|15|surefire:test 30 s|
|Jetty|1262|62.1 s|94|0|4|surefire:test 53 s|
|*Netty HTTP*|1324|*308.3 s*|85|18|46|surefire:test 302 s|
|REST OpenApi|1633|18.1 s|46|78|10|surefire:test 16 s|
|Platform HTTP :: Vert.x|1651|26.0 s|23|100|20|surefire:test 24 s|
|Platform HTTP :: Main|1677|13.0 s|75|8|3|surefire:test 9 s|
|OAuth|1690|34.9 s|58|60|15|surefire:test 33 s|
|AI :: MCP Server|1725|52.7 s|56|64|23|failsafe:integration-test 39 s|
|Catalog :: Camel Catalog|1780|30.6 s|32|100|21|surefire:test 24 s|
|YAML DSL|1822|22.8 s|61|52|9|surefire:test 15 s|
|YAML DSL :: Validator|1845|26.0 s|72|23|7|surefire:test 23 s|
|[*JBang :: 
Core*|https://issues.apache.org/jira/browse/CAMEL-26818]|1874|*204.3 
s*|22|100|*159*|surefire:test default-test 159 s|
|JBang :: Plugin :: TUI|2078|49.5 s|50|60|25|surefire:test 22 s|
|Launcher|2128|26.3 s|29|88|19|surefire:test 13 s|

Note on the grouped row: it covers 15 modules between 448 s and 1250 s, among 
them AI :: Weaviate, Cedar, CoAP, PgEvent, Smooks :: Parent, Jackson, AWS2 
Kinesis and OptaPlanner. Together they take about 780 s.

h4. Long modules that also have CPU available (ranked by idle-seconds)
# [*JBang :: Core*|https://issues.apache.org/jira/browse/CAMEL-26818]: 204 s at 
22% CPU, 159 idle-s (127 idle-s in the previous scan).
# *Core*: 192 s at 26% CPU, 142 idle-s.
# [*Management*|https://issues.apache.org/jira/browse/CAMEL-25965]: 94 s at 36% 
CPU, 60 idle-s.
# *Netty HTTP*: 308 s at 85% CPU, 46 idle-s.
# AI :: MCP Server, Catalog, JBang :: Plugin :: TUI and Platform HTTP :: 
Vert.x: about 20-25 idle-s each.

h4. Long modules where the machine is saturated
* Netty HTTP (and Netty before it), Jetty, and the middle stretch of about 15 
modules from 448 s to 1250 s. These are CPU-bound, so running their tests in 
parallel is unlikely to help. Only lighter tests would.
* The largest single contributors in the middle stretch are CoAP (163 s), AWS2 
Kinesis (160 s) and OptaPlanner (109 s).
* A new issue was created for AWS2 Kinesis: CAMEL-28061 "Improve test time of 
aws2 kinesis" ({{surefire:test}} 113 s in this scan, 85 s in the previous one).

h4. Module spans across the last three scans (seconds @ start, then mean 
machine CPU %)
||Module||ez7j3mcy5apte||xbp2vcy3mdoye||*5cnan53chrd7k*||
|Build|2082|2077|*2158*|
|Projects|727|728|*733*|
|Core|176 @124, 22|179 @124, 28|*192 @145, 26*|
|[Management|https://issues.apache.org/jira/browse/CAMEL-25965]|82 @301, 19|87 
@303, 25|*94 @338, 36*|
|Netty|299 @898, 99|316 @923, 99|*322 @940, 99*|
|Netty HTTP|319 @1273, 88|309 @1296, 90|*308 @1324, 85*|
|Jetty|77 @1197, 96|68 @1227, 95|*62 @1262, 94*|
|[JBang :: Core|https://issues.apache.org/jira/browse/CAMEL-26818]|203 @1806, 
14|174 @1826, 27|*204 @1874, 22*|
|JBang :: Plugin :: TUI|46 @2008, 53|47 @2000, 57|*50 @2078, 50*|
|Launcher|23 @2055, 27|26 @2047, 35|*26 @2128, 29*|
|Chaos|29 @1592, 41|30 @1604, 51|*30 @1632, 38*|
|Spring XML|72 @794, 77|77 @813, 80|*69 @840, 75*|
|AI :: MCP Server|48 @1678, 45|52 @1689, 57|*53 @1725, 56*|
|[AWS2 Kinesis|https://issues.apache.org/jira/browse/CAMEL-28061]|146 @943, 
99|142 @966, 99|*160 @980, 99*|
|CoAP|174 @479, 98|173 @485, 98|*163 @534, 97*|
|Elasticsearch Java API Client|201 @503, 98|200 @505, 98|*213 @557, 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.


> 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