1

We have a custom application in house, where a large pool of Windows clients is accessing an imaging service on IBM i (AS/400) running V5R4. Occasionally, under heavy CPU load, the clients are unable to establish a TCP/IP connection. Since IBM i is a bit foreign to me, I had no other choice but to start drawing parallels to other OS, mainly *NIX and Windows. They both have a concept and use of ephemeral ports, on which connection is established back to the client. In the other OS, the size of the connection pool varies, from roughly four thousands to sixty four thousands. I was wondering, after reading this manual, if IBM i also supports ephemeral port range configuration, or if it is using the entire IP pool from 1024 to 65535 by default?

1

As far as I know, IBM i and it's predecessors use the entire range of ports from 1024 to 65535.

Is the imaging service also written in house? Or it a vendor app?

Many native IBM i applications use separate processes (known as jobs) instead of a multi-threaded single process to handle client server activity. Since starting a new process is relativity expensive, standard practice is to have a pool of available "pre-started" jobs waiting to process requests. However, if lots of connect requests come in at once it's possible that the connection would be delayed while new jobs are started. It's also possible to limit the total number of connections in use at a time.

For instance, lets look at the QZDASOINIT job which handles ODBC/JDBC/OLEDB requests..

This command:
DSPACTPJ SBS(QUSRWRK) PGM(QZDASOINIT)

will show you the current, average, and peak count of QZDASOINIT jobs running and in-use:

 Prestart jobs:         
   Current number . . . 
   Average number . . . 
   Peak number  . . . . 

 Prestart jobs in use:  
   Current number . . . 
   Average number . . . 
   Peak number  . . . . 

Paging down will show you the second page of information:

Program start requests:                 
  Current number waiting . . . . . . . .
  Average number waiting . . . . . . . .
  Peak number waiting  . . . . . . . . .
  Average wait time  . . . . . . . . . .
  Number accepted  . . . . . . . . . . .
  Number rejected  . . . . . . . . . . .

Pre-start jobs are controlled via the "Pre-Start Job entries" assigned to a given subsystem. The following sequence will get you to the "":
dspsbsd qusrwrk
10. Prestart job entries
5=Display details

For my QZDASOINIT entry, I have the following

Initial number of jobs . . . . . . . . . . . . . :   1       
Threshold  . . . . . . . . . . . . . . . . . . . :   1       
Additional number of jobs  . . . . . . . . . . . :   2       
Maximum number of jobs . . . . . . . . . . . . . :   *NOMAX  
Maximum number of uses . . . . . . . . . . . . . :   200     
Wait for job . . . . . . . . . . . . . . . . . . :   *YES

For more detailed information, take a look at the documentation for tuning prestart job entries

0

It isn't the OS that uses ephemeral ports; it's the application. The operating system isn't really the determining factor in that. Having said that, @Charles has a good answer for trying to keep the server from being overwhelmed when trying to schedule new incoming requests.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.