Skip to main content

Exercise 3

2986410077.png

Scenario

L7|ESP is initially configured for personal use on a light-weight machine (laptop). However, these settings will quickly become non-performant as the number of Users concurrently working in the system increases. This is especially true for high-throughput experiments with large datasets, and implementations with a large number of Pipelines.

The donation clinic wants to be sure L7|ESP can accommodate the blood drives scheduled later this month. As the Application Administrator, you have been asked to proactively tune the application.

Your Task: Part 1

  • Edit docker-compose.prod.yml file add L7ESP_HTTP_NUMPROCS: 4 to environment: block.

  • Restart container with docker compose down && docker compose up -d && docker compose logs -f

  • Watch log output and verify that there are four (4) web worker services now, (i.e. l7-esp.http.0 - l7-esp.http.3)

Your Task: Part 2

To start, L7 recommends making the following adjustments to the postgresql.conf file:

  • max_connections: 6x the total number of ESP services listed when running the command l7 status

    • L7 routinely sets this value to 200 for systems configured with more web workers (http services)

  • shared_buffers: ~25% of the available system RAM, but not more than 8GB

    • L7 routinely sets this value to at least 1GB but not more than 8GB

  • temp_buffers: No less than 64MB

    • L7 routinely sets this to 128MB on dedicated DB servers in production

  • work_mem: No less than 256MB

    • L7 routinely sets this to 1GB on dedicated DB servers in production

  • maintenance_work_mem: No less than 128MB

    • L7 routinely sets this to 256MB on dedicated DB servers in production

  • effective_cache_size: ~75% of available RAM on a dedicated DB server

    • On other servers, 2x the shared_buffer size

Imagine you have a single-server setup with 6GB of RAM.

Question: What L7|ESP services need to be restarted to apply these changes?

Answer: All of them, run the command: l7 restart