Configuring an Application Server Domain to Preload Cache

This section provides an overview and discusses how to:

  • Create cache projects.

  • Delete cache projects.

  • Preloading File Cache.

See ServerCacheMode.

See Load Application Server Cache.

Understanding Preload Cache Projects

To improve performance, the application server uses a caching mechanism that keeps commonly used objects in memory, or in file form on the application server or in a database cache. Caching reduces the need for a complete database query each time a definition is accessed. As more definitions are accessed, more data becomes stored in the cache. However, if a page, for example, has not already been accessed, it does not exist in the current cache, and the user may experience a slower response time as the system requests the page from the database for the first time. To prevent this initial performance degradation, you can preload file, database, and memory cache with commonly used definitions inserted into a cache project.

Preloading cache involves creating a project containing commonly used definitions and then referring to these projects in the PSADMIN settings PreloadMemoryCache and PreloadCache. By default, PreloadMemoryCache and PreloadCache are commented out because the two parameters need to be set to a specific name of a project that you create. You can set the parameters to reference separate projects. You use the Select Preload Objects page to select frequently used definitions and build the preload project containing the objects selected.

The cache project is intended to be used for a new domain, where the cache is not yet built. Prior to providing the domain for production use, use the Preload Cache PSADMIN option to build the cache containing the objects specified in the project. The domain starts the PSAPPSRV process, builds the cache, and shuts down.

The memory cache project is intended to be used during a domain boot (serial or parallel) and during a server process recycle.

When you boot a domain in serial mode, a message warns the user of a possible delay in booting the domain and lists the project that is being loaded, but when you boot a domain in parallel mode, the message is not displayed.

When a system starts a new process to replace an old one, the new process loads memory cache based on the project specified by PreloadMemoryCache so that the new process will not have delays when processing the first few service requests. Because it is desirable to have new processes start as quickly as possible, there is a timeout (or limit) of 60 seconds for PreloadMemoryCache. That is, PreloadMemoryCache preloads as many definitions as possible before the timeout of 60 seconds. If a project does not load completely, an administrator can adjust the boot timeout setting.

Logs pertaining to preloading memory cache are logged in the application server log file. In the application server configuration file, the log fence setting must be set to 5 to view the preload memory cache logs.

Note:

In general, it is not recommended to create large projects for the PreloadMemoryCache project. For all cache projects (used for file, database, and memory cache) the optimum selections for the projects will require tuning and testing at your site.

Creating Cache Projects

To create cache projects:

  1. In a browser, select PeopleTools, Utilities, Administration, Preload Cache - App Server, Select Preload Objects.

  2. Select the Add a New Value tab, and in the Project Name edit box, enter the name of the project that will contain the definitions you select, and click Add.

    Note:

    All project names used to contain definitions for preloaded cache must contain the "PLC_" prefix.

  3. On the Select Preload Objects page, enter a Description, and select the Object Type to add.

    Object Type refers to the definitions you create with PeopleTools, such as components, menus, pages, Application Engine programs, and so on.

  4. Use the Key fields, to refine the selection of the definition as needed.

    The keys will differ depending on the Object Type selected.

    Note:

    Project definitions support up to four keys for identification, so you can use up to four keys when selecting objects for the preload cache project.

  5. Click Save.

  6. Click Build Project Definition.

  7. On the Process Scheduler Request page, click OK.

    This invokes an Application Engine program (PTCHPLC_PRJ) that creates the project definition in the database and populates it with the definitions you selected. The PTCHPLC_PRJ also automatically includes all related definitions in the project.

    Note:

    Cache projects can be created manually in Application Designer, without running the PTCHPLC_PRJ program. The project name must include "PLC_".

Deleting Cache Projects

To delete a preload file cache project:

  1. Select PeopleTools, Utilities, Administration, Preload Cache - App Server, Delete Preload Project.

  2. On the Find an Existing Value page, click the appropriate project name.

  3. On the Delete Preload Project page confirm that you have selected the appropriate project and click Delete the preload project.

Preloading Cache Projects

To preload a cache project:

  1. Shut down the application server domain.

  2. Edit the PSAPPSRV.CFG configuration file for the appropriate domain.

    In the [Cache Settings] section, uncomment the PreloadCache= parameter, and enter the name of the pre-load project for this application server domain.

    For example:

    PreloadCache=PLC_PROJECTA
  3. On the PeopleSoft Domain Administration menu in PSADMIN, select 9) Preload Cache.

When preloading cache, keep the following in mind:

  • Preload Cache does not work when shared caching is enabled.

  • If database caching is enabled, Preload Cache loads the cache project into the database cache.

Preloading Memory Cache

To preload the memory cache:

Edit the PSAPPSRV.CFG configuration file for the appropriate domain.

In the [Cache Settings] section, uncomment the PreloadMemoryCache= parameter, and enter the name of the preload project that should be preloaded on this application server for memory cache.

For example:

PreloadMemoryCache=PLC_PROJECTB

Working with the Dynamic Cache Repair Utility

PeopleTools provides a dynamic cache repair utility that enables you to configure the system to monitor and adjust automatically a domain’s cache while it runs, requiring no intervention from system administrators, and without requiring the domain or a server process to be restarted.

For more information on enabling and using the cache repair utility, see EnableCacheRepair.