I have some large memory processes that share memory on a CentOS 7 system. I am tuning the memory system for them. For kernel.shmmax and kernel.shmall the RedHat documentation states:
kernel.shmmax defines the maximum size in bytes of a single shared memory segment that a Linux process can allocate in its virtual address space.
kernel.shmall sets the total amount of shared memory pages that can be used system wide.
Why are there such limits on shared memory? I can limit the total memory a user or process uses with limits or cgroups. Why would I want to limit the total shared memory available on the system? Does the system take a performance hit when it has a lot of shared memory to manage?