Escolar Documentos
Profissional Documentos
Cultura Documentos
Abstract
This white paper summarizes best practices and
guidelines for designing and configuring an xCP 2.0
application to get better performance. Intended
audiences include xCP 2.0 designers and administrators.
January 2013
Table of Contents
Executive Summary ............................................................................................. 5
Audience .............................................................................................................. 5
Abbreviation ........................................................................................................ 5
Background.......................................................................................................... 5
Architecture and Scalability ............................................................................... 6
Design Time .......................................................................................................... 6
General Recommendations ......................................................................................... 7
Limit Business Object Hierarchy Depth .................................................................... 7
Limit Number of Items in a Folder ............................................................................. 7
Limit Number of Grids on a Page ............................................................................. 7
Minimize Nesting of Column Boxes .......................................................................... 8
Minimize Use of Expression on Tab Group ............................................................... 8
Set Height to Tree or Tab Group ............................................................................... 8
Data Services .................................................................................................................. 8
Avoid triggering multiple queries ............................................................................. 8
Avoid Operators Contains, "Ends with" or "Does not contain" .......................... 8
Limit Number of Sortable Output Columns Full-Text ........................................... 9
Avoid Operators "Does not contain", "!=" and "Ends with" Full-Text .................. 9
Use Selective Criterion Full-Text............................................................................ 10
Avoid Fuzzy Search Full-Text ................................................................................. 10
Discovered Metadata ................................................................................................. 10
Limit Discovered Metadata Usage ........................................................................ 11
Avoid Adding Discovered Metadata of Type Entity Detection ........................ 11
Case and Process (BPM) ............................................................................................. 11
Use package instead of relationship to access BO in task-list query................ 11
Use business object package to encapsulate many process variables .......... 12
Viewer ............................................................................................................................ 12
Turn Off Thumbnails .................................................................................................. 12
Designer ......................................................................................................................... 12
Limit Number of Open Pages ................................................................................. 12
Deployment Time............................................................................................... 13
Use tomcat.util.scan.DefaultJarScanner.jarsToSkip to exclude jars from
annotation scanning ............................................................................................... 13
xPlore .............................................................................................................................. 13
Use Small Repository at Design Time...................................................................... 13
Bypass Index Rebuilding .......................................................................................... 13
BAM ................................................................................................................................ 14
Use Different MQ Creation Strategies.................................................................... 14
Create Multiple Pipe Jobs ....................................................................................... 14
Move Runtime jars to bam-server.war .................................................................. 14
Content Transformation Services ............................................................................... 15
Minimize Storage Requirement .............................................................................. 15
Runtime ............................................................................................................... 15
Database Tuning .......................................................................................................... 15
General Guidelines .................................................................................................. 15
Sorting with Business Object.................................................................................... 16
Filtering with Business Object .................................................................................. 16
Recommended Tunings with Oracle..................................................................... 16
Recommended Tunings with SQL Server 2008 ..................................................... 16
Content Server .............................................................................................................. 17
Use DM_NO_EXTRA_JOINS....................................................................................... 17
Use Group Address to Reduce Mail Sending ....................................................... 17
Case and Process (BPM) ............................................................................................. 18
Oracle Tuning for Complex Task-List Query .......................................................... 18
Business Activity Monitor .............................................................................................. 18
Optimizing Historical Query Aggregation Frequency ......................................... 18
Content Transformation Services ............................................................................... 19
CTS JVM Tuning ......................................................................................................... 19
Change MaxParallelDecoding .............................................................................. 20
Tune Asynchronous CTS Thread Model ................................................................. 20
Tune Synchronous CTS Thread Model ................................................................... 20
Use ACS to Download Content from Content Server ......................................... 20
Viewer ............................................................................................................................ 21
Use Dedicated CTS Instances for Real-Time Requests ........................................ 21
Content Intelligence Services ..................................................................................... 21
Tune CIS ..................................................................................................................... 21
Do Not Allow a backlog of CIS Requests .............................................................. 22
Search ............................................................................................................................ 22
Use Debug Flag to Trouble-Shoot Performance Issue ......................................... 22
Conclusion ......................................................................................................... 23
Executive Summary
This document summarizes performance best practices and guidelines
based on internal performance studies using xCP 2.0.
The document is divided into the three major phases in the lifecycle of an
xCP application: design, deployment, and runtime.
Audience
This white paper is intended for xCP 2.0 designers and administrators.
Abbreviation
The following list contains terms, abbreviations, and acronyms that appear
in the white paper.
ACS
BAM
BE
Business Event
BO
Business Object
BPM
CS
Content Server
CIS
CTS
DM
Discovered Metadata
MQ
Message Queue
Background
xCP 2.0 is a platform used to develop end user applications. The design,
configuration, and tuning of the system impact the performance of the
end user application. This white paper provides best practices to follow
and guidelines to consider when you develop an xCP 2.0 application. The
content for this white paper is taken from a series of internal performance
and scalability studies using xCP 2.0 with Documentum 7.0.
The diagram above illustrates how the BAM server can be deployed in a
clustered environment to provide high availability for end user report
viewing. The EMC Documentum xCelerated Composition Platform 2.0
Deployment Guide provides guidelines on deploying BAM in a clustered
environment.
Design Time
You should carefully plan the design of your xCP application because
there are limitations on the ability to adjust it later. You should make critical
decisions when you are designing the system that impact how the
application performs and scales during runtime.
General Recommendations
Limit Business Object Hierarchy Depth
A business object type can be a subtype of dm_sysobject or another
business object type. Each additional level results in additional joins when a
database query includes the business objects. Consequently, the query
takes more time to execute and negatively impacts application
performance.
Limit the BO hierarchy to three levels, which includes the dm_sysobject
level.
Limit Number of Items in a Folder
System performance is negatively impacted when an end user navigates
to a folder that contains a large number of items. This occurs even when
the application includes pagination.
For better performance limit the number of items/objects in a folder to
2000.
Placing a limit on the number of items in a folder may seem like a runtime
issue only. However, a decision made during the design of the application
could make it impossible to limit the number of items in a folder during
runtime.
For example, you might create a folder and for each new customer, a subfolder is created in the folder to store customer documents and artifacts.
When your business expands, you might end up with a large number of
customers and navigating to that folder might not have a satisfactory
performance.
Limit Number of Grids on a Page
A data grid is an important widget often used in an xCP application.
However, the display of data grids can take time, particularly when the
end user uses Internet Explorer. For better performance, it is recommended
that you limit the number of grids on a page.
An alternative is to use tabs so that each page can be loaded and
displayed quickly.
Data Services
Avoid triggering multiple queries
When you select On page load or When an input value changes the
system could trigger queries unnecessarily, resulting in a greater load on
the server.
For example, when you select When an input value changes, and an end
user types in a word of four letters for search, the system can trigger the
same query four times.
This guideline applies to real-time, historical, full-text, and task-list queries.
Avoid Operators "Does not contain", "!=" and "Ends with" Full-Text
Do not use the Does not contain, !=, or Ends with negative operators when
configuring a user input for a full-text search. Queries that contain these
operators can impact system performance.
Discovered Metadata
The CIS server computes metadata values by analyzing the content of an
object. This computation is performed asynchronously. The volume and
format of the content can impact the amount of CPU resources needed
to perform the computation.
The following table provides example performance metrics for the entity
detection and the categorization and pattern detection processing types:
Type of
Processing
Entity detection
Categorization
&
Pattern detection
Discovered Metadata
Fax number
Organization
People
Phone number
Place
postal address
Business terms (USA)
Science and Engineering
Email address
SSN (USA)
URL
Throughput
Example with
Documents of 4KB
10 MB/hour
2,500
documents/hour
1 GB/hour
250,000
documents/hour
10
Entity detection
High
Unnoticeable
Categorization
Low
Much lower
Pattern detection
Low
Low
11
Viewer
Turn Off Thumbnails
If an end user views documents that contain mostly text (for example,
Word or PDF documents), clear the Display thumbnail navigator checkbox.
Displaying a thumbnail for a text page does not add value to the end user
and because the system downloads thumbnails, system performance can
be negatively impacted. The impact can be significant under WAN
conditions.
However, it is important to note that clearing this option also turns off the
page modification feature.
Designer
Limit Number of Open Pages
Limit the number of pages open in xCP Designer. Depending on native
memory and java heap settings you could experience performance issues
with xCP Designer when you keep a large number of pages open.
Java heap: Each page consumes memory in the Java heap and
with many open pages the JVM can spend much time doing
garbage collection. xCP Designer is a 32-bit application that limits
the maximum heap size.
12
Deployment Time
Use tomcat.util.scan.DefaultJarScanner.jarsToSkip to exclude jars from
annotation scanning
Tomcat 7 includes support for Servlet 3.0 annotations which require more
heap memory and results in a longer start up time for the server because
of higher heap usage and additional processing.
xCP 2.0 does not require support for annotations. You can configure
Tomcat to exclude annotation JARs from being scanned during start up.
The EMC Documentum xCelerated Composition Platform 2.0 Deployment Guide
provides instructions on how to exclude JARs from being scanned.
xPlore
Deploying or redeploying an xCP application could cause the xPlore index
to be rebuilt. Rebuilding the xPlore index is a synchronous operation that
negatively impacts the overall deployment performance if the index is
large.
Based on EMC internal tests, the throughput is 10-30 documents per
second with small to medium document size.
Use Small Repository at Design Time
This is the preferred way before the deployment to the production
environment. For example, a repository with 1000 documents can be used
during the design time since the purpose at the design time is to ensure the
correctness of the application.
Bypass Index Rebuilding
You can use xMS Server to deploy an xCP application to bypass xPlore
index rebuilding. However you cannot bypass index rebuilding when you
use xCP Designer to deploy an application.
1. Use xCP Designer to package the WAR and config.xml files.
2. Use xMS Server to deploy an application and specify -xploreindexing
false during deployment
For example:
13
xms>deploy-xcp-application --war-file
C:\package\Casual_and_Property_Insurance.war -configuration-file
C:\package\Casual_and_Property_Insurance_capins_1.0.0_config
.xml --environment C24-DIY --xploreindexing false
Once deployed, use the xPlore admin console to rebuild the index. If the
index is not rebuilt, the system does not make changes in the Full-Text
search model available to end users at runtime. For example, if you add a
facet to an application and xPlore does not rebuild the index, the end user
does not see the facet.
BAM
Use Different MQ Creation Strategies
Content Server message queues hold business event data generated by the
runtime application. The message queue strategy determines the number of
message queues the system creates. The strategy correlates with system
performance. Generally, the more message queues the system creates the better
the BAM server performs.
The EMC Documentum xCelerated Composition Platform 2.0 Deployment Guide
provides instructions.
Create Multiple Pipe Jobs
The BAM server runs one pipe job for each message queue, taking data from the
queue and inserting it into the BAM database. If you have a backlog of data you
can add pipe jobs to a message queue as a way to improve system performance.
The EMC Documentum xCelerated Composition Platform 2.0 Deployment
Guide provides instructions.
Move Runtime jars to bam-server.war
When you deploy xCP, the runtime JAR files are placed in
CATALINA_BASE/lib. You can improve system performance by moving the
runtime JAR files to CATALINA_BASE/webapps/bam-server/WEB-INF/lib.
BAM throughput can be improved by 50-100%.
The EMC Documentum xCelerated Composition Platform 2.0 Deployment
Guide provides more information.
14
Runtime
Database Tuning
General Guidelines
In general, database tuning is expected in order to get satisfactory
performance.
Index creation
o This is application and data model specific and not all the
required indexes are created out of the box.
o For example, 24 indexes were created for the reference
application used during the internal performance study.
Statistics gathering
o Gathering statistics involves a number of options and
configuration parameters. It is the responsibility of the DBA to
determine the best options based on the application and how
it is used.
o For Oracle:
http://docs.oracle.com/cd/E11882_01/server.112/e16638/stats
.htm#PFGRF003
o For SQL Server 2008: http://msdn.microsoft.com/enus/library/dd535534(v=sql.100).aspx
15
Set cursor_sharing=FORCE
Parameterization = forced
16
Content Server
Use DM_NO_EXTRA_JOINS
When views are created, extra/redundant join predicates are added by
default.
However, it is found that with Oracle 11g, the redundant join predicates
present challenges to Oracle optimizer and can result in much worse
performance because the Oracle optimizer might choose a sub-optimal
execution plan.
17
optimizer_index_caching=95
optimizer_index_cost_adj=5
These parameters are global and the impact on the performance of other
types of queries is not clear.
Test and validate this setting in a test environment before using it in a
production environment.
18
19
pdfstoryboard.xml
<MaxParallelDecoding>8</MaxParallelDecoding>
doc2.xml
<MaxParallelDecoding>8</MaxParallelDecoding>
20
<CTSServer AttributeName="preferAcsTransfer"
AttributeValue="true"/>
3. Restart CTS.
Viewer
Use Dedicated CTS Instances for Real-Time Requests
Configure one or more CTS instances to process real-time requests.
1. Access each machine that sends real-time requests.
2. Edit the preferences.xml file. For example:
<ServerProperty Key="AvailabilityWait" Description="Number
of seconds to wait for rechecking availability"
Value="4"/>
<ServerProperty Key="CTS_SkipList" Description=" list of
cts instances (semicolon separated) to skip (scalability)"
Value=A-CTS1;A-CTS2"/>
3. Edit the CTSServerService.xml file for each real-time instance to ensure
that a dedicated real-time CTS instance is not processing asynchronous
requests. For example:
<QueueProcessorContext DocbaseName="xcprepo">
<CTSServer AttributeName="queueItemName"
AttributeValue="dm_mediaserver_temp"/>
<QueueProcessorContext DocbaseName="xcprepo">
<CTSServer AttributeName="queueItemName"
AttributeValue="dm_autorender_win31_temp"/>
cis.server.execution.threads
cis.entity.luxid.annotation_server.cpu
21
Search
Use Debug Flag to Trouble-Shoot Performance Issue
The debug mode for query data services can be activated at runtime by
adding the debug parameter in the URL calling the services. The debug
information is useful to troubleshoot issues such as performance issues. It
allows you to check results, execution events, and the query sent to the
source.
The following example shows how to add the debug parameter to the
URL:
http://<host>:<port>/<application_name>/application/documents?type=ft_do
c&q=active&page=1&start=0&limit=10&debug
The following table shows the output from the debug operation. Search for
the statistics section which includes four entries all prefixed with JAMon
Label:
Step
Real-Time
Full-Text
1
2
3
4
RealtimeAttributeMapperFactory.createMapper
RealtimeQueryAdapter.adapt
RealtimeQueryExecutor.execute
RealtimeResultAdapter.adapt
DfcAttributeMapperFactory.createMapper
DfcSearchQueryAdapter.adapt
DfcSearchExecutor.execute
DfcSearchResultAdapter.adapt
Steps 1 and 2: The application server prepares and builds the query
22
In this example the execute query step took 969ms (LastValue) and there
were 59 query executions (Hits) since application server startup.
Label
Description
LastValue
Hits
Avg/Total/Min/Max
Conclusion
xCP is not an application but a composition platform for developing
applications. Performance should be considered in all the three major
phases: design, deployment and runtime. In particular, tuning is generally
required at the database level in order to get satisfactory performance.
The whitepaper is written based on findings and experience gained
through EMCs internal performance study. Most recommendations in the
whitepaper are not application specific and depending on how an
application is designed and used, additional tuning is required on case-bycase basis.
In general, each recommendation should be taken within a context.
Depending on the use case and the data volume in a repository, the
performance might be satisfactory without following the
recommendations. For example, you can use fuzzy search without
impacting much the performance if the data volume is small.
Performance tuning and optimization is a continuous process and it is the
same case with xCP 2.0. Many discussions and articles are expected to be
posted on EDN (EMC Developer Network) on solutions to address common
or specific xCP 2.0 performance issues. We encourage you to use EDN as a
first step when you encounter a performance issue.
23