Databases are now automatically optimized for their container footprint

Thomas Orozco on December 6, 2017

Since the introduction of Self-Service Database Scaling on Enclave, you’ve been able to conveniently resize your database containers to fit the evolution of your workload over time.

As of this week, we’re proud to announce that we’re taking this feature one step further by automatically configuring databases for optimum performance based on their container footprint.

Here’s what we do:

  • PostgreSQL: shared_buffers, work_mem, and a number of other parameters are configured according to pgtune guidelines.
  • MySQL: the InnoDB buffer pool is configured to use about 80% of available memory.
  • MongoDB: wiredTigerCacheSizeGB is configured to about 50% of the container size (more on larger containers).
  • Elasticsearch: the heap size is set to 50% of the container size to reserve 50% for Lucene caches.

Note that these settings only apply to databases launched after 12:00 UTC on December 4, 2017. For databases you launched before this date, you can use the aptible db:reload command to restart your database using this new configuration (this will cause a few seconds of downtime while your database restarts).

These new parameters are expected to yield better performance for most workloads, and help you better utilize the resources available to your database containers. That said, if you had previously opted to customize the configuration of your database (for PostgreSQL, you might have done so using ALTER SYSTEM), or would like to do so now to further improve performance, your custom parameters will take precedence over Enclave’s optimized configuration.