You can tweak the memory configuration of each service by changing the values in these environment variables:
DRUID_XMX=16g
DRUID_XMS=1g
DRUID_MAXDIRECTMEMORYSIZE=39000m
Where DRUID_XMX and XMS pertain to max and min heap size.
You can also tweak the default configuration values by referring in the Reference configuration of the docs and setting an environment variable with the same value but with the periods changed to underscores instead.
For example, if I want to change my MiddleManager service’s druid.worker.capacity to 11. I will create an environment variable druid_worker_capacity with a value of 11 for that service in the docker-compose.yml file.