C H A P T E R  4

Configuration Guidelines

This chapter describes the guidelines for configuring your application environment. It contains the following topics:

Also refer to the Sun Mainframe Transaction Processing Software Administrator's Guide, which lists the limits of Sun MTP resources, such as VSAM file size.


Sun MTP Transaction Servers

A Sun MTP transaction server's primary function is to execute programs related to a transaction. A region must have at least one transaction server but cannot have more than 224.

The transaction servers are composed of a text segment and a data segment.



Note - The COBOL runtime system is optional.



In a Sun MTP region, all the transaction servers have the same text segment. However, the data segment varies depending on the type and size of the transaction it has executed. By default, in each transaction server, the data segment size is pre-configured. The following illustration shows the structure of a transaction server.

  FIGURE 4-1 Transaction Server Structure

Diagram showing the data and text segments of a transaction server and what is contained in each segment.

Determining the Number of Transaction Servers

The Transaction servers field in the VCT specifies the total number of transaction servers available to the region. Because a transaction server is required to execute any transaction, online program, or batch program, this field also defines the maximum number of transactions and programs that can execute concurrently. Sun MTP uses this value to determine if transaction servers are available.

The value to set for this field depends on your application environment. For example, if all logged in users are involved in conversational transactions, as opposed to pseudo-conversational transactions, this number must at least equal the number of logged in users. If, however, the logged in users are involved in only pseudo-conversational transactions, this number can be much smaller.

Use a value of 16 to 20 or less if the transactions are small programs and the user enters large amounts of data on the user screen. (The user cannot type as fast as the transaction server can process the transaction.) If these transactions start background transactions, it is preferable to set the value to 20.

If you examine the output of kixdump -Spq, you can determine if there are any transaction servers waiting on the queue. It might be acceptable to allow about 20 percent of the transactions to wait on the queue for pseudo-conversational systems. For example, if you have 500 users but only 300 users are submitting transactions concurrently, you need 50 transaction servers. The likelihood of 50 or more users submitting transactions concurrently is low.

Experiment with different values to determine the optimal number of transaction servers for your environment. The following table provides a starting point for determining the number of transaction servers to configure based on the number of active users. The number of asynchronous transactions, batch jobs, and query jobs will increase the number of transaction servers required. You will need to monitor your system and evaluate your transaction profiles to achieve the performance you require.

TABLE 4-1 Determining the Number of Transaction Servers

# of Active Users

# of Transaction Servers

250

30-40

500

60-70

More than 500

80-224




Note - When determining the optimal number of transaction servers for a production environment, do not take into account conversational transactions such as CMNU, CEMT, CEBR, and CEDF. Instead, restrict the use of these transactions in a production region.



Refer to the Sun Mainframe Transaction Processing Software Administrator's Guide for information about using transaction classes to manage your application workload.

Determining the Maximum Number of Background Tasks

The Maximum background tasks field in the VCT specifies the maximum number of background transactions and programs that can execute concurrently. The value in this field should not exceed 50 percent of the value you set for transaction servers. However, if the application depends on background transactions frequently started by the TRIGGER or START commands, you can set a value that is 75 percent of the value set for transaction servers.

Determining the Maximum Number of Batch Jobs

The Maximum batch jobs field in the VCT establishes the number of transaction servers that can only be used to execute batch transactions. The value in this field should not exceed 50 percent of the value you set for transaction servers.



Note - The sum of the Maximum background tasks and the Maximum batch jobs must be equal to or less than the number of Transaction servers.



Determining the Maximum Number of Query Jobs

The Maximum query jobs field in the VCT sets the total number of interactive processes that can execute concurrently. This parameter limits the number of transaction servers assigned to third-party processing tasks.


Choosing a Recovery Method

Sun MTP provides two methods for implementing recovery. The first method uses a recovery file, and the second method uses the Sun MTP Native Recovery File System (NRFS). Each method provides the same level of recovery protection, but ease of use and performance levels differ, as described in the following table.

