Performance

Performance is a set of tools for viewing and modifying Multi-thread Download, application Server Cache and DataWindow Data Cache.

Figure 136. Performance

Performance

Multi-Thread Download

Note: This option is available for Web applications only.

The Multi-Thread Download setting specifies how many threads a client will take for simultaneously downloading application Web files (such as JavaScript files, image files, and HTML files) from the Web server. This option makes full use of the network bandwidth between clients and Web server, and shortens the time that clients must wait during the Web files download process.

Figure 137. Multi-thread Download

Multi-thread Download

Click the application name in the Multi-thread Download table, and then enter a number in the Maximum Threads text box, and then click Save.

Figure 138. Maximum Threads

Maximum Threads

Before setting the thread number, you should take full consideration of the network condition where the application will be running, and the capability of the Web server that supports the application -- whether the network and the Web server can support a large number of threads at the same time without jeopardizing the overall performance.

It is your choice to set the thread number from 1 to 6 based on the available network condition.

Application Server Cache

Note: This tool is available for Web applications only.

Every time a Web application starts, PowerServer loads the DataWindow syntax and embedded SQLs of the application to its memory. If PowerServer is supporting multiple applications and loads all the syntax and SQLs of the applications into the memory, too much server memory is consumed, which results in a performance reduction of all applications.

AEM provides the Application Server Cache tool for you to leverage PowerServer resources and make sure it has enough resources for supporting important applications.

What is Application Server cache?

An Application Server cache is a portion of PowerServer memory that is allocated for temporarily storing DataWindow syntax and embedded SQLs of an application.

Depending on the cache size specified for an application, PowerServer loads part or all of the application DataWindow syntax and embedded SQLs when the application starts. If PowerServer only loads part of the DataWindow syntax and embedded SQLs of an application to the cache, the application runtime performance is affected because PowerServer needs to read certain DataWindow syntax and embedded SQLs from the database instead of reading from the memory.

Make sure that the cache size is large enough for essential applications and those frequently accessed by users. If the PowerServer memory is tight, you can consider decreasing the cache size for minor applications.

Modifying the Application Server cache settings for an application

In the Application Server Cache table, the Cache column shows the Application Server cache size allocated for the corresponding application, while the Cache Usage column shows how much cache the application currently occupies in the PowerServer memory.

Figure 139. Application Server Cache

Application Server Cache

Take the following steps if you want to change the cache size for an application:

Step 1: Click an application listed in the Application Server Cache table. A new page opens and displays the current cache setting for the application.

Figure 140. Modify Cache Setting

Modify Cache Setting

Step 2: Modify the cache size. You can:

  • Set the size to a figure bigger than "0". By default, the cache size is 3MB. This is suitable for a common application.

    For example, suppose there are two applications, appA (which is less important) and appB (which is important). You can set the memory limit for appA as 3MB, and set the memory limit for appB as 10MB. If the client runs appA, PowerServer loads a maximum of 3MB syntax and SQL into its memory; if the client runs appB, PowerServer loads a maximum of 10MB syntax and SQL into its memory. If the actual size of appA syntax and SQL is very large (more than 10MB), the running of appA will not affect the running of appB.

  • Set the size to "0", which means that no cache is available for loading DataWindow syntax or Embedded SQLs. PowerServer always reads the DataWindow syntax and embedded SQLs from the database.

  • Set the size to less than "0" (-3, for example), which means that the cache has no limit. PowerServer will load all the DataWindow syntax, DataWindow SQLs, and Embedded SQLs of the application into the cache.

    Setting the size to "0" is not recommended because it will result in slow performance. If the server has enough memory and the number of the deployed applications is less than 10, it is recommended that you set the size for all applications to less than "0". If the server does not have enough memory, but it contains many deployed applications, it is recommended that you set all important applications, as well as applications using many DataWindows and Embedded SQL, to less than "0" or much higher than 3M. Keep all other applications at the default setting.

Step 3: Click the Save button to save changes.

DataWindow Data Cache

You can configure the Dynamic-DW SQL Cache settings and the DataWindow Object Cache settings for a particular application under this the DataWindow Data Cache tool.

Figure 141. DataWindow Data Cache

DataWindow Data Cache


Dynamic-DW SQL Cache

Dynamic-DW SQL Cache tool specifies whether to cache the "select *" syntax or and syntax of this type for dynamic DataWindow objects. If the "select *" syntax is cached, it will boost performance, but it will not be refreshed when the table structure changes dynamically.

Step 1: Click on the application you intend to configure on the DataWindow Data Cache page.

Step 2: In the Dynamic-DW SQL Cache table, configure whether to cache the "select*" syntax or syntax of this type or not, as shown in the following figure.

Figure 142. Dynamic-DW SQL Cache

Dynamic-DW SQL Cache

DataWindow Object Cache Settings

