Skip navigation.

Best Practices Guide

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents View as PDF   Get Adobe Reader

Performance

 


Performance Tuning

This section includes information on caching as well as portlet threading. The following topics are covered in this section:

Managing Caches

Table 0-1 lists caches that might be used by your portal application. Use the list to assist in your tuning. Keep in mind the memory that is available to your system. When modifying the maximum cache sizes also monitor the system memory to determine the effects.

Statically defined caches are established in the application-config.xml file for the application. These caches have dynamically, not statically, configurable attributes, which can be configured in the Weblogic 8.1 Administration Portal by navigating to: Applications --> [Portal App Name] --> Service Configuration --> Caches -> service configuration

Some caches listed below may not show up in the Weblogic 8.1 Administration Portal. To configure such caches, you can create an entry in the Weblogic 8.1 Administration Portal and redeploy the application. These caches will then be configurable from the Weblogic 8.1 Administration Portal.

How to Use Caching Tables

Table 0-1 and Table 0-2 list caches used to tune performance in WebLogic Portal 8.1 domain, and Portal Compatibility Domain, respectively. Find a cache you need to adjust, then use the WebLogic Administration Portal to adjust the cache settings.

Table 0-1 Configurable Caches in WebLogic Portal 8.1


Cache

actionNameCache

Use

Used to store the action classes for campaigns

Key

The class name (java.lang.String)

Value

The actual Class for the action (java.lang.Class)

Notes

Not configured in application-config.xml but rather in cache-actionNameCache.properties.

Default values should be okay.


Cache

adServiceCache

Use

Used by the AdHelper to increase the speed of ad queries.

Key

Used by the AdHelper to increase the speed of ad queries.

Value

The ad query (java.lang.String)

Notes

Stores a Content[] of ads keyed off an ad query.

If the ads returned from a particular query do not change, consider increasing the TTL.

Consider basing the maximum size on the total number of ad queries.


Cache

CategoryCache

Use

Stores the root com.beasys.commerce.ebusiness.catalog.Category, the total number of categories in the product catalog (java.lang.Integer) and the CategoryInfo for each category.

Key

The key for the root Category is a static final String variable in the CategoryManagerImpl class. The key for the total number of categories is also a static final String variable in the CategoryManagerImpl class. The key for a given CategoryInfo object is a com.beasys.commerce.ebusiness.catalog.CategoryKey.

Value

The value for the root Category is com.beasys.commerce.ebusiness.catalog.Category. The value for the total number of categories is a java.lang.Integer. The value for the category info objects is a com.beasys.commerce.ebusiness.catalog.service.category.CategoryInfo.

Notes

CategoryManagerImpl gets the cache name from the ejb-jar.xml in commerce.jar

The root Category and the total number of categories occupy two slots in the cache and the remaining slots are occupied by the CategoryInfo objects, so consider the total number of categories in the product catalog plus 2 when setting the maximum cache size.

Consider how often these categories will change when setting TTL.


Cache

configurableEntityMethodCache

Use

Stores method information for setter methods for explicit properties

Key

Based on the class name and the method name (java.lang.String).

Value

A com.bea.p13n.property.internal.CacheMethod object.

Notes

When setting the maximum cache size, consider the number of explicit properties in your application.

Consider how often explicit properties will change in your system when setting TTL.


Cache

discountCache

Use

Stores com.bea.commerce.ebusiness.discount.mgmt.QualificationDiscountDef objects. These discounts are applicable to particular customers or customer segments.

Key

A com.bea.commerce.ebusiness.discount.mgmt.QualificationDiscountId. Essentially this is a wrapper around a java.lang.Integer that represents the id of the discount.

Value

A com.bea.commerce.ebusiness.discount.mgmt.QualificationDiscountDef

Notes

Set the maximum cache size based on the number of possible discounts.

Consider how often discounts change when setting the TTL.


Cache

documentContentCache

Use

Used by the DocumentManager to cache the actual bytes of content

Key

Based on id, start, and length of content (an inner class called BytesKey).

Value

byte[]

Notes

