Subjects
Home
Xalan extension functions
Fomatting question serializing DOM with pretty print
xalan with pull parser
Cannot find the declaration
Apache Xalan drop support to run on JRE 1 1 x
Why does Doctype change processing of a document
Node set to XML string via Java extensions in Xalan J: possible?
Templates/Transformers + thread safety???
Problem evaluating xpath with muliple prefix with different namespace
remove an arbitrary attribute from xsl output
Xalan3 XSLT 2 0 XPath 2 0 support?
Problem using compiled translets with Xalan !!
Xalan and jstl 1 1 problem with transform tag
NullPointer in DOM2DTM getLocalName
URIResolvers base parameter with xsltc and cascaded imports
Performance problem for Xalan J on intel dual core
Standard libraries in JAXP?
Serializing a DOM tree to XML file, customize entities replacement
Library Conflict Involving BCEL Library
A question on how users are using <xsl:message >
Kevin Cormier as a new Apache Xalan J committer
Struggling to iterate over tokenized string
Xalan count() trouble
Problem with recursive xpath
Error when switching to java 1 5
document( ' ')
Problem with Xalan2 7 0 transformation
cr/lf options
entity encoded XML
can xalan transform 2 xml using one xslt?
Xalan J JIRA defect review Monday October 16, 2006 from 2:00 to 3:30 pm ED
xsl transform with cdata section elements
xslt parameters not expanded
Weird behavior of XPath evaluate()
How to avoid <xsl:message > instruction prints stylesheet file informations ?
Cannot find SimpleTransform subdirectory after installing Xalan J
recover from document not found exceptions
jdk1 5 and Xalan jar differences?
Performance Issue
Error/Bug adding floating point numbers
XPathAPI: eval exp using nodes with default namespace
modifying xalan to output invalid XML
NullPointerException
mege two separate xml nodes into one
Is this a XALAN document identification bug?
is StylesheetRoot really java io Serializable ?
transform() fails for DOMSource but succeeds for StreamSource
Thoughts on Transformer parameter passing
HELP, Xalan and jstl 1 1 problem with transformer
Problem with XPath namespace axis?
string utils:replace deleting search string if replacement string is an HTML
help with enumeration values pls
xalan 2 5 1 vs 2 7 performance question
How to insert/update in XML document
HTML Serialization and Handling of Ampersands in HREF Attributes
XHTML link tag stripping
SystemId Unknown; Line #24; Column #49; java lang NullPointerException
xpath text() help
Apostrophe problem with xalan 2 7 0
How to set variables in XML document?
Links
Home
Oracle database error code ...
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
Performance problem for Xalan-J on intel-dual core

Performance problem for Xalan-J on intel-dual core

2007-03-07       - By Erik_Vanherck@(protected)
Reply:     1     2     3     4     5     6  

While I welcome any improvements in performance (we to rely heavily on
Xalan), I've in the meantime hit similar problems with other code as well
so I thought I could shed some light on the issue. It seems that there is
a serious performance regresion in the Sun 1.5 Windows vm implementation
when dealing with thread contention on x86 Multi Core processors. The
problems do not occur in jdk 1.4.2, nor in 1.6.0. I tracked it down to
having todo with the locking implementation used. It turns out that in jdk
1.6 synchronisation was improved using the intel PAUSE instruction, but in
previous vm's they usually resorted to Spinning to avoid heavy weight
locks. Now you don't want to use locks in a spinning fashion for non
multi-cpu x86 based systems. In JDK 1.4.2 spinning was always on, in 1.5
only when on a multiprocessor. I suspect that it incorrectly detects
multicore cpu's as not being multiprocessor. I did some tests and it turns
out that you can get jdk 1.5 pretty close to the other two, however I've
only seen this problem on windows, not sure if my linux machines have
other bottlenecks that cause them to behave differently or if its only
misdetected on windows. The situation worsens with the server vm.

My numbers were with -server -XX:+AggressiveHeap -Xms1024m -Xmx1024m

jdk 1.4.2_12 -> 12 seconds
jdk 1.5.0_07 - jdk 1.5.0._11 (all tested) -> 32-35s and clearly visible
degradation of processor usage and serious increase in privilliged kernel
time
jdk 1.6.0 -> 9s
jdk 1.5.0_xx with -XX:+UseSpinning -XX:+BiasedLocking -> 13s

The additional XX parameters were extremely helpfull in my case.

---------

Erik Vanherck  -  Product Delivery Manager
Inventive Designers
Visit http://www.inventivedesigners.com
Visit http://www.inventivedesigners.com/scriptura for Scriptura
information !

Phone: +32 - 3 - 8210170
Fax: +32 - 3 - 8210171
Email: Erik_Vanherck@(protected)

"Computers in the future may weigh no more than 1.5 tons." - Popular
Mechanics, forecasting the relentless march of science, 1949



Brian Minchau <minchau@(protected)>
11/17/2006 10:26 PM

To
xalan-dev@(protected), xalan-j-users@(protected)
cc

Subject
Performance problem for Xalan-J on intel-dual core







Over the last week I've been working with Toadie (a Xalan user) who had
some very serious performance degradation with a webserver using Xalan.

On an intel dual-core machine it was 10 times slowdown than for a single
processor intel machine.

The problem occurs in this combination for the latest code:
- Intel dual-processor
- Sun JRE 5