You can apply the DataWindow Data Cache tool to cache DataWindow data that are frequently used on the PowerServer and/or the client.

  • DataWindow Data Cache at the PowerServer stores the data in the memory. The cached data will be available unless the server memory is cleared (for example, by restarting the server)

  • DataWindow Data Cache at the client stores and encrypts data in the Temporary Files folder of the Internet Explorer. The cached data will be available unless the Temporary Files folder is emptied.

Therefore, this tool can significantly reduce server load and network traffic, boosting performance and scalability.

Important:

1) DataWindow Data Cache is unsupported for Informix and Oracle 8i (though supported for Oracle 9i, 10g, and 11g) databases.

2) Disable DataWindow Data Cache in AEM if the application is set to the Test Mode in the Run Mode setting.

3) Do not cache DataWindows whose SQL statements contain non-table related expressions and the result of the expressions is dynamically generated. If these DataWindows are cached, the display result on the Web or on the mobile may be different from that in PowerBuilder.

4) DataWindows created dynamically cannot cache data on the PowerServer. Even though the Cache tool is enabled for such DataWindows, data will still be retrieved from the database.

5) DataWindow Data Cache at the PowerServer or at the client will not be effective until you fulfill all the configuration requirements described in the following sections:

  • Configuration required for database servers

  • Configuration for DataWindow Data Cache in AEM

6) There is a restriction on the database table where a cache-enabled DataWindow retrieves data: the first twenty characters in the table name must be different from those in the other tables in the database. If the first twenty characters in two tables are the same, the Cache tool cannot correctly identify the table that the DataWindow uses.

Configuration required for database servers

Appeon specially provides SQL files for the supported database servers (except Informix). You need to execute the SQL file of a database server for the server to support the DataWindow data-caching feature.

Note: DataWindow data-caching feature is unsupported for Informix, MySQL, Teradata, HANA, and PostgreSQL.

The following table lists the SQL file that should be executed for the supported database server. The SQL files reside in the %powerserver%\sql\cache\ folder, where %powerserver% indicates the PowerServer installation directory, for example, C:\Inetpub\wwwroot\appeon.

Table 29. SQL files for each database server

Database Type

SQL File

Oracle

To enable this feature, execute install_appeon_cache_ORACLE.sql.

To disable this feature, execute uninstall_appeon_cache_ORACLE.sql.

Microsoft SQL Server

To enable this feature, execute install_appeon_cache_MSSQL.sql.

To disable this feature, execute uninstall_appeon_cache_MSSQL.sql.

ASE

To enable this feature, execute install_appeon_cache_ASE.sql.

To disable this feature, execute uninstall_appeon_cache_ASE.sql.

SQL Anywhere

To enable this feature, execute install_appeon_cache_ASA.sql.

To disable this feature, execute uninstall_appeon_cache_ASA.sql.

DB2

To enable this feature, execute install_appeon_cache_DB2.sql.

To disable this feature, execute uninstall_appeon_cache_DB2.sql.


Important notes:

  1. The SQL file for Oracle database does not work with 8i databases, though it works with 9i, 10g, and 11g databases.

  2. Executing the SQL files provided by Appeon is the same as executing any other SQL files, but you need to be aware of the following notes:

    • If a database server has multiple users, executing the SQL file under the login of one user will be effective for that user only. To make sure all users can use the DataWindow data-caching feature, you should use different logins to execute the SQL file.

    • When you execute the SQL for a database server, the current login user of the server must have the right to execute stored procedures and create functions.

    • There are two ways to execute SQLs in a database server - from the database server console or from the command line. Sometimes one way will fail while the other works. For example, executing the SQL for Microsoft SQL Server from the command line may result in "parameter -D" error, while executing the SQL from the server console is successful, if the server computer has both Microsoft SQL Server and SAP ASE server installed.

Configuration required for AEM

This section takes the sales_application_demo as an example to show configuration in AEM that will enable the DataWindow Data Cache at the PowerServer and/or the client.

Step 1: Select Application > Performance > DataWindow Data Cache on the left pane of the AEM Console. The DataWindow Data Cache page displays on the right pane of the Console.

Step 2: Click "sales_application_demo" listed in the "Application Name" column of the table. The sales_application_demo page displays.

Figure 143. DataWindow Data Cache for sale_application_demo

DataWindow Data Cache for sale_application_demo

Step 3: In the Application Cache table, select the Server Side option or Client Side (Browser) option to enable the cache setting for the application DataWindows.

Step 4: In the DataWindow Object Cache table check the DataWindow object(s) on which you want to have the data-caching feature.

You cannot select different DataWindow objects for server cache and client cache, for example, you cannot select DataWindow object A for server cache only while object B for client cache only, instead, you should select object A and/or B for both.

Notes: 1) If a DataWindow object has a Child DataWindow object, its Child DataWindow will also be listed in the table. Checking either of them will enable the data caching for them both. 2) It is recommended that you check the DataWindow objects that do not have frequent data updates, and leave unchecked the DataWindow objects that have frequent data updates.

Step 5: Click the Save button to save changes.