Skip Headers
Oracle® Application Server Portal User's Guide
10g Release 2 (10.1.4)
B13809-04
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

22 Improving Page Performance

As with any modern Web-based application, the browser response time for OracleAS Portal pages largely depends on the number of user requests and the hardware employed to service them. Displaying a single page to a user may require many separate transactions, from verifying whether the user has permission to view the page, to loading the images that appear on the page, to calling a style sheet that contains formatting information for the page, and so on.

Changing the hardware deployed for a production portal is usually a difficult task, so administrators must rely on performance tuning the portal to maximize the performance from the available hardware. Performance tuning can take on many facets especially in OracleAS Portal's multi-tier architecture. Each tier provides tuning options that can degrade performance if not configured correctly.

OracleAS Portal provides several caching options so that page designers and administrators can optimize the performance of the pages they design. It is important that these caching options are analyzed, for pages, portlets, and templates, before you deploy your portal. This step will ensure that the optimum caching policy is employed on a page by page and portlet by portlet basis, and make sure that your portal is as performant as possible when it is finally deployed in production.

This chapter provides a short overview of the caching options available to page designers and administrators. It includes the following subsections:

The holistic processes involved for performance tuning are not discussed in this chapter. In-depth performance advice and analysis for OracleAS Portal is available from the Performance page on the OracleAS Portal section of the Oracle Technology Network, http://www.oracle.com/technology/products/ias/portal/performance_10g1014.html

Intended Audience

The content of this chapter is intended for users with at least the Manage privilege on the pages you will work with. If a particular task requires, or can be performed under, different privileges, those privileges will be listed before the steps of that task. For more information on page privileges, see Section B.3, "Page and Tab Privileges".

22.1 Page Caching

Page caching options are useful for speeding up page response times. This section describes portlet caching options and how to apply them. It includes the following sub-sections:

22.1.1 Changing How a Page Is Cached

To change how a page is cached:

  1. Go to the page where you will change caching options.

    For information on locating a page, see Section 9.1, "Locating Pages in OracleAS Portal".

  2. Switch to Edit mode.

  3. Click the Properties link next to Page in the page toolbar.

    Be sure to click the link for the page rather than the page group.

  4. Go to the Page Caching section of the Main tab, and select a page caching option.

    See Section 22.1.2, "Page Caching Options" for a description of each caching option.

  5. Click OK to save your changes.

22.1.2 Page Caching Options

Table 22-1 lists and describes the page caching options (Edit Page: Main tab):

  • Cache Page Definition Only at User Level

  • Cache Page Definition And Content at User Level For [ ] Minutes

  • Cache Page Definition Only at System Level

  • Cache Page Definition And Content at System Level For [ ] Minutes

  • Don't Cache

Table 22-1 Page caching options

Option Description

Cache Page Definition Only at User Level

Caches the page definition for each user, in both OracleAS Web Cache and the Portal Cache. The page definition includes:

  • Metadata describing the page structure

  • Identification of any portlets on the page

  • Items that exist on the page

  • Identification of styles used on the page

Choose this option for pages with dynamic portlet content and where the page definition is user specific. For example, user specific page definitions might contain:

  • Page personalizations

  • Items with item level security

  • Navigation items: Page Link, Page Path, Login/Logout Link

  • Portal Smart Link items: Edit, Personalize, Personal Page

  • Portal Smart Text: Current User

Note that:

  • Storing data for each user can impact storage and performance.

  • This option eliminates page regeneration on every request by a user. The page definition is generated the first time a user accesses a page. The portlet content is retrieved and the page is assembled on each request. This allows the page to display dynamic portlet content.

  • It is not necessary to choose this option when your page contains portlet content that is user specific. You can specify the caching level of portlets separately, at the portlet instance level. See Section 22.2, "Portlet Caching".

  • Even if the page content is user specific because it contains secure tabs and secure sub-page links, the page definition is not user specific because these are cached at the user level, separately from the page definition.

  • This option is available for Standard, Mobile, and JSP pages only.

