-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto-set shm size based on host available ram #342
base: master
Are you sure you want to change the base?
Conversation
@@ -21,6 +21,9 @@ LOCAL_GID := $(shell id -g) | |||
CUID ?= $(LOCAL_UID) | |||
CGID ?= $(LOCAL_GID) | |||
|
|||
# Define shm size based on total ram on host ([Total ram on host, in kilobytes] / 4) | |||
SHM_SIZE = $(shell expr $(shell cat /proc/meminfo | head -1 | awk '{print $$2}') \* 256) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs testing on Macos
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Let's move to 3.8 annotation and bump requirements for docker and compose https://docs.docker.com/compose/compose-file/compose-versioning/#version-38 |
At least 3.5 and 3.6 allows to configure shm/tmpfs size |
Allow auto-setting the shm size of php container based on available ram host (1/4 here).
Also sets a default to 2GB