This cache is only used with the WebLogic Portal 7.0 SP2 content repository.

By default, the maximum number of bytes that can be stored as a cache entry is 32K. This is adjustable and is set via the DocumentManagerMBean.

Applications with a large amount of content could benefit with a larger max cache size. Keep memory consumption in mind here.

Applications with substantial static content might benefit from increasing the TTL.


Cache

entityIdCache

Use

Caches the id for an entity (user or group id, ENTITY.ENTITY_ID)

Key

Object key is a com.bea.p13n.property.PropertyLocator. PropertyLocator is based on a user or group name (ENTITY.ENTITY_NAME) and entity type (ENTITY.ENTITY_TYPE).

Value

The entity id (java.lang.Long).

Notes

As in the entityPropertyCache uses the ENTITY table as a guide for the maximum size. The object being stored is a Long, which is fairly small. Therefore, it might be possible to set this cache's maximum size to the number of entries in the ENTITY table.

Consider how often the ENTITY table might change when setting the TTL.


Cache

entityPropertyCache

Use

Caches property values for users and groups

Key

Object key is a com.bea.p13n.property.PropertyLocator. PropertyLocator is based on the user or group name (ENTITY.ENTITY_NAME), entity type (ENTITY.ENTITY_TYPE, user or group) and property set type (PROPERTY_KEY.PROPERTY_SET_TYPE, usually USER).

Value

A com.bea.p13n.property.EntityPropertyCache object. This object contains a Map that stores property values keyed off the property set name and property name.

Notes

The larger you can afford to make this cache, the better.

Use the ENTITY table as a guide for maximum size. The number of entries in this table should be the maximum number of cache entries that would ever be created. In most cases, there will be more entries here than you would want for a maximum cache size. So consider the average number of users you expect to be using your application at the same time.

Consider a TTL based on how often new properties will be added to the property sets. If they are not being modified often, then a higher TTL might be appropriate.


Cache

globalDiscountCache

Use

Stores a java.util.Set of QualificationDiscountDef objects. This is the set of global discounts that is applicable to all users.

Key

The globalDiscountSet name (java.lang.String)

Value

The java.util.Set of global discounts

Notes

Default maximum size of 10 should be fine.

Frequency of changes to the global discounts should determine TTL.


Cache

ldapPropertyCache

Use

Caches property values for users and groups when using LDAP for storing properties.

Key

Object key is a com.bea.p13n.property.PropertyLocator. PropertyLocator is based on the user or group name, entity type and property set type.

Value

A com.bea.p13n.property.EntityPropertyCache object. This object contains a Map that stores property values. The Map is keyed off the property set name and property name.

Notes

Serves the same purpose as the entityPropertyCache. See Notes on entityPropertyCache.


Cache

ProductItemCache

Use

Stores the total number of product items in the catalog as well as the product items

Key

The key for the total number of product items is a static final String variable in ProductItemManagerImpl. The key for the product items is a com.beasys.commerce.ebusiness.catalog.ProductItemKey.

Value

The value for the total number of product items is a java.lang.Integer. The value for the product item is a com.beasys.commerce.ebusiness.catalog.ProductItem.

Notes

ProductItemManagerImpl gets the cache name from the ejb-jar.xml in commerce.jar.

Consider the total number of product items when setting the maximum cache size.

Consider how often these product items will change when setting the TTL.


Cache

profileTypeCache

Use

Stores the profile type for a user. This profile type is used to lookup the correct user profile manager when fetching the user's Profile.

Key

A username (java.lang.String)

Value

The profile type (java.lang.String)

Notes

Consider the number of users you expect to be logged into your system at a given time when setting the maximum cache size.

Unless you plan on changing a user's profile manager during runtime, a high TTL or one that never expires might be appropriate


Cache

propertyKeyIdCache

Use

Caches the unique id associated with a property set type, property set and property name combination (primary key in the PROPERTY_KEY database table).

Key

Based on a property set type, property set, and property name combination (inner class called PropertyKeyLocator).

Value

The id (java.lang.Long)

Notes

