[ODLPARENT-115] Karaf is slow to start processing features after start Created: 14/Sep/17  Updated: 24/Jan/18  Resolved: 09/Oct/17

Status: Verified
Project: odlparent
Component/s: General
Affects Version/s: 2.0.5
Fix Version/s: None

Type: Bug
Reporter: Vratko Polak Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Blocks
is blocked by ODLPARENT-86 Milestore: upgrade karaf to 4.1.2 or ... Verified
External issue ID: 9161

 Description   

This was first reported as a comment [0] to ODLPARENT-86 but that is a milestone bug as a possible fix, this is a separate description of current symptom.

Compared to Carbon (Karaf 3), Nitrogen (Karaf 4) Distribution takes much longer to start. Probably the cause is the new way of generating features from pom files, and inefficient algorithm used when parsing feature repositories present in Distribution.

An example is karaf.log [2] showing it took 4 minutes to parse feature repositories even though no odl feature was being installed at that time (only standard and wrap features):
2017-09-14 10:40:37,641 | INFO | d95-9b2f61aab805 | Main | - - | Karaf started in 0s. Bundle stats: 10 active, 10 total
2017-09-14 10:44:32,413 | INFO | pool-1-thread-2 | FeaturesServiceImpl | 6 - org.apache.karaf.features.core - 4.0.9 | Adding features: standard/[4.0.9,4.0.9], wrap/[0,0.0.0]

While this is just a performance regression, this has required a workaround [1] in distribution offline test job, and in the future this might also limit size of features able to finish SingleFeatureTest in time.

As this is probably a bug inherited from Karaf project, version upgrade will be needed to fix this.

[0] https://bugs.opendaylight.org/show_bug.cgi?id=8258#c3
[1] https://git.opendaylight.org/gerrit/62903
[2] https://logs.opendaylight.org/releng/jenkins092/distribution-offline-nitrogen/41/karaf.log.gz



 Comments   
Comment by Robert Varga [ 14/Sep/17 ]

The problem is upstream. We need a 4.0.10 karaf release and integrate it. The following PR brings down the bood time from 102 to <3 seconds in my testing:

https://github.com/apache/karaf/pull/366/

Comment by Robert Varga [ 25/Sep/17 ]

2.0.x: https://git.opendaylight.org/gerrit/63485

Comment by Robert Varga [ 28/Sep/17 ]

Fixed in 2.0.5

Comment by Vratko Polak [ 09/Oct/17 ]

According to offline job console [5], Nitrogen now takes 19 seconds to start without ODL features and 61 seconds to install odl-integration-all.

[5] https://jenkins.opendaylight.org/releng/view/distribution/job/distribution-offline-nitrogen/45/console

Generated at Wed Feb 07 20:27:40 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.