[docker-syncd]: Add optional shm-size to syncd container (#10516)
Why I did it In the bringup of tomahawk4/trident4, we realized that such chips need a larger size of /dev/shm in syncd container, so we added the option --shm-size to the docker create for syncd. The default value for shm-size is 64m; after this change, people can add SYNCD_SHM_SIZE=128m to platform_env.conf to change it to 128m. How to verify it We verified that after this change, 1) on existing platforms without platform_env.conf, the size of /dev/shm in syncd container (df -h | grep shm) is still the default 64M; 2) after we add SYNCD_SHM_SIZE=128m to platform_env.conf, /dev/shm in syncd becomes 128M.
This commit is contained in:
parent
7d9a346e10
commit
f7a6553933
@ -233,6 +233,11 @@ start() {
|
|||||||
source $ASIC_CONF
|
source $ASIC_CONF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
PLATFORM_ENV_CONF=/usr/share/sonic/device/$PLATFORM/platform_env.conf
|
||||||
|
if [ -f "$PLATFORM_ENV_CONF" ]; then
|
||||||
|
source $PLATFORM_ENV_CONF
|
||||||
|
fi
|
||||||
|
|
||||||
{%- if docker_container_name == "database" %}
|
{%- if docker_container_name == "database" %}
|
||||||
# Don't mount HWSKU in {{docker_container_name}} container.
|
# Don't mount HWSKU in {{docker_container_name}} container.
|
||||||
HWSKU=""
|
HWSKU=""
|
||||||
@ -421,6 +426,7 @@ start() {
|
|||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if sonic_asic_platform == "broadcom" %}
|
{%- if sonic_asic_platform == "broadcom" %}
|
||||||
{%- if docker_container_name == "syncd" %}
|
{%- if docker_container_name == "syncd" %}
|
||||||
|
--shm-size=${SYNCD_SHM_SIZE:-64m} \
|
||||||
-v /var/run/docker-syncd$DEV:/var/run/sswsyncd \
|
-v /var/run/docker-syncd$DEV:/var/run/sswsyncd \
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user