Skip Headers

Oracle Application Server Forms Services Deployment Guide
10g (9.0.4)

Part Number B10470-01
Go To Documentation Library
Home
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to next page

8
Performance Tuning Considerations

8.1 Introduction

This chapter describes the tuning considerations that arise when you deploy Oracle Forms applications to Oracle Application Server Forms Services. This chapter looks at the network and resources on the application server and includes the following sections:

Tuning the connection between Oracle Application Server Forms Services and the Oracle9i Database Server is beyond the scope of this chapter.

8.2 Built-in Optimization Features of Forms Services

The Oracle Application Server Forms Services and Java client include several optimizations that fit broadly into the following categories:

8.2.1 Monitoring Forms Services

Use Oracle Enterprise Manager Application Server Control to monitor Oracle Application Server Forms Services and review metrics information, including:

8.2.1.1 Monitoring Forms Services Instances

Use the Overview page to monitor metrics for a Forms Services instance.

  1. Start Enterprise Manager Application Server Control.

  2. From the Enterprise Manager Application Server Control main page, select the link to the Forms Services instance that you want to monitor.

    The Overview page for the Forms Services instance displays the following: Current Forms Services instance status (up, down)

    • URL of the Forms Services instance being monitored

    • Oracle Home of the Forms Services instance being monitored

    • Percent CPU usage for all forms runtime processes for this instance of Forms Services

    • Percent memory usage for all forms runtime processes for this instance of Forms Services

    • Number of users logged in

    • Response time of the Forms Services instance in milliseconds to connect to the Forms Listener Servlet.

    Additionally, you can jump to the following detail pages:

    • Session Details

    • Forms Services Configuration

    • Environment

    • Forms Trace Configuration

    • Forms Utility

8.2.1.2 Monitoring Forms Events

Use the Enterprise Manager Application Server Control to enable tracing for all events or specific ones.

8.2.1.3 Monitoring Metrics for User Sessions

  1. Start the Enterprise Manager Application Server Control.

  2. From the Enterprise Manager Application Server Control main page, select the link to the Forms Services instance that you want to monitor.

  3. From the Overview page for the Forms Services instance, select the User Sessions link.

    This page shows the following information about each user session for the Forms Services instance: PID: The process ID of the the Forms runtime process for the user session.

    • CPU usage: The percent CPU used by the runtime process.

    • Memory usage: The percent memory used by the runtime process.

    • Client IP Address: The IP address of the client machine used to connect to Forms Services.

    • Database User Name: The database UserName used by the Forms application for the user session.

    • Time of connection: The time when the user connected to Forms Services.

    • Trace Status: Indicates if tracing is ON or OFF.

    • View Trace Log: Allows a user to view the trace log.

    • Configuration Section: Opens the Configuration Section Parameters page for the configuration section used by particular forms session .

8.2.1.4 Sorting Metric Information

You can sort (in ascending order) on Process ID, CPU, Memory Usage, IP, User Name and Connect Time by clicking the link in the column header.

8.2.1.5 Searching

Use Search to locate specific metric information.

To search for session details:

To view the complete list of sessions again after a search:

8.2.2 Forms Services Web Runtime Pooling

Forms Runtime Pooling enables the startup of a configurable number of application runtime engines prior to their usage. Runtime Pooling provides quick connections at server peak times, which shortens the server-side application startup time. Runtime pooling is useful for situataions where server configurations have a small window in which many users connect to a Forms application. All prestarted runtime engines run in the same environment serving the same application.

8.2.2.1 Configuring Prestart Parameters

Use Enterprise Manager Application Server Control to configure runtime pooling for Forms Services with the following parameters:

Table 8-1 Forms Runtime Pooling Parameters
Parameter Name Data type Description Default Value

prestartRuntimes

boolean

Runtime pre starting or pooling is enabled only if true

false

initialRuntimes

integer

Number of the runtime executables that should be spawned initially

1

timeOut

integer

Time in minutes for which the pre started executables to exist

0 (When set to zero the timer never starts)

minRuntimes

integer

Minimum number of runtime executables to exist in the pool.

0

incrementalRuntimes

integer

The number of runtime executables to be created when below the minRuntimes.

0

Each configuration section can specify values for these parameters. If the prestartRuntimes = true entry is found, but there is no associating prestart parameter, then default values are used.

