2

I want to increase shared memory size. It seems to be too complicated as shown below.

https://developer.apple.com/forums/thread/669625

I just run the following command. Is it sufficient to increase the shared memory size? Why the option is not permitted for kern.sysv.shmmni=32? Should it be kern.sysv.shmmin?

$ sudo sysctl -w kern.sysv.shmmax=268435456 kern.sysv.shmmni=128 kern.sysv.shmseg=32 kern.sysv.shmall=65536
Password:
kern.sysv.shmmax: 4194304 -> 268435456
kern.sysv.shmmni: 32
sysctl: kern.sysv.shmmni=128: Operation not permitted
kern.sysv.shmseg: 8 -> 32
kern.sysv.shmall: 1024 -> 65536

What are the meaning of each parameters?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62

1 Answers1

0

sysctl output is from Ventura 13.2, and descriptions are modified from the shmget manual page from Linux.

$ sysctl -a|grep "\.shm"
kern.sysv.shmmax: 4194304
kern.sysv.shmmin: 1
kern.sysv.shmmni: 32
kern.sysv.shmseg: 8
kern.sysv.shmall: 1024

SHMALL: System-wide limit on the total amount of shared memory, measured in units of the system page size.

SHMMAX: Maximum size in bytes for a shared memory segment.

SHMMIN: Minimum size in bytes for a shared memory segment: (PAGE_SIZE is the effective minimum size).

SHMMNI: System-wide limit on the number of shared memory segments.

SHMSEG: limit for the per-process maximum number of shared memory segments

JamesB192
  • 3
  • 2