Parameter recommendations for the ICM

  737625 - Parameter recommendations for the ICM 

This Post provides information about using the Internet Communication Manager (ICM) and answers questions relating to parameter setting.

Other Terms
HTTP, HTTPS, HTTP load balancing, ICM, temporarily out of free buffers

Reason and Prerequisites


ICM Configuration
The following parameters (with their default values for Version 6.40) restrict the maximum load on the ICM:

icm/max_conn               = 500
icm/max_sockets = 2048
icm/req_queue_len          = 500
icm/min_threads            = 10
icm/max_threads            = 50
mpi/total_size_MB          = 80
mpi/max_pipes              = 4000

Note that each active HTTP connection requires two memory pipes (that is, four event flags) as well as one socket. This has nothing to do with the possible number of simultaneous users because each user can open several HTTP connections simultaneously depending on the application. You may have to change operating system parameters to allow for these types of high-load scenarios. For more information, see SAP Note 715400.

Relationship between users and active HTTP connections
To evaluate how many users can use the ICM, you must consider the following scenarios:
  • If a user submits a request, this can open several HTTP connections. Depending on the application, a request can open up to 10 or 20 HTTP connections. The user does not see exactly how many connections are opened. The average number of HTTP connections for each request is designated in the following formula with req_per_dialog_step.
  • The "think time" is also a determining factor for the utilization of the ICM. This is the period of time (in seconds) between two dialog steps ("clicks") of the user. There is no active HTTP connection during this time (this still depends on the timeout, see below). The think time in the following formula is indicated by thinktime_per_diastep_sec.
  • The Keepalive timeout is also important in this context (parameter icm/server_port_< xx >) or icm/keep_alive_timeout) because it determines how long the ICM keeps the connection open for further queries of this request. This timeout in seconds is indicated in the formula with conn_keepalive_sec.

Therefore, there is no global formula since the actual number of parallel HTTP connections concurrent_conn depends on the parameters. The following offers a rule of thumb:
           concurrent_conn = (users * req_per_dialog_step * conn_keepalive_sec)/ (thinktime_per_diastep_sec)
The value selected for the parmaters icm/max_conn and icm/max_sockets should be greater than the value calculated for concurrent_conn, and mpi/max_pipes should be at least twice as large as the value for concurrent_conn.

You can use the mpi/total_size_MB formula to determine the total MPI size
           mpi/total_size_mb = (concurrent_conn * mpi_buffer_size) / (1024 * 1024)
           The parameter mpi/buffer_size determines the size of the blocks that are used for data transfer within the memory pipes. Only change this parameter if requested to do so by SAP.

  • If you have 50 users, 3 requests per click, a keep_alive_value of 30 seconds (if the ICM notices that the resources are scarce, it automatically reduces the timeout for new connections) and an average think time of 20 seconds, the maximum values are as follows:
                    concurrent_conn = 225 and mpi/total_size_MB = 14.
  • With 500 users, 3 requests per click, a keep_alive_timeout of 60 seconds and a think time of 20 seconds, the following maximum values result:
                    concurrent_conn = 4500 and mpi/total_size_MB = 281.
  • If you have 1,000 users, 3 requests per click, a keep_alive_timeout of 30 seconds and a think time of 20 seconds, the maximum values are as follows:
                    concurrent_conn = 4500 and mpi/total_size_MB = 281.
  • With 12,000 users, 3 requests per click, a keep_alive_timeout of 5 seconds and a think time of 30 seconds, the following maximum values result:
                    concurrent_conn = 6000 and mpi/total_size_MB = 375.

Reasonable maximum parameter values (620: as of kernel patch level 1081, in Release 6.40 and higher: all versions)
icm/max_conn               = 10000
icm/max_sockets = 16384
icm/req_queue_len          = 6000
icm/min_threads            = 100
icm/max_threads            = 250
mpi/total_size_MB          = 500
mpi/max_pipes              = 20500
For platforms other than Windows, the following reasonable, maximum parameter values apply as of 7.20 (as of May, 2010)
icm/max_conn               = 20000
icm/max_sockets = 22500
icm/req_queue_len          = 6000
icm/min_threads            = 100
icm/max_threads            = 500
mpi/total_size_MB          = 500
mpi/max_pipes              = 45000

The value of mpi/buffer_size should not drop below 32,768 because the HTTP header must fit completely into a block of this size.

Operating system dependencies

Note that the operating systems often have restrictions for the maximum number of open file handles (sockets) for each process. Check that each process can have at least as many sockets (file handles) as specified in the paramater icm/max_sockets (2048 is the default value).
When you start it, the ICM checks if sufficient sockets are available to it from the operating system.
  If not, the trace file displays the following entry:

[Thr 1] *** WARNING => maximum number of sockets supported on this host
(1019) less than parameter icm/max_sockets (8192) [icxxrout_mt. 227 ]
You should then check the settings in the operating system:
  • AIX
           You can use the "ulimit -n" command to obtain the current value for the maximum number of open sockets (default: 2000). Using the command 'chuser nofiles=<new value> <User>', the value can be changed for the user.
  • SUN Solaris
           Use the 'limit' command to check the value of "descriptors" in the csh shell. You can also use the 'limit' command to change the value (further information is available under 'man limit').
  • HP_UX
           The "maxfiles", "maxfiles_lim" and "nfile" kernel parameters exist which are used to define the maximum open file handles. For PA-Risc, you should use SAM -> Kernelkonfig to change the parameters and for Itanium, you should use kcweb.
           Further information is available at: http://docs.hp. com/hpux/onlinedocs/939/KCParms/KCparamTut.OpenLockedFiles.html
  • Tru64 UNIX
           In Tru64 UNIX, processes are limited by the kernel parameters open_max_hard (default 4096) and open_max_soft (default 4096) (both defined in the kernel subsystem proc). In the entire system, the number is limited by the max_vnodes kernel parameter (kernel subsystem vfs).
The process of changing parameters in the system is described in Note 356370.
  • Windows platforms
           Check the Windows Registry settings with regedt32:
           MaxUserPort should be at least 0xfde8 = 65000
           TcpTimedWaitDelay should be 0x1e = 30 (or less)

           See also:
  • Linux
           You can use the "ulimit -n" command to obtain the current valuefor the maximum number of open sockets (default: 1024).
The corresponding parameter is called nofile and must be adjusted in the configuration file /etc/security/limits.conf.
  • AS/400
           The standard value for the maximum number of open sockets is approximately 2000. However, if required, you can use an operating system API to increase this number. Due to a sequence problem, ICM requests the maximum number of sockets BEFORE you know how many sockets ICM requires. This number must be determined before the system can call the above-mentioned API to increase the required number of sockets from the operating system. The ICM does not contain enough sockets only if this call fails. Therefore, you can ignore the warning regarding the maximum number of sockets on the AS/400 if NO error message of the type "SiInit: o4_setmaxfh failed" occurs in the following four lines of the dev_icm.

No comments:

Post a Comment