AIS Server Configuration

The settings within a daemon workspace controls the way AIS servers are managed. The primary settings to be aware of are:


  • serverMode
    • singleClient
      • each client receives a single use, dedicated server process
      • high overhead due to process startup times
      • start once, end after use

    • reusable
      • an extension of the single-client mode where the process, on disconnect, is returned to the idle server pool to wait for another request
      • the parameter reuseLimit controls how many times the server is used before being retired
      • start once, re-used multiple times

    • multiClient
      • clients share a server process and are processed serially

    • multiThreaded
      • clients are allocated a dedicated thread in a shared server process

  • serverPortsRange
    • blank, use the port range that is defined in the daemon
    • from-to, to define the range of ports to be used for this workspace

  • reuseLimit
    • if reusable, now many times the server is used before being retired

  • maxNClientsPerServer
    • if multiClient or multiThreaded, the number of clients each server can accept

  • keepWhenDaemonEnds
    • when a daemon is shutdown, should active servers be allowed to continue



  • nAvailableServers
    • the number of servers to be pre-started, placed into the idle pool

  • minNAvailableServers
    • the minimum number of idle servers to be waiting in the pool

  • maxNAvailableServers
    • the maximum number of idle servers to be waiting in the pool

  • maxNActiveServers
    • the absolute maximum number of servers, active or idle, allowed to be running concurrently


Usage Patterns

To be able to configure a workspace, it is important to understand and identify the expected pattern of usage.


  • Application server with connection pooling (ASCP)
    • Long term client connection
    • Connections reused by many objects
    • High sensitivity to connection latency
    • Parameters
      • serverMode: singleClient (if clients never timeout)
      • serverMode: reusable (if clients timeout from pool)
      • nAvailableServers: client pool size
      • clientIdleTimeout: must match client’s policy

  • Batch reporting and bulk ETL (BREP)
    • Long running processes
    • Long term client connection
    • No sensitivity to connection latency
    • Parameters
      • serverMode: singleClient (no server pooling)
      • maxNActiveServers: max # concurrent processes supported
      • min/max/nAvailableServers: 0
      • keepWhenDaemonEnds: consider if want reports to finish regardless of daemon

  • Client/server applications using fat client (CSFAT)
    • Long running processes
    • Long term client connection
    • Possible sensitivity to connection latency
    • Parameters
      • serverMode: singleClient (no server pooling)
      • nAvailableServers: only if big# of client start at the same time, then use average # of clients
      • keepWhenDaemonEnds: consider if clients can’t auto-reconnect

  • Client/server applications using thin client (CSREP)
    • Ad-hoc light reporting and CDC
    • Short running processes
    • Short term client connections
    • High sensitivity to connection latency
    • Parameters
      • serverMode: reusable
      • nAvailableServers: somewhere between average# of concurrent clients and peak#


Reuse Limit Considerations


  • <workspace … reuseLimit=‘…’ …/>
  • Main uses
    • Work around leaks of all kinds
    • Recycle servers periodically to release resources

  • Default is 50 (when nothing is given)
  • Set to 0 (no limit) unless you have issues
  • Set to 1 to make server recycle when client pool recycles


Maximum Active Servers Considerations

  • <workspace … maxNActiveServers=‘…’ …/>
  • Force absolute limit on # of workspace processes
  • Not intended to be optimal work point
    • Boundary conditions (server recycling)
    • Used for capacity planning

  • Mandatory parameter for system stability
  • When exceeded, clients get ‘try again later’


Port Range Considerations


  • Without port range settings
    • Servers ask the system for any free port

  • With port range settings (x..y)
    • Servers pick random port in the range
    • If port is free, use it. Otherwise try another

  • System should ‘know’ about this setting
    • Add entries to the TCPIP SERVICE table:
      • ais-srv-01 4800/tcp # AIS server port #1
      • ais-srv-02 4801/tcp # AIS server port #2


MVS Sub-Task Considerations


  • Maximum # of sub-tasks for workspace
    • Estimate by trial the memory need M of a 1-task single server, then 2-task server with maximal processing
    • Rough # of sub-tasks is based on the difference and how many can fit in memory

  • Number of sub-tasks should be a divisor of
    • # of available servers
    • Max # of active servers


Pooling Behaviour

In the progressive steps below, the following parameters are in use:

nAvailableServers 4
minNAvailableServers 2
maxNAvailableServers 6
maxNActiveServers 10