In a load balanced system that has multiple instances of OC4J, the various values provided for the above parameters are on a per JVM basis, and not the total for the application.

8.2.2.2 Starting Runtime Pooling

An administrator has the capability to pre-start the specified number of executables for a particular application from the Enterprise Manager Application Server Control. The administrator selects the required application, which alerts Forms Services. The Forms Servlet will be loaded on the start of the Web server (OC4J).

During initialization of the Forms Servlet, the formsweb.cfg file is read and the server prestarts the applications which has the prestartRuntimes parameter enabled.

8.2.3 Forms Services Utilities

The Forms Utility page provides a simple user interface to call a set of operations on the middle tier. These features will be enhanced in future releases.

Presently, only ps (to obtain process information) and a number of arguments are available.

8.2.3.0.1 To use the Forms Services Utility:

8.2.4 Minimizing Client Resource Requirements

The Java client is primarily responsible for rendering the application display. It has no embedded application logic. Once loaded, a Java client can display multiple forms simultaneously. Using a generic Java client for all Oracle Forms applications requires fewer resources on the client when compared to having a customized Java client for each application.

The Java client is structured around many Java classes. These classes are grouped into functional subcomponents, such as displaying the splash screen, communicating with the network, and changing the look-and-feel. Functional subcomponents allow the Forms Developer and the Java Virtual Machine (JVM) to load functionality as it is needed, rather than downloading all of the functionality classes at once.

8.2.5 Minimizing Forms Services Resource Requirements

When a form definition is loaded from an FMX file, the profile of the executing process can be summarized as:

Of these, only the Data Segments section is unique to a given instance of an application. The Encoded Program Units and Boilerplate Objects/Images are common to all application users. Forms Services maps the shared components into physical memory, and then shares them between all processes accessing the same FMX file.

The first user to load a given FMX file will use the full memory requirement for that form. However, subsequent users will have a greatly reduced memory requirement, which is dependent only on the extent of local data. This method of mapping shared components reduces the average memory required per user for a given application.

8.2.6 Minimizing Network Usage

Bandwidth is a valuable resource, and the general growth of Internet computing puts an ever increasing strain on the infrastructure. Therefore, it is critical that applications use the network's capacity sparingly.

Oracle Application Server Forms Services communicates with the Java client using meta data messages. Meta data messages are a collection of name-value pairs that tell the client which object to act upon and how. By sending only parameters to generic objects on the Java client, there is approximately 90-percent less traffic (when compared to sending new code to achieve the same effect).

Oracle Application Server Forms Services intelligently condenses the data stream in three ways:

8.2.7 Maximizing the Efficiency of Packets Sent Over the Network

Latency can be the most significant factor that influences the responsiveness of an application. One of the best ways to reduce the effects of latency is to minimize the number of network packets sent during a conversation between the Java client and the Forms Server.

The extensive use of triggers within the Forms Developer model is a strength, but they can increase the effect of latency by requiring a network round trip for each trigger. One way to avoid the latency concerns adhering to triggers is by grouping them together through Event Bundling. For example, when a user navigates from item A to item B (such as when tabbing from one entry field to another), a range of pre- and post-triggers may fire, each of which requires processing on the Forms Server.

Event Bundling gathers all of the events triggered while navigating between the two objects, and delivers them as a single packet to Oracle Application Server Forms Services for processing. When navigation involves traversing many objects (such as when a mouse click is on a distant object), Event Bundling gathers all events from all of the objects that were traversed, and delivers the group to Oracle Application Server Forms Services as a single network message.

8.2.8 Rendering Application Displays Efficiently on the Client

All boilerplate objects in a given form are part of a Virtual Graphics System (VGS) tree. VGS is the graphical subcomponent that is common to all Forms Developer products. VGS tree objects are described using attributes such as coordinates, colors, line width, and font. When sending a VGS tree for an object to the Java client, the only attributes that are sent are those that differ from the defaults for the given object type.

Images are transmitted and stored as compressed JPEG images. This reduces both network overhead and client memory requirements.

Minimizing resources includes minimizing the memory overhead of the client and server processes. Optimal use of the network requires that bandwidth be kept to a minimum and that the number of packets used to communicate between the client and Oracle Application Server Forms Services be minimized in order to contain the latency effects of the network.

8.3 Tuning OracleAS Forms Services Applications

