How do I Auto-configure my containers

In order to ensure efficient utilization of the resources, Cloudjiffy PaaS can automatically configure some of the managed stacks in accordance with the scaling limit (cloudlets number). Currently, the following templates can benefit from this Smart Auto-Configuration feature:

  • Databases: MySQL, MariaDB, Percona
  • PHP: Apache, NGINX
  • LiteSpeed: Web Server, ADC, LLSMP

The above-listed stacks have some peculiarities to support the implementation.

1. Templates utilize a modern systemd initialization program, which contains multiple features and tools required for the auto-configuration implementation.

2. A special JELASTIC_AUTOCONFIG environment variable defines if the auto-configuration feature should be enabled (true, by default) or disabled (false).

If I want to disable Smart Auto-Configuration, add (or edit if it already exists) this variable with the false value via the dashboard.



                  

Don’t forget to Restart Node(s) to apply changes.

3. Smart recovery after the OOM error causes automatic configurations re-adjustment to decrease the container’s default memory consumption.

Note: Smart OOM recovery works on containers with the JELASTIC_AUTOCONFIG enabled and, currently, for the following database stacks only:

  • MySQL 8.0.25; 5.7.34
  • MariaDB 10.3.30; 10.4.20; 10.5.11; 10.6.3
  • Percona 5.7.33; 8.0.23


If OOM killer actions make a container inoperable (due to some critical process being killed), we automatically restart this node and, due to smart recovery, decrease the innodb_buffer_pool_size parameter value. In case the situation occurs again, the mentioned reduction cycle is repeated.

I may customize the environment variables to adjust system behavior related to the OOM kills issue:

  • OOM_DETECTION_DELTA - sets a period (two seconds by default) for Jelastic to analyze the /var/log/messages log after each service restart to decide if it was caused by OOM killer
  • OOM_ADJUSTMENT - defines a value in %, MB, GB (10% by default) that the current innodb_buffer_pool_size parameter should be reduced after each OOM-caused restart
  • MAX_OOM_REDUCE_CYCLES - configures a maximum number of cycles for innodb_buffer_pool_size reduction (5 times by default)

  

Increase cloudlets limit for the container to reset adjustments due to OOM recovery.


Was this article helpful?

mood_bad Dislike 41
mood Like 25
visibility Views: 4009