zalando-stups / taupage

THIS PROJECT IS NOT LONGER ACTIVELY MAINTAINED - The base Amazon Machine Image (AMI) allowing dockerized applications to run with STUPS
https://docs.stups.io/en/latest/components/taupage.html
Other
44 stars 50 forks source link

Add `--shm-size` support #436

Open muller opened 7 years ago

muller commented 7 years ago

At the moment it is not possible to set --shm-size from senza definition files. This flag may be required by some applications.

Definition of --shm-size from: https://docs.docker.com/engine/reference/run/#runtime-constraints-on-resources

--shm-size="" Size of /dev/shm. The format is . number must be greater than 0. Unit is optional and can be b (bytes), k (kilobytes), m (megabytes), or g (gigabytes). If you omit the unit, the system uses bytes. If you omit the size entirely, the system uses 64m.

hjacobs commented 7 years ago

@muller could you describe your WHY (use case you need this for)?

muller commented 7 years ago

I am using Akka Remoting Artery http://doc.akka.io/docs/akka/2.5.3/scala/remoting-artery.html. Artery uses Aeron https://github.com/real-logic/aeron. The Aeron media driver uses SHM, more details: https://github.com/real-logic/aeron/wiki/Protocol-Specification#aeron-over-shm-shared-memory.

hjacobs commented 7 years ago

@muller thanks, still: do you see any problems with the current behavior (without the flag) and how do they manifest/impact? I'm really trying to understand the use case and why you would be the first one hitting this problem...

muller commented 7 years ago

From aeron readme:

Note: if you are trying to run this inside a Linux Docker, be aware that, by default, Docker only allocates 64 MB to the shared memory space at /dev/shm. However, the samples will quickly outgrow this.

szuecs commented 6 years ago

@muller so to understand the setup: you (you as aeron user) fork processes and need therefore communication by SHM which is bigger than 64m?

muller commented 6 years ago

@szuecs yes