Set the kernel parameters of shared memory in Linux. in Linux, shared memory involves three kernel parameters: SHMMAX, SHMMNI, and SHMALL. besides the default value, we can also make temporary or permanent changes to the environment and application needs. The SHMMAX parameter defines the maximum size of the shared memory segment (in bytes single... set the kernel parameters of shared memory in Linux. in Linux, shared memory involves three kernel parameters: SHMMAX, SHMMNI, and SHMALL. besides the default value, we can also make temporary or permanent changes to the environment and application needs. The SHMMAX parameter defines the maximum size (in bytes) of the shared memory segment. the default value is 32 MB. The SHMMNI parameter specifies the maximum number of shared memory segments in the system. The default value is 4096. The SHMALL parameter controls the total amount of shared memory that can be used by the system at a time (in the unit of pages). The default value is 2097152. The value of this parameter must be at least equal to or greater than SHMMAX/PAGE_SIZE. View the current values of the three parameters. you can see through the proc file system: 1 $ cat/proc/sys/kernel/shmmax2335544323 $ cat/proc/sys/kernel/shmmni440965 $ cat/proc/sys/kernel/shmall62097152 temporarily modify the values of these three parameters, run the echo or sysctl command to modify the value in the proc file, and restart 1 $ echo 1073741824>/proc/sys/kernel/shmmax2 $ sysctl-w kernel. shmmax = 1073741824 #1 GB modify the value of three parameters for a long time, and modify/etc/sysctl. conf file content implementation, restart valid 1 echo "kernel. shmmax = 1073741824 ">/etc/sysctl. conf
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.