Cache Page Definition And Content at User Level For [ ] Minutes

Caches the page definition (as described in the previous option), and the assembled page's content, including all portlet content, for a specified period of time, for each user. This is called user-level expiry-based caching.

Choose this option for pages with portlets that do not change within the specified time period and where the page content (either the page definition or portlet content) is user specific.

Note that:

  • This option reduces load on the Parallel Page Engine and OracleAS Portal middle-tier servers and improves performance. It eliminates assembly of the page content and regeneration of the page definition and portlet content on every request by a user. However, expiry-based caching caches the portlet content in the assembled page and therefore some portlet content may be stale when the page is retrieved from the cache.

  • Fully-assembled pages are cached in OracleAS Web Cache and the browser, but not in the Portal Cache.

  • When the page definition changes, the cached, fully-assembled page in OracleAS Web Cache is invalidated.

  • If the page includes a Refresh Smart Link (either directly in the page or within a navigation page portlet in the page), the link will be displayed to logged-in users. When you click this link, the page is regenerated from the database.

  • This option is available for Standard and Mobile pages only.

Cache Page Definition Only at System Level

Caches the page definition once for all users. The page definition is the same for all users and includes:

  • Metadata describing the page structure

  • Identification of any portlets on the page

  • Items that exist on the page

  • Identification of styles used on the page

Choose this option for pages with dynamic portlet content, where the page definition is the same for all users.

This option greatly reduces storage requirements and improves performance. It eliminates regeneration of the page definition on every request, by any user. The page definition is generated the first time any user accesses the page. The portlet content is retrieved and the page is assembled on each request and this allows the page to display dynamic portlet content.

This option can be used when:

  • Portlet content is user specific - The cache level of portlets on the page can be specified separately at the portlet instance level. See Section 22.2, "Portlet Caching".

  • Page contains secure tabs and secure sub-page links - These are cached at the user level, separately from the page definition.

Do not choose this option when:

  • Pages are personalizable - Page personalizations are not possible given that the page is the same for all users. With this option, the Personalize link and all other personalization controls are disabled.

  • Items must display differently based on the user - Items display the same for all users.

  • Approvals and notifications are enabled - System level caching is not appropriate for approval-enabled pages, as these pages are not expected to display the same content to all users. See also Section 6.4.1, "Enabling Approvals and Notifications for a Page Group".

If page performance is critical, you might use this option if the page definition contains certain user specific items:

- Items with item level security,

- Navigation items (Page Link, Page Path, Login/Logout),

- Portal Smart Link items (Edit),

- Portal Smart Text (Current User).

If you do this, these items are displayed the same to all users, regardless of their access privileges. Whilst this is not ideal visually, users can still perform only the actions for which they have the appropriate access privileges. For example, if your page contains an Edit link, every user viewing the page sees the Edit link even if they do not have Edit privileges. All security checks are deferred until a user clicks on the link.

Note: This option is available for Standard, Mobile, and JSP pages only.

Cache Page Definition and Content at System Level for [ ] Minutes

Caches the page definition (as described in the previous option), and the assembled page's content, including all portlet content, for a specified period of time, for all users. This is called system-level expiry-based caching.

Choose this option for pages with portlets that do not change within the specified time period and where the page content (both the page definition and portlet content) is the same for all users.

Note that:

  • The page is not dynamically assembled when any user requests the page, so this is the best choice for minimizing the load on the Parallel Page Engine and OracleAS Portal middle-tier servers. However, expiry-based caching caches the portlet content in the assembled page, so some content may be stale when the page is retrieved from the cache.

  • Fully-assembled pages are cached in OracleAS Web Cache and the browser, but not in the Portal Cache.

  • When the page definition changes, the cached, fully-assembled page in OracleAS Web Cache is invalidated.

  • If the page includes a Refresh Smart Link (either directly in the page or within a navigation page portlet in the page), the link will be displayed to logged-in users. When you click this link, the page is regenerated from the database.

  • This option is available for Standard and Mobile pages only.

