Python memory requirements

Our Python / WSGI container configuration ist very flexible und can be configured individually to match your needs.

Please contact us if you want a different deployment plan that differs from our default (one container with one process per node).

Calculation of the available memory

CONTRACT_RSS = 128.0   # Insert your python RSS memory limit (in MiB)

# Our default configuration
CFG_CONTAINER_RSS = 8.0
CFG_CONTAINER_PROCESSES = 1
CFG_CONTAINER_DEPLOYMENTS = 2

CONTAINER_RSS = CFG_CONTAINER_RSS * CFG_CONTAINER_DEPLOYMENTS
APPLICATION_PROCESSES = CFG_CONTAINER_DEPLOYMENTS * CFG_CONTAINER_PROCESSES
AVAILABLE_RSS = CONTRACT_RSS - CONTAINER_RSS
AVAILABLE_APPLICATION_RSS = AVAILABLE_RSS / APPLICATION_PROCESSES

print('RSS available (for application): %.02f MiB' % AVAILABLE_APPLICATION_RSS)

With our default deployment plan this results in 56.00 MiB that your application has available per process.

Calculation of the required memory

APPLICATION_RSS = 40.0 # A typical Django site with 1-2 extra modules (in MiB)

# Our default configuration
CFG_CONTAINER_RSS = 8.0
CFG_CONTAINER_PROCESSES = 1
CFG_CONTAINER_DEPLOYMENTS = 2

CONTAINER_RSS = CFG_CONTAINER_RSS * CFG_CONTAINER_DEPLOYMENTS
APPLICATION_PROCESSES = CFG_CONTAINER_DEPLOYMENTS * CFG_CONTAINER_PROCESSES
TOTAL_APPLICATION_RSS = APPLICATION_RSS * APPLICATION_PROCESSES
TOTAL_RSS = CONTAINER_RSS + TOTAL_APPLICATION_RSS

print('RSS required (excluding container overhead): %.02f MiB' % TOTAL_APPLICATION_RSS)
print('RSS required (including container overhead): %.02f MiB' % TOTAL_RSS)

This example results in a memory requirement of 96.00 MiB.