2.3.2 How to define system parameters
(1) Maximum size of the shared memory segment
In Cosminexus HTTP Server, the status information of the server process and the internal trace information are collected in the shared memory. The OS contains a system parameter that controls the maximum size of each segment of the shared memory.
The size (in bytes) of the shared memory that is used in the status information of the server process is 400 KB, and the trace information is 'the MaxClients directive value
7 KB'. In the system parameter of maximum size of the shared memory segment, set a value that is equal to or more than the above-mentioned value.
The following is an example of the system parameter. The type and contents of system parameter in the OS differ based on versions of the used OS or kernel. For details on the contents of system parameter and the setup method, see the manual of the OS that is used.
- In Linux(R)
- Maximum size of the shared memory segment: kernel.shmmax (/etc/sysctl.conf)
- In AIX and HP-UX (IPF)
- Maximum size of the shared memory segment: shmmax
(2) Maximum number of processes
The number of processes on the system and the number of processes for each user are controlled by an OS system parameter. Out of the following processes, consider the total number of start processes that exist in the operating environment, and then set the system parameter:
- Control process
- Number of start processes: 1
- System parameters to be changed: Maximum number of processes for the user who starts the Web server.
- Server process
- Number of start processes: Value specified in the MaxClients directive
- System parameters to be changed: Maximum number of processes for the user specified in the User directive.
- CGI process
- When the execution of the CGI program is allowed, the CGI process is invoked from each server process when the request is processed.
- Number of start processes: The value specified in the MaxClients directive
- Number of system parameters to be changed: The maximum number of processes for the user specified in the User directive.
- gcache server
- The gcache server starts when the SSL session management functionality is enabled.
- Number of start processes: 1
- System parameters to be changed: The maximum number of processes for the user specified in the User Directive.
- rotatelogs process
- Start rotatelogs process to divide log entries up by specific time periods.
- Number of start processes: The number of rotatelogs programs specified in the CustomLog, ErrorLog, HWSRequestLog, and TransferLog directives.
- System parameters to be changed: Maximum number of processes for the user who starts the Web server.
- rotatelogs2 process
- Start rotatelogs2 process to split the log entries up based on the log file size and output them to multiple log files that wrap around when they all get full.
- Number of start processes: The number of rotatelogs2 programs specified in the CustomLog, ErrorLog, HWSRequestLog, and TransferLog directives.
- System parameters to be changed: Maximum number of processes for the user
- who starts the Web server.
For the process structure of Cosminexus HTTP Server, see the 4.1.1 Architecture of Cosminexus HTTP Server process (UNIX Version).
The following is an example of a system parameter. The type and contents of system parameter of the OS differ depending on the version of the OS or the kernel being used. For details on contents of system parameters and setup method, see the manual of the OS being used.
- In Linux
- Maximum number of processes for the entire system: kernel.threads-max (/etc/sysctl.conf)
- Maximum number of processes per user: nproc (/etc/security/limits.conf)
- In AIX
- Maximum number of processes per user: maxuproc
- In HP-UX (IPF)
- Maximum number of processes for the entire system: nproc
- Maximum number of processes per user: maxuprc
(3) Maximum number of files (Number of file descriptors)
(4) Example of system parameter definitions
The following is an example of a system parameter. The type and contents of the system parameter in the OS differ according to the version of the OS or kernel being used. For details on the contents of system parameters and the setup method, see the manual of the OS being used.
- In Linux
- Maximum number of files for the entire system: fs.file-max (/etc/sysctl.conf)
- In AIX
- In AIX, set the number of file descriptors that a process can open.
- Soft limit for the number of file descriptors that a user process can open at once: nofiles
For nofiles, specify a value equal to or greater than the calculated estimate.
- Hard limit for the number of file descriptors that a user process can open at once: nofiles_hard
For nofiles_hard, specify a value equal to or greater than the value specified for nofiles.
- In HP-UX (IPF)
- Maximum number of files for the entire system: nfile
- sInitial value for the logical maximum number of file descriptors per process: maxfiles
For maxfiles, specify a value equal to or greater than the calculated estimate.
- Physical maximum number of file descriptors per process: maxfiles_lim
For maxfiles_lim, specify a value equal to or greater than the value specified for maxfiles.