Do not choose this option when:

  • Pages are personalizable - Page personalizations are not possible given that the page is the same for all users. With this option, the Personalize link and all other personalization controls are disabled.

  • Content must display differently based on the user - A single copy of the page is displayed to all users. Portlets display only public content. All of the page's tabs, sub-page links, and items are displayed to all users. Users can still perform only the actions for which they have the appropriate access privileges.

  • Approvals and notifications are enabled - System level caching is not appropriate for approval-enabled pages, as these pages are not expected to display the same content to all users. See also Section 6.4.1, "Enabling Approvals and Notifications for a Page Group".

Don't Cache

Disables page caching.

Note that the use of this option will adversely impact portal performance. Do not use this option except where absolutely necessary. Do not use this option on frequently accessed pages. Keep the number of pages that require this option to a minimum.

You may want to disable page caching in the following circumstances:

  • Your page contains PL/SQL items or URL items that are displayed in place (that is, they are displayed directly on the page) and that produce dynamic content that must always be up-to-date (a portlet that is not cached or that uses a short expiry would be a better choice for this kind of content).

  • You are concerned that a soft-invalidation event, such as a change to user group membership, may result in a cached version of a page being viewed by an active user who has recently lost privileges on the page.


22.1.3 Clearing the Cache for a Page

You can manually clear the cache entries associated with a page. For example, this might be useful if you revoke a user's privileges on a page and you want to make sure that your privilege level changes are applied immediately. If you do not clear the cache, the user will still be able to access the page if it is in the cache.

To clear the cache for a page:

  1. Go to the page whose cache must be cleared.

  2. Switch to Edit mode.

  3. Click the Properties link next to Page in the page toolbar.

    Be sure to click the link for the page rather than the page group.

  4. Go to the Page Caching section of the Main tab, and select Clear Cache.

  5. Click OK to return to the page.

22.2 Portlet Caching

Portlet caching options are useful for speeding up page response times. This section describes portlet caching options and how to apply them. It includes the following sub-sections:

22.2.1 Changing How a Portlet Is Cached

To change how a portlet is cached:

  1. Go to the page where the portlet instance is located.

    For information on locating a page, see Section 9.1, "Locating Pages in OracleAS Portal".

  2. Switch to Edit mode.

  3. Click the Actions icon (Figure 22-1) next to the portlet instance.

    Figure 22-1 The Actions Icon

    Actions icon
  4. On Actions page, click the Edit Portlet Instance link.

  5. In the Portlet Caching section, specify how this portlet instance is cached.

    For more detail, see Section 22.2.2, "Portlet Caching Options".

  6. In the Portlet Caching Level section, specify a caching level for this portlet instance.

    For more detail and a description of each caching level, see Section 22.2.3, "Portlet Caching Level Options".

  7. Click OK to save your changes and return to the page.

22.2.2 Portlet Caching Options

Table 22-2 lists and describes Portlet Caching options on the Edit Portlet Instance page:

  • Rely on Portlet to Implement Caching

  • Force Portlet to be Cached for [ ] Minutes

Table 22-2 Portlet Caching Options

Option Description

Rely on Portlet to Implement Caching

By default, a portlet instance is only cached if the portlet author implemented caching for the portlet. The portlet's caching implementation is suitable for most portlet instances. If you find that the portlet performance on your page is not acceptable, you can change how the portlet is cached by selecting the option described next, Force Portlet to be Cached for [ ] Minutes.

Force Portlet to be Cached for [ ] Minutes

Enter the duration (in minutes) for which content from this portlet instance is cached in the OracleAS Portal file system cache.

After the portlet content is generated, it is stored in the Portal Cache for the specified duration. This is called expiry-based caching. If the portlet content is requested while assembling page content during this period, there is a cache hit and the portlet does not need to be contacted. This caching is in addition to any caching that is implemented by the portlet.

Select this option to improve page performance in cases where a portlet does not implement caching, or the caching implementation does not provide enough performance benefit. For example, the portlet may use validation-based caching but the validation check is too expensive, or the portlet uses expiry-based caching but the expiry period is too short.

