1

Unless I am wrong. the value of /proc/sys/kernel/shmall indicates the the total amount of shared memory, in bytes, that can be allocated to the system.

I am on a t2.micro ec2 debian instance, and I get this:

$ cat /proc/sys/kernel/shmall
18446744073692774399

I do not suppose this means that the total allocatable amount of shared memory is around 0.02 zettabytes ...

0

Right, it should be enough for anybody, defined as (ULONG_MAX - (1UL << 24)). Note, though, that it isn't a per-process, but an overall value. See http://elixir.free-electrons.com/linux/latest/source/include/uapi/linux/shm.h#L13:

 * SHMMNI, SHMMAX and SHMALL are default upper limits which can be
 * modified by sysctl. The SHMMAX and SHMALL values have been chosen to
 * be as large possible without facilitating scenarios where userspace
 * causes overflows when adjusting the limits via operations of the form
 * "retrieve current limit; add X; update limit". It is therefore not
 * advised to make SHMMAX and SHMALL any larger. These limits are
 * suitable for both 32 and 64-bit systems.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.