felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Pauls (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-5665) High CPU usage on org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation
Date Thu, 13 Jul 2017 19:00:00 GMT

    [ https://issues.apache.org/jira/browse/FELIX-5665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16086230#comment-16086230

Karl Pauls commented on FELIX-5665:

[~aattuluri], yes, more details would be nice.

In general, this looks like for whatever reasons your bundle causes a lot of either classloads
or resource look-ups via the classloader. Without more information it is hard to say whether
that is what always happens but it just so happens that this is more costly inside OSGi/Felix
(which might very well be the case as we have to do more work to figure out where something
is coming from) or whether there is something your bundle triggers inside Felix that causes
the class/resource loads. As you mention http class it might be that the URLHandlers are involved...

Can you maybe try to boil it down to something you can share with me or at a minimum give
more information about what happens exactly? 

Furthermore (just to rule out the simple case), does your bundle have a Dynamic-ImportPackage:
* (and if so, can you take it out and see if that helps)?

> High CPU usage on org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation
> ---------------------------------------------------------------------------------------------
>                 Key: FELIX-5665
>                 URL: https://issues.apache.org/jira/browse/FELIX-5665
>             Project: Felix
>          Issue Type: Bug
>    Affects Versions: framework-5.6.4
>            Reporter: AnilKumar Attuluri
>         Attachments: IMG_1.jpg, IMG_2.jpg
> We have been running some performance tests to prepare our OSGi bundle (*running in Apache
Karaf*) for production.
> Just to give some background about our OSGi bundle, we converted an existing Spring application
into an OSGi bundle with all the current dependencies packaged into the bundle as an uber
> When we run >= 500 TPS (each of these calls results in a http call made via a library)
we run into this high CPU usage spikes reaching up to 100% CPU. Please see the image attached,
the spikes in the image are 100% CPU usage while the average is about 40%. Also see the CPU
sampler image which points to *org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation*
> Is there an existing bug/documentation that already captures this?
> We don't see this behavior when we run the same app in standalone JVM.

This message was sent by Atlassian JIRA

View raw message