Hi all
We are now in profiling stages of some CXF 2.1 based web services. In
all our services we observe that most of the CPU time is not consumed by
the service logic itself but by CXF. I attach a picture (worth 1000
words) of a JProfiler snapshot. In the snapshot we see the
PhaseInterceptorChain.doIntercept() taking 78.4% of the CPU which is
fine as this includes the eventual service logic execution. What happens
next is a bit strange, here is the ASCII art rendering:
78.4% PhaseInterceptorChain.doIntercept()
26.4% OutgoingChainInterceptor.handleMessage
20.0% ServiceInvokerInterceptor.handleMessage
16.9% ReadHeadersInterceptor.handleMessage
The call to ServiceInvokerInterceptor.handleMessage() ends up calling
the actual service logic which takes about 5% of the CPU time so, the
extra 15% penalty seems to excessive, what's even more worrying are the
other two handleMessage calls (OutgoingChainInterceptor and
ReadHeadersInterceptor) that gobble up together more then 40% of the
CPU.
Note that we have no custom interceptors defined, our configuration
looks like this:
<import resource="classpath:META-INF/cxf/cxf.xml"/>
<import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>
<bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
<jaxws:endpoint id="SomeServiceEndpoint"
address="/SomeService"
implementor="#someService"
implementorClass="com.betfair.services.someservice.SomeServiceServiceImp
l">
Is this behaviour expected in a properly configured system?
Thanks
-- david
________________________________________________________________________
In order to protect our email recipients, Betfair Group use SkyScan from
MessageLabs to scan all Incoming and Outgoing mail for viruses.
________________________________________________________________________