Author: prabhat.jha(a)jboss.com
Date: 2009-01-21 18:02:44 -0500 (Wed, 21 Jan 2009)
New Revision: 12600
Modified:
docs/enterprise/branches/prabhat/Tuning_Guide/en-US/Tuning_Guide.xml
docs/enterprise/branches/prabhat/Tuning_Guide/en-US/clustering.xml
docs/enterprise/branches/prabhat/Tuning_Guide/en-US/hibernate.xml
docs/enterprise/branches/prabhat/Tuning_Guide/en-US/identity.xml
docs/enterprise/branches/prabhat/Tuning_Guide/en-US/jbossweb.xml
docs/enterprise/branches/prabhat/Tuning_Guide/en-US/jvm.xml
docs/enterprise/branches/prabhat/Tuning_Guide/en-US/overview.xml
Log:
finally it is productized
Modified: docs/enterprise/branches/prabhat/Tuning_Guide/en-US/Tuning_Guide.xml
===================================================================
--- docs/enterprise/branches/prabhat/Tuning_Guide/en-US/Tuning_Guide.xml 2009-01-21
20:50:56 UTC (rev 12599)
+++ docs/enterprise/branches/prabhat/Tuning_Guide/en-US/Tuning_Guide.xml 2009-01-21
23:02:44 UTC (rev 12600)
@@ -5,10 +5,11 @@
<book>
<xi:include href="Book_Info.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="overview.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="jbossweb.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="hibernate.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="identiy.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="jbossweb.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="hibernate.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="identity.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="clustering.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="jvm.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+
</book>
Modified: docs/enterprise/branches/prabhat/Tuning_Guide/en-US/clustering.xml
===================================================================
--- docs/enterprise/branches/prabhat/Tuning_Guide/en-US/clustering.xml 2009-01-21 20:50:56
UTC (rev 12599)
+++ docs/enterprise/branches/prabhat/Tuning_Guide/en-US/clustering.xml 2009-01-21 23:02:44
UTC (rev 12600)
@@ -1,13 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<chapter id="clustering">
-
<title>Clustering Tuning</title>
- <sect1>
- <title>
- Enable Buddy Replication for Portal and Portlet Session
- Clustering
- </title>
+ <section id="buddy-repl">
+ <title> Enable Buddy Replication for Portal and Portlet
Session Clustering</title>
+ <para>
Portal and Portlet Session are merely wrappers around
HttpSession so most of HTTP session clustering optimization
applies to JBPP as well. EPP uses clustering configuration of
@@ -18,12 +15,12 @@
. To enable buddy replication, change the value of
<emphasis>buddyReplicationEnabled</emphasis>
to true.
+ </para>
+ </section>
- </sect1>
-
- <sect1>
+ <section id="hib-cache">
<title>Hibernate and JBoss Cache Configuration</title>
-
+ <para>
EPP uses JBoss Cache as a second level cache for Hibernate and
this configuration is not defined in JBoss Cache definition used
for Portal and Portlet Session. Instead the configuration is
@@ -31,39 +28,41 @@
<filename>
jboss-portal-ha.sar/META-INF/jboss-service.xml
</filename>
-
- <sect2>
+ </para>
+ </section>
+ <section id="opt-lock">
<title>Optimistic Locking (OL)</title>
- Our tests have shown that optimistic locking performs better
+ <para>Our tests have shown that optimistic locking performs better
under heavy load and it scales (horizontally) better as
well. However, your use case may not show the same behavior
and for you pessimistic locking may be a better
configuration. To enable optimistic locking, modify
TreeCache mbean definition as follows:
- <programlisting role="XML">
- <![CDATA[
- <attribute name="NodeLockingScheme">OPTIMISTIC</attribute>
- <attribute name="CacheMode">INVALIDATION_SYNC</attribute>
- ]]>
+ <programlisting>
+ <attribute
name="NodeLockingScheme">OPTIMISTIC</attribute>
+ <attribute
name="CacheMode">INVALIDATION_SYNC</attribute>
</programlisting>
- <note>
+ <note><para>
If you have not disabled query cache, then you should
not use INVALIATION_SYNC as CACHE_MODE. Use REPL_SYNC
- instead.
+ instead.</para>
</note>
-
- </sect2>
- <sect2>
+ </para>
+ </section>
+ <section id="pess-lock">
<title>Pessimistic Locking (PL)</title>
+ <para>
When using Pessimistic Locking (PL), change isolation level
to READ_COMMITTED (RC). Please see <ulink
url="http://lists.jboss.org/pipermail/jbosscache-dev/2008-July/00240...
to see why it is okay to relax the isolation level from
REPEATABLE_READ (RR). As expected, RC has better performance than RR.
- </sect2>
+ </para>
+ </section>
- <sect2>
+ <section id="cache-evic">
<title>Cache Eviction Policy</title>
+ <para>
If you disabled lazy loading, then you can control number of
objects and time they can reside in memory by configuring
EvictionPolicyConfig attribute of TreeCache at
@@ -71,25 +70,17 @@
jboss-portal- ha.sar/META-INF/jboss-service.xml
</filename>
- <programlisting role="XML">
- <![CDATA[
- <attribute name="EvictionPolicyConfig">
- <config>
- <attribute name="wakeUpIntervalSeconds">5</attribute>
- <region name="/_default_">
- <attribute name="maxNodes">5000</attribute>
- <attribute name="timeToLiveSeconds">1000</attribute>
- </region>
- </config>
- </attribute>
- ]]>
+ <programlisting>
+ <attribute name="EvictionPolicyConfig">
+ <config>
+ <attribute
name="wakeUpIntervalSeconds">5</attribute>
+ <region name="/_default_">
+ <attribute name="maxNodes">5000</attribute>
+ <attribute
name="timeToLiveSeconds">1000</attribute>
+ </region>
+ </config>
+ </attribute>
</programlisting>
- </sect2>
-
- </sect1>
+ </para>
+ </section>
</chapter>
-
-
-
-
-
Modified: docs/enterprise/branches/prabhat/Tuning_Guide/en-US/hibernate.xml
===================================================================
--- docs/enterprise/branches/prabhat/Tuning_Guide/en-US/hibernate.xml 2009-01-21 20:50:56
UTC (rev 12599)
+++ docs/enterprise/branches/prabhat/Tuning_Guide/en-US/hibernate.xml 2009-01-21 23:02:44
UTC (rev 12600)
@@ -1,10 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<chapter id="hibernate">
-
<title>Hibernate Tuning</title>
-
- <sect1>
+ <section id="lazy-loading">
<title>Enable/Disable Lazy Loading</title>
+ <para>
EPP assumes that number of portal pages and portlets window will
be large and hence does not cache these objects. As a result,
there could be many direct DB connection. But depending on use
@@ -21,44 +20,49 @@
<emphasis>lazy=”false”</emphasis>
<orderedlist numeration="upperroman">
<listitem>
+ <para>
Modify attribute for the class
org.jboss.portal.core.impl.model.portal.ObjectNode
- <programlisting role="XML">
- <![CDATA[
- <map name="children" inverse="true" cascade="none"
fetch="select" lazy="true">
- <cache usage="transactional" /> //[“read-write” in non clustered]
- <key column="PARENT_KEY" />
- <map-key type="org.jboss.portal.jems.hibernate.MagicString"
column="NAME" />
- <one-to-many class="org.jboss.portal.core.impl.model.portal.ObjectNode"
/>
- </map>
- ]]>
+ <programlisting>
+ <map name="children" inverse="true"
cascade="none" fetch="select" lazy="true">
+ <cache usage="transactional" /> //[“read-write” in non
clustered]
+ <key column="PARENT_KEY" />
+ <map-key type="org.jboss.portal.jems.hibernate.MagicString"
column="NAME" />
+ <one-to-many
class="org.jboss.portal.core.impl.model.portal.ObjectNode" />
+ </map>
</programlisting>
+ </para>
</listitem>
<listitem>
+ <para>
Enable caching for displayNames for the class
org.jboss.portal.core.impl.model.portal.PortalObjectImpl
- <programlisting role="XML">
- <![CDATA[
- <map name="displayNames" cascade="none"
fetch="select" lazy="true"
- table="JBP_PORTAL_OBJECT_DNAMES">
- <cache usage="transactional" /> <!-- [“read-write” in non
clustered]-->
- <key column="INSTANCE_PK" />
- <map-key type="locale" column="LOCALE" />
- <element type="string" column="TEXT" />
- </map>
- ]]>
+ <programlisting>
+ <map name="displayNames" cascade="none"
fetch="select" lazy="true"
+ table="JBP_PORTAL_OBJECT_DNAMES">
+ <cache usage="transactional" />// [“read-write” in non
clustered]
+ <key column="INSTANCE_PK" />
+ <map-key type="locale" column="LOCALE" />
+ <element type="string" column="TEXT" />
+ </map>
</programlisting>
+ </para>
</listitem>
<listitem>
+ <para>
Same as above for
<filename>hibernate/instance/domain.hbm.xml</filename>
for displayNames map.
+ </para>
</listitem>
<listitem>
+ <para>
Enable/disable lazy loading for set “users” in
<filename>hibernate/user/domain.hbm.xml</filename>
+ </para>
</listitem>
<listitem>
+ <para>
Disabling lazy loading implies there will be many
objects in memory. You can control how many objects
would need to reside in memory at a time and for how
@@ -68,27 +72,31 @@
need to be changed as per the use case. For clustered
configuration, see the chapter on <xref linkend="clustering">
clustering
configuration.</xref>
+ </para>
</listitem>
</orderedlist>
- </sect1>
+ </para>
+ </section>
- <sect1>
+ <section id="query-cache">
<title>Enable/Disable Query Cache</title>
+ <para>
EPP no longer uses query cache. Unless EPP is customized to use
query cache, it should be disabled by turning the value of
property "cache.use_query_cache" to false in following files:
<itemizedlist>
- <listitem><filename>hibernate/instance/hibernate.cfg.xml
</filename></listitem>
- <listitem><filename>hibernate/portal/hibernate.cfg.xml
</filename></listitem>
- <listitem><filename>hibernate/portlet/hibernate.cfg.xml</filename></listitem>
- <listitem><filename>hibernate/user/hibernate.cfg.xml</filename></listitem>
+ <listitem><para><filename>hibernate/instance/hibernate.cfg.xml
</filename></para></listitem>
+ <listitem><para><filename>hibernate/portal/hibernate.cfg.xml
</filename></para></listitem>
+ <listitem><para><filename>hibernate/portlet/hibernate.cfg.xml</filename></para></listitem>
+ <listitem><para><filename>hibernate/user/hibernate.cfg.xml</filename></para></listitem>
</itemizedlist>
Disabling query cache also allows to
use<emphasis>INVALIDATION_SYNC</emphasis> as
CACHE_MODE when using optimistic locking with JBoss Cache and
Hibernate as explained in the clustering section.
- </sect1>
+ </para>
+ </section>
</chapter>
Modified: docs/enterprise/branches/prabhat/Tuning_Guide/en-US/identity.xml
===================================================================
--- docs/enterprise/branches/prabhat/Tuning_Guide/en-US/identity.xml 2009-01-21 20:50:56
UTC (rev 12599)
+++ docs/enterprise/branches/prabhat/Tuning_Guide/en-US/identity.xml 2009-01-21 23:02:44
UTC (rev 12600)
@@ -1,20 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<chapter id="identity">
-
<title>Identity</title>
-
- <sect1>
+ <section id="cache-login-cred">
<title>Cache Login Credentials</title>
- EPP uses JaasSecurityManagerService to obtain current users
+ <para>
+ EPP uses JaasSecurityManagerService to obtain current users
roles that are cached by JAAS during authentication. So altering
cache invalidation can affect performance. Please see the details at
<ulink
url="http://wiki.jboss.org/wiki/CachingLoginCredentials">
- </ulink>.
- </sect1>
-
- <sect1>
- <title>Miscellaneous</title>
-
- </sect1>
+ </ulink>.
+ </para>
+ </section>
</chapter>
Modified: docs/enterprise/branches/prabhat/Tuning_Guide/en-US/jbossweb.xml
===================================================================
--- docs/enterprise/branches/prabhat/Tuning_Guide/en-US/jbossweb.xml 2009-01-21 20:50:56
UTC (rev 12599)
+++ docs/enterprise/branches/prabhat/Tuning_Guide/en-US/jbossweb.xml 2009-01-21 23:02:44
UTC (rev 12600)
@@ -1,39 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<chapter id="jbossweb">
-
<title>JBoss Web Tuning</title>
-
- <sect1>
+ <section id="jboss-web">
<title> HTTP/AJP connector threads </title>
+ <para>
Increase number of HTTP/AJP connector threads. It's recommended
to set this value to <emphasis> 250 * n </emphasis> where n is number of
CPU in your
server. Depending on nature of your application, this can be set
higher or lower. Modify value of maxThreads in in
<filename>deploy/jboss-web.deployer/server.xml</filename>
- <programlisting role="XML">
- <![CDATA[
- <Connector port="8009" address="${jboss.bind.address}"
+ <programlisting>
+ <Connector port="8009"
address="${jboss.bind.address}"
protocol="AJP/1.3" emptySessionPath="true"
enableLookups="false"
- redirectPort="8443" maxThreads="1500" />
- ]]>
-
+ redirectPort="8443" maxThreads="1500" />
</programlisting>
- </sect1>
+ </para>
+ </section>
- <sect1>
+ <section id="session-timeout">
<title> Global Session Timeout </title>
+ <para>
Reduce global session timeout to your need. The default value of
30 min is too high for most use cases. A lower session timeout
results into a more consistent memory footprint and more
consistent throughput. Modify
<filename>deploy/jboss-web.deployer/conf/web.xml</filename>
- <programlisting role="XML">
- <![CDATA[
- <session-config>
- <session-timeout>15</session-timeout>
- </session-config>
- ]]>
+ <programlisting>
+ <session-config>
+ <session-timeout>15</session-timeout>
+ </session-config>
</programlisting>
- </sect1>
+ </para>
+ </section>
</chapter>
Modified: docs/enterprise/branches/prabhat/Tuning_Guide/en-US/jvm.xml
===================================================================
--- docs/enterprise/branches/prabhat/Tuning_Guide/en-US/jvm.xml 2009-01-21 20:50:56 UTC
(rev 12599)
+++ docs/enterprise/branches/prabhat/Tuning_Guide/en-US/jvm.xml 2009-01-21 23:02:44 UTC
(rev 12600)
@@ -1,10 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<chapter id="jvm">
-
<title>JVM Tuning</title>
-
- <sect1>
+ <section id="large-page">
<title>Use Large Pages</title>
+ <para>
When using 64 bit Linux systems , use Linux's large memory page
support. Without large page support, increasing heap size may
not increase your performance. Modify JAVA_OPTS under
@@ -15,11 +14,14 @@
url="http://jbossworld.com/downloads/pdf/thursday/JBOSS_10-1050am_JB...
</ulink>
for the details.
- </sect1>
+ </para>
+ </section>
- <sect1>
+ <section id="gc">
<title>Garbage Collection (GC) Tuning</title>
+ <para>
Depending on nature of your application, adding <emphasis>
XX:+UseConcMarkSweepGC -XX:+UseParNewGC </emphasis>
may optimize GC collection behavior.
- </sect1>
+ </para>
+ </section>
</chapter>
Modified: docs/enterprise/branches/prabhat/Tuning_Guide/en-US/overview.xml
===================================================================
--- docs/enterprise/branches/prabhat/Tuning_Guide/en-US/overview.xml 2009-01-21 20:50:56
UTC (rev 12599)
+++ docs/enterprise/branches/prabhat/Tuning_Guide/en-US/overview.xml 2009-01-21 23:02:44
UTC (rev 12600)
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<chapter id="overview">
<title>Overview</title>
+ <section id="Overview">
+ <title>Overview</title>
<para>
Since JBoss Enterprise Portal Platform (EPP) uses many services
of JBoss Enterprise Application Platform (EAP), all tunings and
@@ -14,6 +16,5 @@
administrators, and those wishing to implement/extend the JBoss
Portal framework.
</para>
-
-
+ </section>
</chapter>