taupage icon indicating copy to clipboard operation
taupage copied to clipboard

Add `--shm-size` support

Open muller opened this issue 7 years ago • 6 comments

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.

muller avatar Aug 15 '17 12:08 muller

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

hjacobs avatar Aug 15 '17 20:08 hjacobs

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.

muller avatar Aug 16 '17 09:08 muller

@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...

hjacobs avatar Aug 16 '17 17:08 hjacobs

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.

muller avatar Aug 17 '17 08:08 muller

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

szuecs avatar Sep 25 '17 11:09 szuecs

@szuecs yes

muller avatar Oct 02 '17 09:10 muller