Maximum size should be set with an eye towards the maximum number of properties in the application (use the PROPERTY_KEY table as an indicator).

Consider a TTL based on how often these unique id combinations are likely to change.


Cache

portalControlTreeCache

Use

Used to store portal control trees

Key

The combination of webapp, portal, desktop, locale and optional user name.

Value

A portal control tree.

Notes

Configured in application-config.xml

Default TTL value should be okay, Max Entries could be set to a number based on number of users and available memory.

If there are any changes to portal this cache will be flushed.


Cache

portletControlTreeCache

Use

Used to store portlet control trees.

Key

The combination portletInstanceId and locale.

Value

A portlet control tree.

Notes

Configured in application-config.xml

Default TTL value should be okay, Max Entries could be set to a number based on number of floatable portlet instances in a portal (Including user customized portlets)and number of supported locales.


Cache

portalContentUriCache

Use

Used to store portal content URI for portal path.

Key

The combination portal path and webAppName.

Value

A portal content URI.

Notes

Configured in application-config.xml

Default TTL value should be okay, Max Entries could be set to a number based on number of portals that have associated content URIs.


Cache

portalLocalizationResourceCache

Use

Used to store localization resources.

Key

The localizationIntersection.

Value

A LocalizationResource.

Notes

Configured in application-config.xml

Default TTL and Max Entries values could be set to a value based on total number of localization resources in the system which is a combination of non-customized and customized localization resources and amount of available memory.


Cache

portalLocalizationlocaleCache

Use

Used to store collection of LocalizationLocales.

Key

The key is private static final string called "portalLocalizationLocaleCachekey"

Value

A set of LocalizationLocales.

Notes

Configured in application-config.xml

Default TTL value should be okay, Max Entries could be set to a number based on number of rows in L10N_LOCALE table i.e. number of supported locales.


Cache

portalMarkupdefinitionCache

Use

Used to store MarkupDefinitions.

Key

The MarkDefinitionId.

Value

A MarkupDefinition.

Notes

Configured in application-config.xml

Default TTL value should be okay, Max Entries could be set to a number based on total number of rows in PF_MARKUP_DEFINITION table.


Cache

portletPreferencesCache

Use

Used to store portlet preferences.

Key

An instance of PortletPreferenceId.

Value

A map of preferences.

Notes

Configured in application-config.xml

Default TTL and Max Entries values could be set to a value depending on amount of available memory and total number of preferences (at application level).


Cache

nodeCache.<Repository Name>

Use

Caches Nodes for a Repository based on ID.

Key

The Node ID as a String.

Value

The actual Node instance (com.bea.content.Node).

Notes

This cache can be configured using the WebLogic Administration Portal, or programmatically through the P13N CacheManager. Each Repository has its own separate Node cache. This cache is used by NodeOps when retrieving and updating Nodes. Please use in conjunction with the Repository vendor's cache architecture.

Default values:

  • Maximum Entries: 50

  • Time To Live(seconds): 6000

  • Is Enabled: True


Cache

binaryCache.<Repository Name>

Use

Caches Binary properties for a Node.

Key

The Node ID as a String + the unique Property ID as a String.

Value

The byte array associated with the Binary property.

Notes

This cache can be configured using the Portal Administration Tool or programmatically through the P13N CacheManager. Each Repository has its own separate Binary cache. Keep memory consumption in mind when setting the Maximum Entries and Cache Size values as they may affect your server's performance. Please use in conjunction with the Repository vendor's cache architecture.

Default values:

  • Maximum Entries: 10

  • Time To Live(seconds): 6000

  • Cache Size/Item(bytes): 1024

  • Is Enabled: True


Cache

nodePathCache.<Repository Name>

Use

Caches Nodes for a Repository based on path.

Key

The Node path as a String.

Value

The actual Node instance (com.bea.content.Node).

Notes

This cache can be configured using the Portal Administration Tool or programmatically through the P13N CacheManager. Each Repository has its own separate Node Path cache. This cache is used by NodeOps when retrieving and updating Nodes based on path. Please use in conjunction with the Repository vendor's cache architecture.

  • Default values-

  • Maximum Entries: 50

  • Time To Live(seconds): 6000

  • Is Enabled: True


