KB Article #70398

Kernel Solaris Customization

Problem

The Solaris kernel contains the global memory segment, the message queue, and the number of files used by a process.  At the end of this process, you need to rebuild the kernel.  Here is how you do it in Solaris:


Resolution

Modify the global memory segments
By default, SOLARIS allows you to create a global memory segment with a maximum size of only 1 MB. To modify the kernel configuration:



Use a tool such as vi to edit the /etc/system file.
Add a line using the following format:
set shmsys:shminfo_shmmax=VALUE



where VALUE represents the maximum size that can be used for the message queue.



For example, to increase the value to 32 MB, the command is:



set shmsys:shminfo_shmmax=33554432



Modify the message queue
By default, SOLARIS only allows a maximum of 40 unread messages to transit in a message queue:



Use a tool such as vi to edit the /etc/system file.
Add a line using the following format:
set msgsys:msginfo_msgtql=VALUE



where VALUE represents the maximum size that can be used for the global memory.



By default, msgtql is set to 40. You should increase this value to 8192. To do so enter the command:
set msgsys:msginfo_msgtql=8192



Modify the number of files used by a process
By default, SOLARIS allows a process to simultaneously open only 64 files:



Use a tool such as vi. to edit the /etc/system file.
Add a line in the following format:
set rlim_fd_cur=VALUE



where VALUE represents the number of files that can be used within a process.



By default, rlim_fd_cur is set to 64. You should increase this value to 1024 (0x300 in hexadecimal). To do so enter the command:
set rlim_fd_cur=0x300



Rebuild the kernel
Given its dynamic structure, the SOLARIS kernel does not need to be rebuilt. The modifications are applied automatically when the system is next loaded