Skip to content

Shared Memory

Shreya Batra edited this page Jan 18, 2022 · 3 revisions

Functions lets the Python worker use shared memory to improve throughput. When the function app is hitting bottlenecks, shared memory can be enabled by setting FUNCTIONS_WORKER_SHARED_MEMORY_DATA_TRANSFER_ENABLED to 1 in application settings and DOCKER_SHM_SIZE to 268435456 (which is equivalent to 256MB). This is available in Premium subscriptions.

Architecture

By default, the data used between functions host and Python worker is transferred through GRPC channel. However, as the data size increases, the GRPC channels become a bottleneck.

Diagrams

Existing design

Shared memory design