Toadie's team was very capable and found that there was thread contention
with synchronized methods, either Xalan-J code or in JRE classes such as
java.util.Vector used by Xalan-J.  This performance problem was so bad
that
thread contention just screamed at us, and made it easy to fine the "hot"
synchronization spots. With their direction I changed Vector to the
unsynchronized ArrayList in a number of locations got back most of the
performance for them.

Toadie previously let me know that a single processor did not have this
problem, and recently checked that the IBM JRE 5 does not have the same
synchronization performance problem on the dual-core machine.

So heads up on Xalan's next multiprocessor performance problem.

Hats off to Toadie who did a great job of analysis, providing hardware to
do the analysis, and even the patches.


- Brian Minchau
mailto:minchau@(protected)




--------------------------------------------------
Inventive Designers' Email Disclaimer:

http://www.inventivedesigners.com/email-disclaimer


<br><font size=2 face="sans-serif">While I welcome any improvements in
performance (we to rely heavily on Xalan), I've in the meantime hit similar
problems with other code as well so I thought I could shed some light on
the issue. It seems that there is a serious performance regresion in the
Sun 1.5 Windows vm implementation when dealing with thread contention on
x86 Multi Core processors. The problems do not occur in jdk 1.4.2, nor
in 1.6.0. I tracked it down to having todo with the locking implementation
used. It turns out that in jdk 1.6 synchronisation was improved using the
intel PAUSE instruction, but in previous vm's they usually resorted to
Spinning to avoid heavy weight locks. Now you don't want to use locks in
a spinning fashion for non multi-cpu x86 based systems. In JDK 1.4.2 spinning
was always on, in 1.5 only when on a multiprocessor. I suspect that it
incorrectly detects multicore cpu's as not being multiprocessor. I did
some tests and it turns out that you can get jdk 1.5 pretty close to the
other two, however I've only seen this problem on windows, not sure if
my linux machines have other bottlenecks that cause them to behave differently
or if its only misdetected on windows. The situation worsens with the server
vm.</font>
<br>
<br><font size=2 face="sans-serif">My numbers were with -server -XX:
+AggressiveHeap
-Xms1024m -Xmx1024m</font>
<br>
<br><font size=2 face="sans-serif">jdk 1.4.2_12 -&gt; 12 seconds</font>
<br><font size=2 face="sans-serif">jdk 1.5.0_07 - jdk 1.5.0._11 (all tested)
-&gt; 32-35s and clearly visible degradation of processor usage and serious
increase in privilliged kernel time</font>
<br><font size=2 face="sans-serif">jdk 1.6.0 -&gt; 9s</font>
<br><font size=2 face="sans-serif">jdk 1.5.0_xx with -XX:+UseSpinning -XX:
+BiasedLocking
-&gt; 13s</font>
<br>
<br><font size=2 face="sans-serif">The additional XX parameters were extremely
helpfull in my case.</font>
<br>
<br><font size=2 face="sans-serif">---------<br>
<br>
Erik Vanherck &nbsp;- &nbsp;Product Delivery Manager<br>
Inventive Designers <br>
Visit http://www.inventivedesigners.com<br>
Visit http://www.inventivedesigners.com/scriptura for Scriptura information
!<br>
<br>
Phone: +32 - 3 - 8210170<br>
Fax: +32 - 3 - 8210171<br>
Email: Erik_Vanherck@(protected)<br>
<br>
&quot;Computers in the future may weigh no more than 1.5 tons.&quot; -
Popular Mechanics, forecasting the relentless march of science, 1949 &nbsp;<
/font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Brian Minchau &lt;minchau@(protected)
.ibm.com&gt;</b>
</font>
<p><font size=1 face="sans-serif">11/17/2006 10:26 PM</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">xalan-dev@(protected), xalan-j-users@(protected)
.apache.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Performance problem for Xalan-J on intel-dual
core</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><tt><font size=2><br>
Over the last week I've been working with Toadie (a Xalan user) who had<br>
some very serious performance degradation with a webserver using Xalan.<br>
<br>
On an intel dual-core machine it was 10 times slowdown than for a single<br>
processor intel machine.<br>
<br>
The problem occurs in this combination for the latest code:<br>
- Intel dual-processor<br>
- Sun JRE 5<br>
<br>
<br>
Toadie's team was very capable and found that there was thread contention<br>
with synchronized methods, either Xalan-J code or in JRE classes such as<br>
java.util.Vector used by Xalan-J. &nbsp;This performance problem was so
bad that<br>
thread contention just screamed at us, and made it easy to fine the &quot;hot
&quot;<br>
synchronization spots. With their direction I changed Vector to the<br>
unsynchronized ArrayList in a number of locations got back most of the<br>
performance for them.<br>
<br>
Toadie previously let me know that a single processor did not have this<br>
problem, and recently checked that the IBM JRE 5 does not have the same<br>
synchronization performance problem on the dual-core machine.<br>
<br>
So heads up on Xalan's next multiprocessor performance problem.<br>
<br>
Hats off to Toadie who did a great job of analysis, providing hardware
to<br>
do the analysis, and even the patches.<br>
<br>
<br>
- Brian Minchau<br>
mailto:minchau@(protected)<br>
<br>
</font></tt>
<br><hr/><p style="font-size: 9pt; font-family: Verdana, Arial, Helvetica, sans
-serif;">Inventive Designers' Email Disclaimer:<br/><a href="http://www
.inventivedesigners.com/email-disclaimer">http://www.inventivedesigners.com
/email-disclaimer</a></p><br>