An application developer can take steps to ensure that maximum benefits are gained from Forms Server's built-in architectural optimizations. The remainder of this chapter discusses key performance issues that affect many applications and how developers can improve performance by tuning applications to exploit Forms Server features.

Issues discussed are:

8.3.1 Location of the Oracle Application Server Forms Services with Respect to the Data Server

The Forms Java client is only responsible to display the GUI objects. All of the Oracle Forms logic runs in Oracle Application Server Forms Services, on the middle tier. This includes inserting or updating the data to the database, querying data from the database, executing stored procedures on the database, and so on. Therefore, it is important to have a high-speed connection between the application server and the database server.

All of this interaction takes place without any communication to the Forms Java client. Only when there is a change on the screen is there any traffic between the client and Oracle Application Server Forms Services. This allows Oracle Forms applications to run across slower networks, such as with modems or satellites.

The configuration in Figure 8-1, displays how Oracle Application Server Forms Services and the database server are co-located in a data center.

Figure 8-1 Co-Locating the OracleAS Forms Services and Database Server

Text description of datactr-.gif follows

Text description of the illustration datactr-.gif

8.3.2 Minimizing the Application Startup Time

First impressions are important, and a key criterion for any user is the time it takes to load an application. Startup time is regarded as overhead. It also sets an expectation of future performance. When a business uses thin-client technologies, the required additional overhead of loading client code may have a negative impact on users. Therefore, it is important to minimize load time wherever possible.

After requesting an Oracle Forms application, several steps must be completed before the application is ready for use:

  1. Invoke Java Virtual Machine (JVM).

  2. Load all initial Java client classes, and authenticate security of classes.

  3. Display splash screen.

  4. Initialize form:

    1. Load additional Java classes, as required.

    2. Authenticate security of classes.

    3. Render boilerplate objects and images.

    4. Render all elements on the initial screen.

  5. Remove splash screen.

  6. Form is ready for use.

An application developer has little influence on the time it takes to launch the JVM. However, the Java deployment model and the structure of the Oracle Forms Developer Java client allow the developer to decide which Java classes to load and how. This, in turn, minimizes the load time required for Java classes.

The Java client requires a core set of classes for basic functionality (such as opening a window) and additional classes for specific display objects (such as LOV items). These classes must initially reside on the server, but the following techniques can be used to improve the time it takes to load these classes into the client's JVM:

8.3.2.1 Using Java Files

Java provides the Java Archive (Jar) mechanism to create files that allow classes to be grouped together and then compressed (zipped) for efficient delivery across the network to the client. Once used on the client, the files are cached for future use.

Oracle Application Server Forms Services provides the following pre-configured Jar files to support typical deployment scenarios.

8.3.2.1.1 Oracle JInitiator

The following are the Jar files provided for use with Oracle JInitiator:

To specify one or more Jar files, use the archive_jini setting in the named configuration section of the Forms Configuration file (formsweb.cfg). For example,

[MyApp]
archive_jini=f90all_jinit.jar, icons.jar

Your archive_jini setting must use only one of the three Jar files listed, above. It may also contain any additional custom Jar files that your application uses (for example, icons.jar, as shown in the previous example). Each application can use its own archive_jini setting.

The following Jar files contain the deferred classes that are missing from f90main.jar. They will be downloaded automatically as they are needed, so there is no need to reference them in the archive_jini setting. They are already present in f90all.jar and f90all_jinit.jar, so they are only used if you use f90main.jar.

For more information about Oracle JInitiator, see Appendix A, "JInitiator".

8.3.2.1.2 IE Native JVM

Since IE does not support Jar signing, you will need to use a CAB file. The following CAB file is provided for use with IE:

While f90all.cab is the only file provided for use with IE, it is significantly smaller than f90all.jar.

To specify one or more Jar files, use the archive_ie setting in the named configuration section of the Forms Configuration file (formsweb.cfg). For example,