TABLE 4-2 Comparison of Recovery Methods

Method

Advantages

Disadvantages

Recovery file

Ease of use.

Specify the name of the recovery file and its location (using an environment variable) in the VCT, and Sun MTP performs all the necessary administrative functions.

Slightly slower performance than NRFS.

Requires a large number of I/O operations, which slows performance while recovery is active.

Sun MTP NRFS

Efficient performance.

NRFS requires only half as many I/O operations as the file recovery method, increasing the efficiency of the system during recovery.

Complex installation.

Administrator must prepare the system for use.

Requires a raw disk partition.

Requires that you perform all installation tasks before starting Sun MTP.




Note - NRFS and the recovery file method are mutually exclusive.



See Chapter 6 for information about configuring both types of recovery.


Effect of Recovery on Configuration

Recovery can affect your region's configuration in several ways:


Determining the Number of Sun MTP Processes

Sun MTP creates transaction servers and system processes during initialization. You can determine the total number of processes by calculating the number of Sun MTP-initiated processes and the number of user-initiated processes:

# of processes = # of transaction servers

+ 1 process for Sun MTP recovery
+ 1 process for interval control
+ 1 process for printing services
+ 1 controller process for other processes
+ (optionally) 1 process for remote terminal communications
+ (optionally) 1 process for communication using TCP/IP sockets
+ (optionally) 1 process for ISC from a remote region using SNA
+ (optionally) 1 process for ISC from a remote client/region using TCP/IP
+ (optionally) 1 process for Sun MTP Administration Framework
+ (optionally) 1 process for MQSeries integration
+ (optionally) 1 process for Sun MTP Communications Manager
+ (optionally) 1 process for each TN3270 server
+ (optionally) 1 process for transaction classes

During system execution, Sun MTP might add processes to fulfill specific tasks, such as standalone processes to run transactions such as CTBL, CFMS, and print requests.

Clients might require additional processes depending on how they connect to the region.

The Maximum number of users field on the VCT screen, therefore, affects the number of processes as follows:

Maximum user processes = Maximum # of local users * 2

+ Maximum # of SNA users + 1 (if SNA is in use)

The maximum number of users cannot exceed the number of users specified in the Sun MTP site license. Therefore, the total number of processes required by a region is determined as:

Total processes = # of Sun MTP server processes

+ Maximum user processes


Shared Memory Requirements

Sun MTP uses five types of shared memory segments:

The first three areas are static, determined during startup based on the configuration in the VCT. The system area and user area are dynamic shared memory segments, and the sizes are defined by the user during region startup. The system area is used to store Sun MTP internal structures, which are allocated depending upon the user processing. The user area is used to store user-requested and Sun MTP-allocated areas visible to the application, such as the COMMAREA.

Calculating Shared Memory Requirements

Because the amount of dynamic memory required for executing Sun MTP is determined by many application and system factors, you can only determine the amount of dynamic shared memory to allocate by experimentation. Your user shared memory segment size should be at least as large as the largest working storage you have in any one of your online programs. Begin with a minimum of 4 MBytes using the -S option of the unikixmain command.

Some of the factors that can affect the use of dynamic shared memory are:

The following table describes each of the shared memory areas and provides formulas to use to calculate shared memory requirements.

TABLE 4-3 Shared Memory Areas

Type

Shared Memory Area

Description

Static

Transaction area

Shared memory segment used for control structures relating to executing transactions by the transaction servers. Use the following formula:

User area size = (# transaction servers) * 200 bytes

Static

Terminal area

Shared memory segment used for terminal user related control structures. Use the following formula:

Global area size = (# of users) * 7000 bytes

Static

VSAM buffer area

VSAM buffer area shared memory segment used as a first-level buffer cache by the VSAM access method. The size is equal to the Number of buffers field in the VCT multiplied by the number of bytes in a block:

Database buffer area size = (# of buffers) * VSAM block size

Specify the VSAM block size with the -b option of unikixmain.

Dynamic

System area

User area

Specify using the -S option on unikixmain. The default value is 1 MB. Most production configurations, including those that use an RDBMS, require the dynamic VSAM area to be 2 MB or larger.

If processing demand requires it, more dynamic areas are created (up to 10). After the fifth area is attached, each additional area is attached, if possible, at twice the previous size. If the operating environment rejects the larger size, it is halved and the attach is attempted again.

You can specify the size as a number or as a number followed by M (megabytes) or K (kilobytes). If you use this option, you must configure the system during installation for the proper amount of shared memory. See Kernel Parameters.


Determining Where to Attach Shared Memory

Sun MTP shared memory contains structures that are shared by different process, including the transaction processors, recovery processor, and administration server process. The architecture of Sun MTP dictates that the shared memory should be attached at the same offset for all the cooperative processes that use the shared memory.

In FIGURE 4-2, if the process is a transaction processor, heap space is occupied by the runtime system, COBOL .int and .gnt programs, the JVM, Sun MTP structures, application dynamic memory, third-party products, and so on. As the transaction processor runs, it occupies heap space, and the heap pointer moves towards the start of Sun MTP shared memory.

If the process is a transaction processor or administration server process, shared libraries are attached in the libraries area. As more user, system, and Sun MTP shared libraries are attached to the process, the libraries area will start growing toward the end of Sun MTP shared memory.

If the heap space or the shared libraries encroach on Sun MTP shared memory, application aborts and region failures can occur. This situation calls for the placement of Sun MTP shared memory so that the region's cooperative process can grow both the heap space and the shared library space, if needed. The application requirements will determine the placement. For example, if COBOL .int and .gnt programs are not used, the heap space requirement is less.

By default the Sun MTP region attaches the shared memory at virtual address 0xEE000000, as shown in FIGURE 4-2. The user can adjust this by using the
-M t (threshold) -M c (maximum core) options to the unikixmain command.

  FIGURE 4-2 Process Image

Diagram showing where Sun MTP attaches shared memory and where the stack, libraries, the heap, and executables attach.

Heap Space

All the Sun MTP processes use less heap space than the transaction processor.

When servicing application transactions, Sun MTP transaction processors accumulate heap space. After the memory threshold is reached, the transaction processor is discarded and a new transaction processor is substituted. This is referred to as recycling the transaction processor. If a transaction starts before reaching the threshold, it is allowed to acquire more memory until it reaches the maximum core value. At this point, the current running transaction is aborted and the transaction processor is recycled. This is referred to as an out-of-storage condition.

The memory specified by the memory threshold value is not immediately allocated up to the maximum core address when the transaction processor is initiated, but is allocated progressively during the instance of the transaction processor by application programs. This total storage, text and heap space, accounts for the memory used in a system; that is, the total memory of all transaction processors is subtracted from the total memory available from the system. If this memory exceeds the system memory, swapping or paging of processes and memory occur.

Shared Library Usage

The administration server process and transaction processor use more shared libraries than the other Sun MTP processes.

Shared libraries can be libraries provided by the Solaris operating environment, such as libc.so, Sun MTP-supplied libraries, such as ceci.so, and libraries provided by third-party products. As the shared libraries are attached, they occupy the space in the libraries area and can start using space above Sun MTP shared memory. When there is no more space to attach a shared library or new Sun MTP shared memory segment, the Solaris operating environment issues an errno 22 (for shmat).

Where to Attach Sun MTP Shared Memory

You can adjust the memory threshold and maximum core values during region startup using the -M t and -M c parameters of the unikixmain command. Setting
-M t to a negative value moves the attach point of shared memory down toward the heap, reducing the heap space by the same amount. Setting the -M t option to a positive value moves the attach point up, increasing the heap space. Finding the best value requires some analysis and experimentation.

Shared memory is attached by default at virtual address 0xEE000000. This address also acts as the default maximum core value. You can change this address by specifying the -M t as an offset from 0xEE000000.

For example, by setting -M t-16M, Sun MTP will attach to shared memory at 0xEE000000 minus 0x1000000 (-16 MBytes), which is the address 0xED000000. This also has the effect of setting the maximum core address value to 0xED000000. The valid range for setting the -M t is -1M through -3854M (note that these are negative numbers). The threshold can be set as a positive number by subtracting from the maximum core value with the -M c option. For example, if you start the region with these options:

-M t-32M -M c10M

the region will run with the following values, as shown in the output of the kixdump -M command:

Values of Shared Memory, Max Core, Threshold Memory 
Address of Shared Memory    (ec600000) 
Address of Max Core         (ec600000) 
Address of Threshold Memory (ebc00000)

Refer to the Sun Mainframe Transaction Processing Software Reference Guide for more information about the kixdump utility.

The recommended startup values for shared memory are -M t-1024M and
-M c10M.



Note - The UNIX pmap command displays a memory map of a process.
The UNIX command ps -elf lists the size of processes in pages of memory. Refer to the appropriate man page for more information about these commands.




Determining the VSAM Buffer Size

If your application uses VSAM datasets or has a high volume of temporary storage (TEMPSTG) access, you must specify the number of VSAM buffers in the Number of shared buffers field in the VCT. The following table provides values you can use as a starting point.

TABLE 4-4 VSAM Buffer Size Values

Number of Buffers

Application Environment

32 buffers

Minimal TEMPSTG use; no VSAM datasets; only RDBMS access

64 buffers

Medium size TEMPSTG; no VSAM datasets; only RDBMS access.

128 buffers

TEMPSTG access and medium sized VSAM datasets.

Adding RDBMS has no effect.

256 buffers

High volume of TEMPSTG and many VSAM datasets.

Exceeding 256 buffers can adversely affect performance, causing Sun MTP to spend more time searching the buffer instead of accessing the data block from disk.


This VSAM buffer memory is allocated in the shared memory space, but is still a part of main memory.


Determining Swap Space

The swap space must accommodate the virtual memory requirements of Sun MTP, as well as any other processing on the host system. Swap space should equal or exceed the sum of the memory requirements for all applications you intend to execute concurrently.

If the target system's current file system cannot accommodate the necessary swap space, you must change the file system configuration. Many systems support a command that displays the actual block layout of a disk's partitions.



Note - Be sure not to mistake an active swap partition for a free partition. Decrease the swap space only as a last resort.



Free partitions are made into usable file systems with the newfs command or some derivative. Most systems have the mkfs command to which newfs is a preprocessor. This command creates a file system on the disk partition.

A file system must be mounted so that users or applications can access it. To mount the new file system use either the mount command or add an entry in the file system mounting table (usually /etc/fstab). Refer to the Solaris documentation for more information about file systems.

If the target system's resources still do not provide the necessary space, you can usually add internal or external hard disks.


Kernel Parameters

There are several operating environment, or kernel, parameters that can affect the startup and the performance of a region. This section provides information about these kernel parameters.

The parameters governing the UNIX kernel configuration reside in one or more files. Because default values for the parameters vary by hardware platform and might have been previously adjusted, you must review the current settings. If the current setting of a parameter meets or exceeds the Sun MTP requirement, do not modify it.

Changing Kernel Parameters

The methods for changing kernel values and generating a new kernel varies for different systems. For specific details, including the exact location of these parameters and instructions on how to change parameters and generate a new kernel, refer to the Solaris documentation. There are also many third-party books that cover system administration and kernel tuning.

The following table lists the kernel parameters.

TABLE 4-5 Kernel Parameters

Scope

Parameter

Description

Message Parameters

MSGTQL

Maximum number of messages outstanding in the system. This must be at least as large as the maximum number of users defined in the VCT. If multiple regions are in use, use the total of all users defined.

MSGSEG

Maximum number of message segments. By default, each message segment is 8 bytes (MSGSSZ). Since Sun MTP messages average about 40 bytes, each message requires 5 segments. Use a value at least 5 to 6 times MSGTQL.

MSGMNI

Number of message queues system wide. Each Sun MTP region uses (number of transaction servers + 11) queues. Set MSGMNI to the total number of message queues needed for all regions running concurrently.

Shared Memory Parameters

SHMMAX

Size of a single shared memory segment. Set this parameter to either the maximum Sun MTP segment size or 1 MB, whichever is greater. The segment size is discussed in Shared Memory Requirements.

SHMSEG

Maximum number of shared memory segments that can be attached to a single process. Heavy usage of main temporary storage can result in Sun MTP exceeding the number of segments allowed for by this parameter. Sun MTP uses a maximum of 23 shared memory segments while executing.

SHMMNI

Maximum number of shared memory segments that can be attached to all processes within a system.

Semaphore Parameters

SEMMNI

Maximum number of semaphore sets. Sun MTP requires 2 semaphore sets per region.

SEMMNS

Maximum number of semaphores. Sun MTP requires 25 semaphores per region.

SEMMSL

Maximum number of semaphores per semaphore set. Sun MTP requires a maximum value of 24 per region.

Process Parameters

MAXUP

Maximum number of processes per user. The Sun MTP region initially creates a number of processes as discussed in Determining the Number of Sun MTP Processes. The following additional processes can be created:

Printing A maximum of two additional processes are created.

Debugging One additional process is created for each user who uses a separate Animator window for debugging.

CMNU Up to six processes can be started for each active transaction.

CTBL Two additional processes are started for each
CEMT active transaction.
CFMS

CRED Up to six processes can be started for each active
CSGU transaction.

Batch For each active batch job specified in the VCT, Sun MTP requires a minimum of two additional processes. The user shell script can create additional processes.

In general, you must set MAXUP to the maximum number of processes required by the user who requires the most processes on a system. Note that users on X Terminals use 10 to 15 processes just for windows.

NPROC

Maximum number of processes in a system. If more than one region is active at one time, this value must be large enough to accommodate all concurrent regions. See Determining the Number of Sun MTP Processes. Multiply the number by the maximum number of regions, then add the number of processes required for users.

Per Process Limits[1]

SCPULIM

Soft limit for the maximum combined user and system time in seconds. A SIGXCPU signal is sent to a process that exceeds this limit. Set this to the maximum.

HCPULIM

Maximum value of SCPULIM.

SFSZLIM

Soft limit for the maximum file size in bytes. A SIGXFSX signal is sent to a process that writes to a file that exceeds this limit. The write also fails with an EFBIG error. Set this to the maximum.

HFSZLIM

Maximum value of SFSZLIM.

SDATLIM

Soft limit for the maximum size in bytes of a process' heap space. Any process that attempts to extend its heap beyond this limit fails with an ENOMEM. Set this to the maximum.

HDATLIM

Maximum value of SDATLIM.

SFNOLIM

Soft limit for the maximum number of file descriptors. When this limit is reached, the attempt to open the next file fails with an EMFILE. If there are a lot of VSAM files defined in the system, set this to a high value.

HFNOLIM

Defines the maximum value of SFNOLIM.

File Parameters

NOFILES

Maximum number of open files for each process. This value must also include all sockets opened for Sun MTP. The Sun Mainframe Transaction Processing Software Troubleshooting and Tuning Guide describes how to calculate the number of files used by an Sun MTP region.

NFILE

Maximum number of open files within the system. This value is calculated by taking the value of NOFILES and multiplying it by the number of concurrent Sun MTP processes. You must then add any non-Sun MTP file activity to this number.


 


1 (TableFootnote) These parameters only apply on some systems. A value set to 0x7FFFFFFF indicates a resource without limits.