Cache

searchCache

Use

Caches the results of content searches for the Virtual Content

Repository.

Key

The Search object containing the parameters for a query (com.bea.content.expression.Search).

Value

An ID array reflecting the Nodes that satisfy the query.

Notes

This cache can be configured using the Portal Administration Tool under Service Administration or programmatically through the P13N CacheManager. There is only one search cache for all Repositories. This cache is used by SearchOps when handling Search queries and results. Flush, enable, or disable this cache based on your needs for real-time data and other system requirements.

Default values:

  • Maximum Entries: 20

  • Time To Live(seconds): 6000

  • Is Enabled: True

Table 0-2 Portal Compatibility Domain Caches


Cache

actionNameCache

Use

Used to store the action classes for campaigns

Key

The class name (java.lang.String)

Value

The actual Class for the action (java.lang.Class)

Notes

Not configured in application-config.xml but rather in cache-actionNameCache.properties.

Default values should be okay.


Cache

https_cache

Use

This cache is implimented as part of WebFlow, is not used in WebLogic Portal 8.1 except in support of applications developed in WebLogic Portal 7.0 SP2 re-hosted to run in a Portal Compatibility Domain.

Key

java.lang.String composed of the application name, namespace name, origin name and event name

Value

Java.lang.Boolean indicating if HTTPS is required.

Notes

Caches a Boolean indicating if https should be used for a particular webflow request. A value for each application, namespace, origin and event combination may be cached.

This check occurs only if SSL is enabled in config.xml and the HTTPSIND_DEFAULT_VALUE in web.xml is set to CALCULATE, or the "httpsInd" attribute in a calculate weblflow URL tag is set to "CALCULATE."

Because a Boolean is a small and the HTTPS calculation can be expensive, it is important to set this cache's size large enough to avoid excess calculation.

Provided that you are not modifying the context param HTTPS_URL_PATTERNS in web.xml and redeploying or you are not modifying the webflows in a running server and re-synching then the TTL for this cache could be set to never expire.

Only available in Portal Compatibility Domain.


Cache

interface-cache

Use

Used by the PipelineExecutorImpl to improve performance when executing a pipeline.

Key

The pipeline component class name (java.lang.String)

Value

An instance of the pipeline component

Notes

Consider the total number of pipeline components in your application when setting the maximum cache size.

If you do not plan on modifying pipeline components to a running server consider setting a higher TTL or one that never expires.

Only available in Portal Compatibility Domain.


Cache

MainPersistenceManager.GroupPortalP13nCache

Use

Stores a java.util.List of group PortalPersonalizations for each portal

Key

com.bea.portal.model.PortalIdentifier

Value

java.util.List with each list entry containing personalizations for a particular group portal.

Notes

Consider the number of portals when setting the maximum cache size. Generally, this can be set to a low number(e.g. If there is only one portal, this size can be set to one).

Only available in Portal Compatibility Domain.


Cache

MainPersistenceManager.PortalP13nCache

Use

Stores the PortalPersonalization objects for groups and users

Key

com.bea.portal.model.PortalPersonalizationIdentifier

Value

com.bea.portal.model.PortalPersonalization

Notes

Consider average number of concurrent users as well as the total number of groups when setting the maximum cache size.

Only available in Portal Compatibility Domain.

Notes on Threads

This section discusses portlet threading issues such as what happens when a portlet is spawned in its own thread and then the calling system fails during execution.

About the 8.1 Forkable Portlet Feature

If the system calling a threaded portlet fails:

Although all of the forkable portlets for a page are processed in parallel, it is in the end still a blocking operation. If one of the portlets gets hung up in its processing, it will block the entire page render. Forked threads do not have a timeout setting, meaning that the effect of a failed thread would depend on what the portlet is doing. If it fails gracefully (and quickly), there shouldn't be a problem.

If the user leaves the site, or moves to another page:

In this case, processing will not stop by itself. The portal framework will continue to build that response, even if the client has issued another request.

 

Back to Top Previous Next