Skip to content

Improve performance#

Follow these steps if you need to improve the performance of LUNA PLATFORM in Docker containers.

Docker security policies impose restrictions on the network interaction of LP services. If you perform the listed below actions and disable the policies, a new network connection of docker containers will be established approximately 20% faster.

Changing the settings may have a negative impact on security. Do not change the settings if are not an advanced Docker user.

Docker must be installed before performing these actions. See "Docker installation".

1) Add --network=host --security-opt seccomp=unconfined parameters to the launch of each LP service container. The launch commands are described in section "Services launch"

The example below is given for the Faces service.

docker run --env=CONFIGURATOR_HOST=127.0.0.1 \
--env=CONFIGURATOR_PORT=5070 \
--env=PORT=5031 \
--env=WORKER_COUNT=1 \
--env=RELOAD_CONFIG=1 \
--env=RELOAD_CONFIG_INTERVAL=10 \
-v /etc/localtime:/etc/localtime:ro \
--name=luna-faces1 \
--restart=always \
--detach=true \
--network=host \
--security-opt seccomp=unconfined \
dockerhub.visionlabs.ru/luna/luna-faces:v.4.7.0

2) Add "userland-proxy": false to the Docker configuration.

Create configuration file for Docker.

echo 'DOCKER_OPTS="--config-file=/etc/docker/daemon.json"' > /etc/default/docker

Create the file.

vi /etc/docker/daemon.json

Add the following option to the opened file.

{
     "userland-proxy": false
}

Restart Docker.

systemctl restart docker