Author: prabhat.jha(a)jboss.com
Date: 2009-01-21 18:07:48 -0500 (Wed, 21 Jan 2009)
New Revision: 12603
Added:
docs/enterprise/trunk/Tuning_Guide/Makefile
docs/enterprise/trunk/Tuning_Guide/en-US/
docs/enterprise/trunk/Tuning_Guide/en-US/Author_Group.xml
docs/enterprise/trunk/Tuning_Guide/en-US/Book_Info.xml
docs/enterprise/trunk/Tuning_Guide/en-US/Tuning_Guide.xml
docs/enterprise/trunk/Tuning_Guide/en-US/clustering.xml
docs/enterprise/trunk/Tuning_Guide/en-US/hibernate.xml
docs/enterprise/trunk/Tuning_Guide/en-US/identity.xml
docs/enterprise/trunk/Tuning_Guide/en-US/images/
docs/enterprise/trunk/Tuning_Guide/en-US/jbossweb.xml
docs/enterprise/trunk/Tuning_Guide/en-US/jvm.xml
docs/enterprise/trunk/Tuning_Guide/en-US/overview.xml
Log:
productized
Added: docs/enterprise/trunk/Tuning_Guide/Makefile
===================================================================
--- docs/enterprise/trunk/Tuning_Guide/Makefile (rev 0)
+++ docs/enterprise/trunk/Tuning_Guide/Makefile 2009-01-21 23:07:48 UTC (rev 12603)
@@ -0,0 +1,16 @@
+#Makefile for Portal_EAP
+
+XML_LANG = en-US
+DOCNAME = Portal_EAP
+PRODUCT = JBoss_Portal
+BRAND = JBoss
+
+#OTHER_LANGS = as-IN bn-IN de-DE es-ES fr-FR gu-IN hi-IN it-IT ja-JP kn-IN ko-KR ml-IN
mr-IN or-IN pa-IN pt-BR ru-RU si-LK ta-IN te-IN zh-CN zh-TW
+#OTHER_LANGS = de-DE es-ES fr-FR ja-JP pt-BR zh-CN
+TRANSLATIONS = $(XML_LANG) $(OTHER_LANGS)
+
+
+COMMON_CONFIG = /usr/share/publican
+include $(COMMON_CONFIG)/make/Makefile.common
+
+
Added: docs/enterprise/trunk/Tuning_Guide/en-US/Author_Group.xml
===================================================================
--- docs/enterprise/trunk/Tuning_Guide/en-US/Author_Group.xml (rev
0)
+++ docs/enterprise/trunk/Tuning_Guide/en-US/Author_Group.xml 2009-01-21 23:07:48 UTC (rev
12603)
@@ -0,0 +1,10 @@
+<?xml version='1.0'?>
+<!DOCTYPE authorgroup PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+
+<authorgroup>
+<author>
+ <firstname>Red Hat Documentation Group</firstname>
+ <surname></surname>
+ </author>
+</authorgroup>
Added: docs/enterprise/trunk/Tuning_Guide/en-US/Book_Info.xml
===================================================================
--- docs/enterprise/trunk/Tuning_Guide/en-US/Book_Info.xml (rev
0)
+++ docs/enterprise/trunk/Tuning_Guide/en-US/Book_Info.xml 2009-01-21 23:07:48 UTC (rev
12603)
@@ -0,0 +1,30 @@
+<?xml version='1.0'?>
+<!DOCTYPE bookinfo PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+]>
+
+<bookinfo id="Tuning_Guide_JBoss_Enterprise_Portal_Platform">
+ <title>Tuning Guide</title>
+ <subtitle>For use with JBoss Enterprise Portal Platform 4.3 </subtitle>
+ <edition>2.0</edition>
+ <pubsnumber>4</pubsnumber>
+ <productname>JBoss Enterprise Portal Platform</productname>
+ <productnumber>4.3</productnumber>
+ <pubdate>jan, 2008</pubdate>
+ <isbn>N/A</isbn>
+ <abstract><para>This Installation Guide documents tuning of JBoss Enterprise
Portal Platform</para>
+ </abstract>
+ <corpauthor>
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="Common_Content/images/redhat-logo.svg" />
+ </imageobject>
+ </inlinemediaobject>
+ </corpauthor>
+ <copyright>
+ <year>&YEAR;</year>
+ <holder>&HOLDER;</holder>
+ </copyright>
+ <xi:include href="Common_Content/Legal_Notice.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="Author_Group.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+</bookinfo>
+
Added: docs/enterprise/trunk/Tuning_Guide/en-US/Tuning_Guide.xml
===================================================================
--- docs/enterprise/trunk/Tuning_Guide/en-US/Tuning_Guide.xml (rev
0)
+++ docs/enterprise/trunk/Tuning_Guide/en-US/Tuning_Guide.xml 2009-01-21 23:07:48 UTC (rev
12603)
@@ -0,0 +1,15 @@
+<?xml version='1.0'?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+]>
+
+<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="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>
+
Property changes on: docs/enterprise/trunk/Tuning_Guide/en-US/Tuning_Guide.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: docs/enterprise/trunk/Tuning_Guide/en-US/clustering.xml
===================================================================
--- docs/enterprise/trunk/Tuning_Guide/en-US/clustering.xml (rev
0)
+++ docs/enterprise/trunk/Tuning_Guide/en-US/clustering.xml 2009-01-21 23:07:48 UTC (rev
12603)
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="clustering">
+ <title>Clustering Tuning</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
+ JBoss Web so changes go to
+ <filename>
+ jboss-web-cluster.sar/META-INF/jboss-service.xml
+ </filename>
+ . To enable buddy replication, change the value of
+ <emphasis>buddyReplicationEnabled</emphasis>
+ to true.
+ </para>
+ </section>
+
+ <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
+ defined at
+ <filename>
+ jboss-portal-ha.sar/META-INF/jboss-service.xml
+ </filename>
+ </para>
+ </section>
+ <section id="opt-lock">
+ <title>Optimistic Locking (OL)</title>
+ <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>
+ <attribute
name="NodeLockingScheme">OPTIMISTIC</attribute>
+ <attribute
name="CacheMode">INVALIDATION_SYNC</attribute>
+ </programlisting>
+
+ <note><para>
+ If you have not disabled query cache, then you should
+ not use INVALIATION_SYNC as CACHE_MODE. Use REPL_SYNC
+ instead.</para>
+ </note>
+ </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.
+ </para>
+ </section>
+
+ <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
+ <filename>
+ jboss-portal- ha.sar/META-INF/jboss-service.xml
+ </filename>
+
+ <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>
+ </para>
+ </section>
+</chapter>
Added: docs/enterprise/trunk/Tuning_Guide/en-US/hibernate.xml
===================================================================
--- docs/enterprise/trunk/Tuning_Guide/en-US/hibernate.xml (rev
0)
+++ docs/enterprise/trunk/Tuning_Guide/en-US/hibernate.xml 2009-01-21 23:07:48 UTC (rev
12603)
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="hibernate">
+ <title>Hibernate Tuning</title>
+ <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
+ case, lazy loading should be turned on and off partially or in
+ its entirety. Modify
+ <filename>
+ deploy/jboss-portal[-ha].sar/conf/hibernate/*/domain.hbm.xml
+ </filename>
+ and change
+ <emphasis>lazy=”extra”</emphasis>
+ to
+ <emphasis>lazy=”true”</emphasis>
+ or
+ <emphasis>lazy=”false”</emphasis>
+ <orderedlist numeration="upperroman">
+ <listitem>
+ <para>
+ Modify attribute for the class
+ org.jboss.portal.core.impl.model.portal.ObjectNode
+ <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>
+ <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
+ long before they are evicted by modifying values at
+ <filename>conf/hibernate/*/ehcache.xml</filename>
+ in non clustered configuration. These parameters would
+ 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>
+ </para>
+ </section>
+
+ <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><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.
+ </para>
+ </section>
+</chapter>
+
+
+
+
+
Added: docs/enterprise/trunk/Tuning_Guide/en-US/identity.xml
===================================================================
--- docs/enterprise/trunk/Tuning_Guide/en-US/identity.xml (rev 0)
+++ docs/enterprise/trunk/Tuning_Guide/en-US/identity.xml 2009-01-21 23:07:48 UTC (rev
12603)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="identity">
+ <title>Identity</title>
+ <section id="cache-login-cred">
+ <title>Cache Login Credentials</title>
+ <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>.
+ </para>
+ </section>
+</chapter>
Added: docs/enterprise/trunk/Tuning_Guide/en-US/jbossweb.xml
===================================================================
--- docs/enterprise/trunk/Tuning_Guide/en-US/jbossweb.xml (rev 0)
+++ docs/enterprise/trunk/Tuning_Guide/en-US/jbossweb.xml 2009-01-21 23:07:48 UTC (rev
12603)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="jbossweb">
+ <title>JBoss Web Tuning</title>
+ <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>
+ <Connector port="8009"
address="${jboss.bind.address}"
+ protocol="AJP/1.3" emptySessionPath="true"
enableLookups="false"
+ redirectPort="8443" maxThreads="1500" />
+ </programlisting>
+ </para>
+ </section>
+
+ <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>
+ <session-config>
+ <session-timeout>15</session-timeout>
+ </session-config>
+ </programlisting>
+ </para>
+ </section>
+</chapter>
Added: docs/enterprise/trunk/Tuning_Guide/en-US/jvm.xml
===================================================================
--- docs/enterprise/trunk/Tuning_Guide/en-US/jvm.xml (rev 0)
+++ docs/enterprise/trunk/Tuning_Guide/en-US/jvm.xml 2009-01-21 23:07:48 UTC (rev 12603)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="jvm">
+ <title>JVM Tuning</title>
+ <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
+ <filename>$JBOSS_HOME/bin/run.conf</filename>
+ to add -XX:+ UseLargePages. Please see EAP tuning guide or the
+ description at
+ <ulink
+
url="http://jbossworld.com/downloads/pdf/thursday/JBOSS_10-1050am_JB...
+ </ulink>
+ for the details.
+ </para>
+ </section>
+
+ <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.
+ </para>
+ </section>
+</chapter>
Added: docs/enterprise/trunk/Tuning_Guide/en-US/overview.xml
===================================================================
--- docs/enterprise/trunk/Tuning_Guide/en-US/overview.xml (rev 0)
+++ docs/enterprise/trunk/Tuning_Guide/en-US/overview.xml 2009-01-21 23:07:48 UTC (rev
12603)
@@ -0,0 +1,20 @@
+<?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
+ configurations that are recommended for EAP apply to EPP as well
+ hence most of those tunings will not be covered here. Following
+ is a guideline that may help achieve best out of EPP.
+ </para>
+
+ <para>
+ This document is intended for Portlet Developers, Portal
+ administrators, and those wishing to implement/extend the JBoss
+ Portal framework.
+ </para>
+ </section>
+</chapter>