Setting this option can improve page performance because the portlet is not contacted on each request. However, if the portlet's content changes within the specified time, the portlet may display stale content. This may be acceptable in some portlet applications, where a fast(er) page response is deemed more important than frequently refreshed content.

When setting this option, note that:

  • If the portlet also specifies an expiry period for its content, the longer expiry period is used.

  • For the period specified, setting this option overrides any validation-based caching that the portlet may specify.

  • For a Page portlet, the assembled Page portlet content is stored in the Portal Cache in addition to any page caching specified on the Page portlet.


22.2.3 Portlet Caching Level Options

Table 22-3 lists and describes Portlet Caching Level options on the Edit Portlet Instance page:

  • Page's Caching Level

  • User Level Caching

  • System Level Caching

The Portlet Caching Level option enables you to modify the caching level in either the caching policy defined by the portlet author, or the forced caching policy (see Force Portlet to be Cached for [ ] Minutes in Table 22-2, "Portlet Caching Options").

This option does not force the portlet to be cached. This option controls whether user or system level information is sent in the portlet request.

The Portlet Caching Level option is not available when:

  • The portlet itself specifies system-level caching. If this is the case, the portlet is always cached at the system-level.

  • The page is cached with the option Cache Page Definition and Content at System Level for [ ] Minutes. When the page is cached at this level, portlet instances on the page can display only public data.


Note:

To ensure that WSRP portlets operate correctly, we recommend that you place WSRP portlets that are cached at the user-level, on user-level cached pages, and place WSRP portlets that are cached at the system-level, on system-level cached pages.

Table 22-3 Portlet Caching Level Options

Option Description

Page's Caching Level

If the portlet is cached, it is cached at the page's caching level—either user level or system level.

User Level Caching

If the portlet is cached, it is cached at the user level. The portlet content is cached for each user. When a portlet is cached at the user level, users may personalize the portlet (if portlet personalizations are allowed).

If the portlet's caching policy specifies that the portlet is not cached and the portlet is not forced to be cached using the setting Force Portlet to be Cached for [ ] Minutes, the portlet will not be cached. However, user level information will be sent with the portlet request.

For Page portlets, this option does not affect the page caching specified in the page definition of the source page. However, it does affect the caching of the assembled Page portlet content when using the option Force Portlet to be Cached for [ ] Minutes.

System Level Caching

If the portlet is cached, it is cached at the system level. The portlet content is cached once for all users.

When a portlet is cached at the system level the portlet content is the same for all users. The portlet runs as the public user, and only public data is shown. Portlets that do not contain public data, for example, the Recent Objects portlet or the External Applications portlet, are not displayed.

Select this option to improve page performance in cases where a portlet does not need to display user-specific data, the portlet's caching policy is not already set at the system level, and the portlet is cached either by the portlet's own caching policy or by using the option Force Portlet to be Cached for [ ] Minutes.

For Page portlets, this option in combination with the Portlet Caching option affect how the Page portlet is displayed:

  • If System Level Caching and Rely on Portlet to Implement Caching are selected, the Page portlet displays the same as for the page caching option Cache Page Definition at System Level.

  • If System Level Caching and Force Portlet to be Cached for [ ] Minutes are selected, the Page portlet displays the same as for the page caching option Cache Page Definition and Content at System Level for [ ] Minutes (system level expiry-based caching).

    With this combination, the assembled Page portlet content is stored in the Portal Cache at the system level.


22.3 Template Caching

Template caching options are useful for speeding up template response times. Specifically, for Portal Templates for items, caching speeds up the dynamic assembly of the item within the context of its Portal Template.

Template caching options are not available for Portal Templates for pages. Pages based on templates use their own caching option not the template's caching option. See Section 22.1, "Page Caching".

This section describes template caching options and how to apply them. It includes the following sub-sections:

22.3.1 Changing How a Portal Template Is Cached

