frmscoe / General-Issues

This repo exists to track current work and any issues within the FRMS CoE
2 stars 0 forks source link

Add maxcpu variables to all processors #334

Closed vorsterk closed 7 months ago

vorsterk commented 7 months ago

Story statement

As a DevOps engineer, I want to introduce an ENV MAX_CPU variable in the Dockerfiles, So that I can control the maximum CPU usage for containers, And so that the system can dynamically allocate CPU resources without exceeding a predefined limit, ensuring efficient resource management and preventing any single container from monopolizing CPU resources.

Acceptance criteria

  1. Validation of MAX_CPU variable existence: The MAX_CPU environment variable should be present in all Dockerfiles where CPU usage needs to be controlled.
  2. Correct usage of MAX_CPU: The MAX_CPU variable should be correctly used in the Dockerfile to set the CPU limit.
  3. Documentation: All changes should be documented, clearly explaining how to set and modify the MAX_CPU variable.
  4. Testing: Automated tests should confirm that the CPU limits are enforced according to the MAX_CPU setting.
  5. Resource Optimization: After the introduction of MAX_CPU, there should be an observed improvement in resource allocation across the system.

Variable : ENV MAX_CPU=

johanfol commented 7 months ago

Verify that the default value in all the services when not specified, eg, dockerfile: ENV MAX_CPU= Will be to spawn no workers, just the main service.

cshezi commented 7 months ago

Confirmed MAX_CPU= only spawns the main service