shmall、shmmni、shmmax几个参数都在linux的/proc/sys/kernel目录下,与共享内存有关,具体意义如下:
shmmax
This value can be used to query and set the run time limit on the
maximum shared memory segment size that can be created. Shared memory
segments up to 1Gb are now supported in the kernel. This value
defaults to SHMMAX.
设置了可以创建的共享内存segment大小的上限,单位是byte
shmall
This parameter sets the total amount of shared memory pages that can
be used system wide. Hence, shmall should always be at least
ceil(shmmax/PAGE_SIZE).
设置了整个系统中可以使用的共享内存页数,单位是page,如果想知道1page是多少可以使用命令
getconf PAGE_SIZE
因此该值最小为ceil(shmmax/PAGE_SIZE)
shmmni
This value determines the maximum number of shared memory segments.
4096 by default (SHMMNI).
设置了系统中共享内存segment总量上限制。
具体见官方文档:: 官方文档