Name:  Capture1.JPG
Views: 536
Size:  95.3 KB


Name:  Capture2.JPG
Views: 516
Size:  77.6 KB


Name:  Capture3.JPG
Views: 536
Size:  62.7 KB

Step 1.1 Daemon start
Daemon starts 4 servers, as per nAvailableServers
Step 1.2 Client connects, 1 server becomes active
Sufficient servers in the pool, 3 idle is greater or equal to minNAvailableServers
Step 1.3 Another client connects, 2 servers are active
Sufficient servers in the pool, idle 2 is greater or equal to minNAvailableServers
Step 1.4 Another client connects, 3 servers are active
Insufficient servers in the pool, idle is less than min so the daemon starts an additional server
Step 1.5 Another client connects, 4 servers are active
Insufficient servers in the pool, daemon starts an additional server
Step 2.1 Another client connects, 5 servers are active
Insufficient servers in the pool, daemon starts an additional server
Step 2.2 Another client connects, 6 servers are active
Insufficient servers in the pool, daemon starts an additional server
Step 2.3 Another client connects, 7 servers are active
Insufficient servers in the pool, daemon starts an additional server
Step 2.4 A client disconnects, server returned to pool, 6 servers are active
The pool of 3 is within the min and max settings of available servers
Step 2.5 Another client disconnects, server returned to pool, 5 servers are active
The pool of 4 is within the min and max settings of available servers
Step 3.1 Another client disconnects, server returned to pool, 4 servers are active
The pool of 5 is within the min and max settings of available servers
Step 3.2 Another client disconnects, server returned to pool, 3 servers are active
The pool of 6 is within the min and max settings of available servers
Step 3.3 Another client disconnects, server returned to pool, 2 servers are active
The pool would be 7 which is more than the max setting, so the daemon retires the server
Step 3.4 No clients connect, no clients disconnect
The active and idle continue
Step 3.5 A client connects, 3 servers are active
The pool is within the min and max settings of available servers
Step 4.1 Another client connects, 4 servers are active
Sufficient servers in the pool, idle 4 is within the min and max for available servers
Step 4.2 Another client connects, 5 servers are active
Sufficient servers in the pool, idle 3 is within the min and max for available servers
Step 4.3 Another client connects, 6 servers are active
Sufficient servers in the pool, idle 2 is within the min and max for available servers
Step 4.4 Another client connects, 7 servers are active
Insufficient servers in the pool, daemon starts an additional server
Step 4.5 Another client connects, 8 servers are active
Insufficient servers in the pool, daemon starts an additional server
Step 5.1 Another client connects, 9 servers are active
Insufficient servers in the pool, the max active servers has been reached so the daemon does not start any additional servers
Step 5.2 Another client connects, 10 servers are active
Insufficient servers in the pool, the max active servers has been reached so the daemon does not start any additional servers
Step 5.3 Another client attempts to connect, this fails because there are 10 active servers and the max active servers has been reached
The active servers continue and there are no servers in thepool
Step 5.4 A client disconnects, server returned to pool, 9 servers are active
Insufficient servers in the pool, the max active servers has been reached so the daemon does not start any additional servers
Step 5.5 A client disconnects, server returned to pool, 8 servers are active
The pool is 2 which is within the min and max settings of available servers
Step 6.1 A client disconnects, server returned to pool, 7 servers are active
The pool is 3 which is within the min and max settings of available servers
Step 6.2 Another client disconnects, server returned to pool, 6 servers are active
The pool is 4 which is within the min and max settings of available servers
Step 6.3 Another client disconnects, server returned to pool, 5 servers are active
The pool is 5 which is within the min and max settings of available servers
Step 6.4 Another client disconnects, server returned to pool, 4 servers are active
The pool is 6 which is within the min and max settings of available servers
Step 6.5 Another client disconnects, server returned to pool, 3 servers are active
The pool would be 7 which is more than the max setting, so the daemon retires the server, leaving 6
Step 7.1 Another client disconnects, server returned to pool, 2 servers are active
The pool would be 7 which is more than the max setting, so the daemon retires the server, leaving 6
Step 7.2 Another client disconnects, server returned to pool, 1 servers are active
The pool would be 7 which is more than the max setting, so the daemon retires the server, leaving 6
Step 7.3 Another client disconnects, server returned to pool, 0 servers are active
The pool would be 7 which is more than the max setting, so the daemon retires the server, leaving 6
There are now no active servers and a pool of 6 idle servers available to be allocated to the next connection