Portal Template caching options display only for Portal Templates for items. A Portal Template for items is a Portal Template that contains an Item Placeholder item type. For Portal Templates for items, template caching options control the caching level of the template definition and template content.


Note:

If, in a Portal Template for items, the item placeholder is deleted, hidden, or expired, caching options nonetheless continue to display on the Main tab. They display until the item is thoroughly removed through a system purge.

To change how Portal Templates for items are cached:

  1. From the Page Groups portlet Work In drop-down list, select the page group that owns the Portal Template for items.

    By default, the Page Groups portlet is located on the Build tab of the Portal Builder page.

  2. Under Portal Templates in the Layout & Appearances section, click the link to the Portal Template for items.

    This opens the template in Edit mode.

  3. Click the Template: Properties link at the top of the page.

  4. Click the Main tab to bring it forward.

  5. Select a template caching option.

    See Section 22.3.2, "Portal Template Caching Options" for a description of each caching option.

  6. Click OK to save your changes and return to the template.

22.3.2 Portal Template Caching Options

Table 22-4 lists and describes the template caching options (Edit Portal Template: Main tab):

  • Cache Template Definition Only at User Level

  • Cache Template Definition and Content at User Level for [ ] Minutes

  • Cache Template Definition Only at System Level

  • Cache Template Definition and Content at System Level for [ ] Minutes

  • Don't Cache

Table 22-4 Template caching options

Option Description

Cache Template Definition Only at User Level

Caches the template definition for each user, in both OracleAS Web Cache and the Portal Cache. The definition includes:

  • Metadata describing the template structure

  • Identification of any portlets on the template

  • Items that exist on the template

  • Identification of styles used on the template

Choose this option for templates with dynamic portlet content and where the template definition is user specific. For example, user specific template definitions might contain:

  • Items with item level security

  • Navigation items: Page Link, Page Path, Login/Logout Link

  • Portal Smart Link items: Edit, Personal Page

  • Portal Smart Text: Current User

This option eliminates template definition regeneration on every request by a user. The template definition is generated the first time a user accesses the template. However, portlet content is retrieved and the template is assembled on each request. This allows the template to display dynamic portlet content.

Note that:

  • Storing data for each user can impact storage and performance.

  • It is not necessary to choose this option when your template contains portlet content that is user specific. You can specify the caching level of portlets separately, at the portlet instance level. See Section 22.2, "Portlet Caching".

  • Even if the template content is user specific because it contains secure tabs, the template definition is not user specific because these are cached at the user level, separately from the template definition.

Cache Template Definition And Content at User Level For [ ] Minutes

Caches the template definition (as described in the previous option), and the assembled template's content, including all portlet content, for a specified period of time, for each user. This is called user-level expiry-based caching.

Choose this option for template with portlets that do not change within the specified time period and where the template content (either the template definition or portlet content) is user specific.

Note that:

  • This option reduces load on the Parallel Page Engine and OracleAS Portal middle-tier servers and improves performance. It eliminates assembly of the template content and regeneration of the template definition and portlet content on every request by a user. However, expiry-based caching caches the portlet content in the assembled template and therefore some portlet content may be stale when the template is retrieved from the cache.

  • Fully-assembled templates are cached in OracleAS Web Cache and the browser, but not in the Portal Cache.

  • When the template definition changes, the cached, fully-assembled template in OracleAS Web Cache is invalidated.

  • If the template includes a Refresh Smart Link (either directly in the template or within a navigation page portlet in the template), the link will be displayed to logged-in users. When you click this link, the template is regenerated from the database.

Cache Template Definition Only at System Level

Caches the template definition once for all users. The template definition is the same for all users and includes:

  • Metadata describing the template structure

  • Identification of any portlets on the template

  • Items that exist on the template

  • Identification of styles used on the template

Choose this option for template with dynamic portlet content, where the template definition is the same for all users.

This option greatly reduces storage requirements and improves performance. It eliminates regeneration of the template definition on every request, by any user. The template definition is generated the first time any user accesses the template. The portlet content is retrieved and the template is assembled on each request and this allows the template to display dynamic portlet content.

