Run Atlas

Documentation conventions

Some examples use <angle-brackets> as a convention to show places where you will need to specify your own details. The examples in this guide also use atlas-server as an install target. Change the install directory with that of your own configuration.

Atlas is started and stopped from the command line.

Start the server

To start Atlas, run the following commands:

  1. $ cd atlas-server
  2. $ ./atlas.sh start
  3. You will be able to follow startup progress in the console.
Startup Status

The start script will wait up to five minutes for all containers to report healthy. If you run into problems starting Atlas you can use these commands to troubleshoot:

  • docker-compose -f docker-compose.yml -f docker-compose.geocoding.yml ps
  • docker-compose -f docker-compose.yml -f docker-compose.geocoding.yml logs -f <unhealthy service>

Stop the server

To stop Atlas, run the following commands:

  1. $ cd atlas-server
  2. $ ./atlas.sh stop
  3. You will see a confirmation message once the Atlas server has stopped running.

Fix Redis THP and memory warnings

There are a few system requirements that Redis requires to run efficiently in a production environment. When you start Atlas, you may see the following Redis log warnings during startup:

redis           | 1:C 18 Nov 2019 19:09:59.300 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis           | 1:C 18 Nov 2019 19:09:59.301 # Redis version=5.0.5, bits=64, commit=00000000, modified=0, pid=1, just started
redis           | 1:C 18 Nov 2019 19:09:59.301 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis           | 1:M 18 Nov 2019 19:09:59.324 * Running mode=standalone, port=6379.
redis           | 1:M 18 Nov 2019 19:09:59.324 # Server initialized
redis           | 1:M 18 Nov 2019 19:09:59.324 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
Tread Carefully

You must make these changes on your Docker host, so the changes affect all processes running on the machine. Be sure to understand the implications for any other processes running on your host machine.

Enable vm.overcommit_memory (always)

To enable vm.overcommit_memory without checks, run the following:

$ echo "vm.overcommit_memory = 1" | sudo tee -a /etc/sysctl.conf

Disable THP

Typically, THP can be disabled via a kernel option and the process for that depends on your specific system. Here are some examples that work well for us. Once reconfigured, you'll need to restart the system and verify the changes have persisted.

Warning

Making any changes to your boot configuration incorrectly could prevent your system from booting. Be careful!

To disable THP on CentOS 7 / RHEL 7

Add transparent_hugepage=never to the GRUB_CMDLINE_LINUX line in /etc/default/grub. Then the file should look something like:

$ cat /etc/default/grub
GRUB_TIMEOUT=1
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL="serial console"
GRUB_SERIAL_COMMAND="serial --speed=115200"
GRUB_CMDLINE_LINUX="transparent_hugepage=never console=tty0 crashkernel=auto console=ttyS0,115200"
GRUB_DISABLE_RECOVERY="true"

Then, rebuild grub.cfg

# Rebuild grub.cfg on a BIOS-based machine
$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
# Rebuild grub.cfg on a UEFI-based machine
$ sudo grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg

To disable THP on Ubuntu 18.04

Add transparent_hugepage=never to the GRUB_CMDLINE_LINUX line in /etc/default/grub. Then the file should look something like:

$ cat /etc/default/grub
GRUB_TIMEOUT=1
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL="serial console"
GRUB_SERIAL_COMMAND="serial --speed=115200"
GRUB_CMDLINE_LINUX="transparent_hugepage=never console=tty0 crashkernel=auto console=ttyS0,115200"
GRUB_DISABLE_RECOVERY="true"

Then, rebuild grub.cfg

$ sudo update-grub

To disable THP on Ubuntu 18.04 (Cloud Image)

$ sudo echo "GRUB_CMDLINE_LINUX_DEFAULT=\"\$GRUB_CMDLINE_LINUX_DEFAULT transparent_hugepage=never\"" > /etc/default/grub.d/99-transparent-hugepage.cfg'
$ update-grub

Reboot and verify

Reboot the machine to take effect. Next, verify the settings are correct:

$ sysctl vm.overcommit_memory
vm.overcommit_memory = 1

$ cat /sys/kernel/mm/transparent_hugepage/enabled
always madvise [never]
Was this page helpful?