[ https://issues.apache.org/jira/browse/FELIX-5665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16123955#comment-16123955 ]
Karl Pauls commented on FELIX-5665: ----------------------------------- [~aattuluri] I will not get to it for a while so if you want to take a stab at improving my patch that would be great. Feel free to just use my patch as a basis for a new pull request. As I said in my previous comment, i think we just have to differentiate the three different cases: 1. class could be loaded from the bootclasspath 2. class could be loaded from an import or require (a different revision, really) 3. class could not be loaded if we keep track of 1-3 and in case 2, from which revision, we should be able to quickly do the right thing when a request comes in namely, if 1) delegate to the bootclasspath if 2) get the class from the classloader of the revision if 3) throw exception My patch only keeps track and handles 3 - if you could get 1+2 to work that would be good (and tests would be awesome :-). > High CPU usage on sun.reflect.Generated* class loads by log4j > -------------------------------------------------------------- > > Key: FELIX-5665 > URL: https://issues.apache.org/jira/browse/FELIX-5665 > Project: Felix > Issue Type: Improvement > Components: Framework > Affects Versions: framework-5.6.4 > Reporter: AnilKumar Attuluri > Fix For: framework-5.6.8 > > Attachments: FELIX-5665.patch, 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 artifact. > 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 (v6.4.14#64029)