This option can be used when:

  • Portlet content is user specific - The cache level of portlets on the template can be specified separately at the portlet instance level. See Section 22.2, "Portlet Caching".

  • Template contains secure tabs- These are cached at the user level, separately from the template definition.

Do not choose this option when:

If template performance is critical, you might use this option if the template definition contains certain user specific items:

- Items with item level security

- Navigation items: Page Link, Page Path, Login/Logout

- Portal Smart Link items: Edit

- Portal Smart Text: Current User

If you do this, the items are displayed the same to all users, regardless of their access privileges. Whilst this is not ideal visually, users can still perform only the actions for which they have the appropriate access privileges.

Cache Template Definition and Content at System Level for [ ] Minutes

Caches the template definition (as described in the previous option), and the assembled template's content, including all portlet content, for a specified period of time, for all users. This is called system-level expiry-based caching.

Choose this option for templates with portlets that do not change within the specified time period and where the template content (both the template definition and portlet content) is the same for all users.

Note that:

  • The template is not dynamically assembled when any user requests the template, so this is the best choice for minimizing the load on the Parallel Page Engine and OracleAS Portal middle-tier servers. However, expiry-based caching caches the portlet content in the assembled template, so some content may be stale when the template is retrieved from the cache.

  • Fully-assembled templates are cached in OracleAS Web Cache and the browser, but not in the Portal Cache.

  • When the template definition changes, the cached, fully-assembled template in OracleAS Web Cache is invalidated.

  • If the template includes a Refresh Smart Link (either directly in the template or within a navigation page portlet in the template), the link will be displayed to logged-in users. When you click this link, the template is regenerated from the database.

Do not choose this option when:

  • Content must display differently based on the user - A single copy of the template is displayed to all users. Portlets display only public content. All of the template's tabs and items are displayed to all users. Users can still perform only the actions for which they have the appropriate access privileges.

  • Approvals and notifications are enabled - System level caching is not appropriate for approval-enabled templates, as these templates are not expected to display the same content to all users. See also Section 6.4.1, "Enabling Approvals and Notifications for a Page Group".

Don't Cache

Disables template caching. With this option you do not gain any of the performance benefits provided by caching.

The use of this option will adversely impact portal performance. Do not use this option except where absolutely necessary. Do not use this option on frequently accessed templates. Keep the number of templates that require this option to a minimum.

You may want to disable template caching in the following circumstances:

  • Your template contains PL/SQL items or URL items that are displayed in place (that is, they are displayed directly on the template) and that produce dynamic content that must always be up-to-date (a portlet that is not cached or that uses a short expiry would be a better choice for this kind of content).

  • You are concerned that a soft-invalidation event, such as a change to user group membership, may result in a cached version of a template being viewed by an active user who has recently lost his privileges on pages that use the template.


22.3.3 Clearing the Cache for a Portal Template

You can manually clear the cache entries associated with a Portal Template. For example, this might be useful if you revoke a user's privileges on an item associated with a template and you want to make sure that your privilege level changes are applied immediately. If you do not clear the cache, the user will still be able to access the item if the template is in the cache.

To clear the cache for a Portal Template:

  1. From the Page Groups portlet Work In drop-down list, select the page group that owns the Portal Template.

    By default, the Page Groups portlet is located on the Build tab of the Portal Builder page.

  2. Under Portal Templates in the Layout & Appearances section, click the link to the Portal Template.

    This opens the template in Edit mode.

  3. Click the Template: Properties link at the top of the page.

  4. Do one of the following:

    • (Portal Template for items only) Click the Main tab, and select Clear Cache.

    • (Portal Template for pages and items) Click the Access tab, and select Clear Cache.

  5. Click OK to return to the Portal Template.

22.4 Troubleshooting Page Performance

Performance issues are not discussed in this chapter. In-depth performance advice and analysis for OracleAS Portal is available from the Performance page on the OracleAS Portal section of the Oracle Technology Network, http://www.oracle.com/technology/products/ias/portal/index.html