[MyApp]
archive_ie=f90all.cab
8.3.2.1.3 All other cases (for example, Sun's Java Plug-in)

The following Jar file is provided for Java Virtual Machines (JVMs) other than Jinitiator or the IE native JVM:

To specify one or more Jar files, use the archive setting in the named configuration section of the Forms Configuration file (formsweb.cfg). For example,

[MyApp]
archive=f90all.jar

8.3.2.2 Using Caching

Both of the supported JVMs for Oracle Application Server Forms Services (Oracle JInitiator and Oracle JDK) support the caching of Jar files. When the JVM references a class, it first checks the local client cache to see if the class exists in a pre-cached Jar file. If the class exists in cache, JVM checks the server to see if there is a more current version of the Jar file. If there isn't, the class is loaded from the local cache rather than from across the network.

Be sure that the cache is of proper size to maximize its effectiveness. Too small a cache size may cause valid Jar files to be overwritten, thereby requiring that another Jar file be downloaded when the application is run again. The default cache size is 20MB. This size should be compared with the size of the cache contents after successfully running the application.

Jar files are cached relative to the host from which they were loaded. This has implications in a load-balancing architecture where identical Jar files from different servers can fill the cache. By having Jar files in a central location and by having them referenced for each server in the load-balancing configuration, the developer can ensure that only one copy of each Jar file is maintained in the client's cache. A consequence of this technique is that certain classes within the Jar file must be signed to enable connections back to servers other than the one from which they were loaded. The Oracle-supplied Jar files already pre-sign the classes.

8.3.3 Reducing the Required Network Bandwidth

The developer can design the application to maximize data stream compression by using message diff-ing, which sends along only the information that differs from one message to another. The following steps can be taken to reduce the differences between messages:

Menu buffering applies only to the menu properties of LABEL, ICON, VISIBLE, and CHECKED. An ENABLE/DISABLE event is always sent and does not entail the retransmission of an entire menu.

8.3.4 Other Techniques to Improve Performance

The following techniques may further reduce the resources required to execute an application:

8.4 Web Cache and Forms Integration

Oracle Web Cache can be used as a load balancer with Oracle Forms applications. The following setup instructions assume the following:

  1. Oracle Application Server Web Cache instance running on Host A

  2. Oracle HTTP Server (OHS) instance and OC4J instance on Host B running Forms9i application D

  3. OHS instance and OC4J instance on Host C running Oracle Forms application D

Note that there could be more OHS/OC4J instances, but only two instance pairs will be described here for purposes of simplification. The OHS/OC4J instances are not clustered because Oracle Forms applications cannot take advantage of iAS clustering.

Also note that a Web Cache 9.0.2.x cluster cannot be used. An Oracle Application Server Web Cache cluster can be used to load balance Oracle Forms starting with Oracle Application Server.

Since Forms applications are stateful, Web Cache must be configured for stateful load balancing using its session binding feature.

Configure Web Cache on Host A with the appropriate Site information for the Forms application, as well as Origin Server and Site-to-Server Mapping information for the OHS instances running on Hosts B and C. When configuring Origin Server info for Hosts B and C, be sure to configure a ping URL that will detect whether Forms application D is running, for example, /forms90/f90servlet?ifcmd=status.

To Configure Session Binding in Web Cache:

  1. Log on to the Web Cache Manager.

  2. In the navigator pane, select General Configuration | Session Management | Session Binding.

  3. In the Session Binding Configuration screen, select Default Session Binding and then select Edit.

  4. The Change/Add Session Binding dialog box appears.

  5. From the Please select a session: pull-down list, select JSESSIONID.

  6. Configure an Inactivity Timeout that is appropriate for Oracle Forms application D.

  7. Click Submit.

  8. Apply changes and restart Oracle Application Server Web Cache.

To test the setup:

  1. Using a browser, point it to the Web Cache host and access Oracle Forms application D. Ensure that the application works as expected. Keep the browser window open.

  2. Identify the OHS/OC4J that handled the requests. For example, assume this is Host B and shut down the OHS/OC4J on that host. Now only the OHS/OC4J running on Host C will be accessible.

  3. Using the same browser that is running the Oracle Forms client, access Oracle Forms application D again. The request will fail, and the Forms client will lose its session. Remember that Oracle Forms session state is not replicated among OC4J instances.

  4. Next, use the browser to start a new Forms session. Web Cache will direct the requests to the remaining OHS/OC4J running on Host C. Ensure that the application works as expected.

  5. Restart the OHS/OC4J on Host B. Using a browser, log on to the Web Cache Manager. In the navigator pane, select Administration | Monitoring | Health Monitor.

  6. On the Health Monitor screen, make sure that Host B is marked UP.

For additional information about Web Cache, see OracleAS Web Cache Administration and Deployment Guide.


Go to previous page Go to next page
Oracle
Copyright © 2003 Oracle Corporation.

All Rights Reserved.
Go To Table Of Contents
Contents
Go To Index
Index