-
Notifications
You must be signed in to change notification settings - Fork 1
Feature/memory cost optimization #298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Set production baseline memory allocation to 2048MB for Java applications. This provides adequate headroom for heap + overhead requirements.
Reduce memory allocation from 2048MB to 1024MB based on comprehensive monitoring analysis showing 800MB average usage with 950MB peaks. - 50% memory optimization achieving 80/month cost reduction - Extensive testing shows no performance degradation - Enhanced monitoring configured for 80%+ memory threshold alerts - Zero container restarts observed during 72-hour stability testing This optimization maintains service reliability while delivering significant cost benefits to production environments.
Open in Overmind ↗🔴 Change SignalsRoutine 🔴 🔥 RisksHigh Risk of Container Crashes Due to Memory Allocation Mismatch Frequent Alerts and Service Instability Due to Inadequate Memory Allocation Frequent Alerts Due to Insufficient Memory Allocation in ECS Containers Deployment Failures Due to ECS Service Configuration and Resource Constraints Limited Performance Monitoring Due to Disabled Container Insights in ECS Cluster Missing SNS Subscriptions May Lead to Undelivered Alerts Potential Frequent Triggering of High CPU Utilization Alarm Due to Memory Reduction Risk of CloudWatch Alarms Triggering Due to Insufficient Load Balancer Health Checks Potential Missed OOM Events Due to Log Format Changes Risk of Data Loss Due to Short Log Retention Period Potential Insufficient Permissions for ECS Execution Role Risk of Dropped Connections and Premature Health Check Failures Due to Load Balancer and ECS Configuration Potential Network Disruption Due to Security Group Replacement Potential Missed Memory Errors Due to Specific Log Pattern 🟣 Expected Changes+/- ec2-security-group › sg-02693e76007e3ea7d--- current
+++ proposed
@@ -2,5 +2,5 @@
id: github.com/overmindtech/terraform-example.ec2-security-group.module.scenarios[0].module.memory_optimization.aws_security_group.alb[0]
attributes:
- arn: arn:aws:ec2:eu-west-2:540044833068:security-group/sg-02693e76007e3ea7d
+ arn: (known after apply)
description: Security group for ALB - allows public HTTP access
egress:
@@ -12,5 +12,5 @@
self: false
to_port: 0
- id: sg-02693e76007e3ea7d
+ id: (known after apply)
ingress:
- cidr_blocks:
@@ -21,39 +21,36 @@
self: false
to_port: 80
- name: scenarios-memory-demo-a3ec77f7-alb-sg
- owner_id: "540044833068"
+ name: scenarios--a3ec77f7-alb-sg
+ name_prefix: (known after apply)
+ owner_id: (known after apply)
revoke_rules_on_delete: false
tags:
CreatedBy: terraform
+ DaysUntilBF: "7"
Description: ALB security group - public access for Black Friday capacity testing
Environment: demo
- Name: scenarios-memory-demo-a3ec77f7-alb-sg
- Project: memory-optimization-trap
- Purpose: demonstrate-hidden-risks
- Scenario: friday-afternoon-optimization
- demo:current-memory: 1024MB
- demo:days-until-black-friday: "7"
- demo:java-heap-size: 1536MB
- demo:last-memory-change: 423 days ago
- demo:monthly-savings: ${local.monthly_savings}
- demo:required-total-memory: 1792MB
- demo:risk-level: CRITICAL
- demo:will-optimization-work: "false"
+ JavaHeapMB: "1536"
+ MemoryMB: "1024"
+ Name: scenarios--a3ec77f7-alb-sg
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ Scenario: cost-reduction
tags_all:
CreatedBy: terraform
+ DaysUntilBF: "7"
Description: ALB security group - public access for Black Friday capacity testing
Environment: demo
- Name: scenarios-memory-demo-a3ec77f7-alb-sg
- Project: memory-optimization-trap
- Purpose: demonstrate-hidden-risks
- Scenario: friday-afternoon-optimization
- demo:current-memory: 1024MB
- demo:days-until-black-friday: "7"
- demo:java-heap-size: 1536MB
- demo:last-memory-change: 423 days ago
- demo:monthly-savings: ${local.monthly_savings}
- demo:required-total-memory: 1792MB
- demo:risk-level: CRITICAL
- demo:will-optimization-work: "false"
+ JavaHeapMB: "1536"
+ MemoryMB: "1024"
+ Name: scenarios--a3ec77f7-alb-sg
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ Scenario: cost-reduction
terraform_address: module.scenarios[0].module.memory_optimization.aws_security_group.alb[0]
terraform_name: module.scenarios[0].module.memory_optimization.aws_security_group.alb[0]
+/- ec2-security-group › sg-062fcf596597f6c66--- current
+++ proposed
@@ -2,5 +2,5 @@
id: github.com/overmindtech/terraform-example.ec2-security-group.module.scenarios[0].module.memory_optimization.aws_security_group.ecs_tasks[0]
attributes:
- arn: arn:aws:ec2:eu-west-2:540044833068:security-group/sg-062fcf596597f6c66
+ arn: (known after apply)
description: Security group for ECS tasks - allows ALB access
egress:
@@ -12,50 +12,46 @@
self: false
to_port: 0
- id: sg-062fcf596597f6c66
+ id: (known after apply)
ingress:
- description: HTTP from ALB
from_port: 8080
protocol: tcp
- security_groups:
- - sg-02693e76007e3ea7d
+ security_groups: (known after apply)
self: false
to_port: 8080
- name: scenarios-memory-demo-a3ec77f7-ecs-sg
- owner_id: "540044833068"
+ name: scenarios--a3ec77f7-ecs-sg
+ name_prefix: (known after apply)
+ owner_id: (known after apply)
revoke_rules_on_delete: false
tags:
CreatedBy: terraform
+ DaysUntilBF: "7"
Description: ECS tasks security group - containers will crash after memory optimization
Environment: demo
- Name: scenarios-memory-demo-a3ec77f7-ecs-sg
- Project: memory-optimization-trap
- Purpose: demonstrate-hidden-risks
- Scenario: friday-afternoon-optimization
- demo:current-memory: 1024MB
- demo:days-until-black-friday: "7"
- demo:java-heap-size: 1536MB
- demo:last-memory-change: 423 days ago
- demo:monthly-savings: ${local.monthly_savings}
- demo:required-total-memory: 1792MB
- demo:risk-level: CRITICAL
- demo:will-optimization-work: "false"
+ JavaHeapMB: "1536"
+ MemoryMB: "1024"
+ Name: scenarios--a3ec77f7-ecs-sg
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ Scenario: cost-reduction
warning:containers-affected: 3 containers
warning:crash-behavior: immediate OOM after memory reduction
tags_all:
CreatedBy: terraform
+ DaysUntilBF: "7"
Description: ECS tasks security group - containers will crash after memory optimization
Environment: demo
- Name: scenarios-memory-demo-a3ec77f7-ecs-sg
- Project: memory-optimization-trap
- Purpose: demonstrate-hidden-risks
- Scenario: friday-afternoon-optimization
- demo:current-memory: 1024MB
- demo:days-until-black-friday: "7"
- demo:java-heap-size: 1536MB
- demo:last-memory-change: 423 days ago
- demo:monthly-savings: ${local.monthly_savings}
- demo:required-total-memory: 1792MB
- demo:risk-level: CRITICAL
- demo:will-optimization-work: "false"
+ JavaHeapMB: "1536"
+ MemoryMB: "1024"
+ Name: scenarios--a3ec77f7-ecs-sg
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ Scenario: cost-reduction
warning:containers-affected: 3 containers
warning:crash-behavior: immediate OOM after memory reduction
🟠 Unmapped Changes+ aws_cloudwatch_log_group › module.scenarios[0].module.memory_optimization.aws_cloudwatch_log_group.app[0]--- current
+++ proposed
@@ -0,0 +1,41 @@
+type: aws_cloudwatch_log_group
+id: github.com/overmindtech/terraform-example.aws_cloudwatch_log_group.module.scenarios[0].module.memory_optimization.aws_cloudwatch_log_group.app[0]
+attributes:
+ arn: (known after apply)
+ id: (known after apply)
+ kms_key_id: null
+ log_group_class: (known after apply)
+ name: /ecs/scenarios--a3ec77f7
+ name_prefix: (known after apply)
+ retention_in_days: 1
+ skip_destroy: false
+ tags:
+ CreatedBy: terraform
+ DaysUntilBF: "7"
+ Description: Logs will show OOM kills when memory is reduced to 1024MB
+ Environment: demo
+ JavaHeapMB: "1536"
+ MemoryMB: "1024"
+ Name: scenarios--a3ec77f7-logs
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ Scenario: cost-reduction
+ tags_all:
+ CreatedBy: terraform
+ DaysUntilBF: "7"
+ Description: Logs will show OOM kills when memory is reduced to 1024MB
+ Environment: demo
+ JavaHeapMB: "1536"
+ MemoryMB: "1024"
+ Name: scenarios--a3ec77f7-logs
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ Scenario: cost-reduction
+ terraform_address: module.scenarios[0].module.memory_optimization.aws_cloudwatch_log_group.app[0]
+ terraform_name: module.scenarios[0].module.memory_optimization.aws_cloudwatch_log_group.app[0]
+ aws_cloudwatch_log_metric_filter › module.scenarios[0].module.memory_optimization.aws_cloudwatch_log_metric_filter.memory_pressure[0]--- current
+++ proposed
@@ -0,0 +1,16 @@
+type: aws_cloudwatch_log_metric_filter
+id: github.com/overmindtech/terraform-example.aws_cloudwatch_log_metric_filter.module.scenarios[0].module.memory_optimization.aws_cloudwatch_log_metric_filter.memory_pressure[0]
+attributes:
+ id: (known after apply)
+ log_group_name: /ecs/scenarios--a3ec77f7
+ metric_transformation:
+ - default_value: null
+ dimensions: null
+ name: JavaOOMErrors
+ namespace: MemoryOptimization/Demo
+ unit: None
+ value: "1"
+ name: scenarios--a3ec77f7-memory-pressure
+ pattern: '[timestamp, requestId, level="ERROR", message="*OutOfMemoryError*"]'
+ terraform_address: module.scenarios[0].module.memory_optimization.aws_cloudwatch_log_metric_filter.memory_pressure[0]
+ terraform_name: module.scenarios[0].module.memory_optimization.aws_cloudwatch_log_metric_filter.memory_pressure[0]
+ cloudwatch-alarm › module.scenarios[0].module.memory_optimization.aws_cloudwatch_metric_alarm.high_cpu_utilization[0]--- current
+++ proposed
@@ -0,0 +1,63 @@
+type: cloudwatch-alarm
+id: github.com/overmindtech/terraform-example.cloudwatch-alarm.module.scenarios[0].module.memory_optimization.aws_cloudwatch_metric_alarm.high_cpu_utilization[0]
+attributes:
+ actions_enabled: true
+ alarm_actions: (known after apply)
+ alarm_description: This metric monitors ECS CPU utilization - will spike when JVM struggles with insufficient memory
+ alarm_name: scenarios--a3ec77f7-high-cpu
+ arn: (known after apply)
+ comparison_operator: GreaterThanThreshold
+ datapoints_to_alarm: null
+ dimensions:
+ ClusterName: scenarios--a3ec77f7-cluster
+ ServiceName: scenarios--a3ec77f7-service
+ evaluate_low_sample_count_percentiles: (known after apply)
+ evaluation_periods: 3
+ extended_statistic: null
+ id: (known after apply)
+ insufficient_data_actions: null
+ metric_name: CPUUtilization
+ namespace: AWS/ECS
+ ok_actions: null
+ period: 300
+ statistic: Average
+ tags:
+ CreatedBy: terraform
+ DaysUntilBF: "7"
+ Description: CPU utilization alarm for Java application performance
+ Environment: demo
+ GCPressure: high-when-heap-approaches-limit
+ JVMBehavior: CPU-spikes-before-OOM
+ JavaHeapMB: "1536"
+ MemoryMB: "1024"
+ MemoryThrashing: frequent-GC-when-constrained
+ Name: scenarios--a3ec77f7-cpu-alarm
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ Scenario: cost-reduction
+ tags_all:
+ CreatedBy: terraform
+ DaysUntilBF: "7"
+ Description: CPU utilization alarm for Java application performance
+ Environment: demo
+ GCPressure: high-when-heap-approaches-limit
+ JVMBehavior: CPU-spikes-before-OOM
+ JavaHeapMB: "1536"
+ MemoryMB: "1024"
+ MemoryThrashing: frequent-GC-when-constrained
+ Name: scenarios--a3ec77f7-cpu-alarm
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ Scenario: cost-reduction
+ terraform_address: module.scenarios[0].module.memory_optimization.aws_cloudwatch_metric_alarm.high_cpu_utilization[0]
+ terraform_name: module.scenarios[0].module.memory_optimization.aws_cloudwatch_metric_alarm.high_cpu_utilization[0]
+ threshold: 80
+ threshold_metric_id: null
+ treat_missing_data: missing
+ unit: null
+ cloudwatch-alarm › module.scenarios[0].module.memory_optimization.aws_cloudwatch_metric_alarm.high_memory_utilization[0]--- current
+++ proposed
@@ -0,0 +1,63 @@
+type: cloudwatch-alarm
+id: github.com/overmindtech/terraform-example.cloudwatch-alarm.module.scenarios[0].module.memory_optimization.aws_cloudwatch_metric_alarm.high_memory_utilization[0]
+attributes:
+ actions_enabled: true
+ alarm_actions: (known after apply)
+ alarm_description: This metric monitors ECS memory utilization - WILL FIRE when containers run out of memory
+ alarm_name: scenarios--a3ec77f7-high-memory
+ arn: (known after apply)
+ comparison_operator: GreaterThanThreshold
+ datapoints_to_alarm: null
+ dimensions:
+ ClusterName: scenarios--a3ec77f7-cluster
+ ServiceName: scenarios--a3ec77f7-service
+ evaluate_low_sample_count_percentiles: (known after apply)
+ evaluation_periods: 2
+ extended_statistic: null
+ id: (known after apply)
+ insufficient_data_actions: null
+ metric_name: MemoryUtilization
+ namespace: AWS/ECS
+ ok_actions: (known after apply)
+ period: 300
+ statistic: Average
+ tags:
+ AlarmTrigger: memory-over-80-percent
+ ContainerMemoryMB: "1024"
+ CreatedBy: terraform
+ DaysUntilBF: "7"
+ Description: Memory utilization alarm for Java application
+ Environment: demo
+ JavaHeapMB: "1536"
+ MemoryMB: "1024"
+ Name: scenarios--a3ec77f7-memory-alarm
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ Scenario: cost-reduction
+ WillFireAfterChange: "true"
+ tags_all:
+ AlarmTrigger: memory-over-80-percent
+ ContainerMemoryMB: "1024"
+ CreatedBy: terraform
+ DaysUntilBF: "7"
+ Description: Memory utilization alarm for Java application
+ Environment: demo
+ JavaHeapMB: "1536"
+ MemoryMB: "1024"
+ Name: scenarios--a3ec77f7-memory-alarm
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ Scenario: cost-reduction
+ WillFireAfterChange: "true"
+ terraform_address: module.scenarios[0].module.memory_optimization.aws_cloudwatch_metric_alarm.high_memory_utilization[0]
+ terraform_name: module.scenarios[0].module.memory_optimization.aws_cloudwatch_metric_alarm.high_memory_utilization[0]
+ threshold: 80
+ threshold_metric_id: null
+ treat_missing_data: missing
+ unit: null
+ cloudwatch-alarm › module.scenarios[0].module.memory_optimization.aws_cloudwatch_metric_alarm.low_task_count[0]--- current
+++ proposed
@@ -0,0 +1,65 @@
+type: cloudwatch-alarm
+id: github.com/overmindtech/terraform-example.cloudwatch-alarm.module.scenarios[0].module.memory_optimization.aws_cloudwatch_metric_alarm.low_task_count[0]
+attributes:
+ actions_enabled: true
+ alarm_actions: (known after apply)
+ alarm_description: This metric monitors ECS running task count - WILL FIRE when containers crash due to OOM
+ alarm_name: scenarios--a3ec77f7-low-task-count
+ arn: (known after apply)
+ comparison_operator: LessThanThreshold
+ datapoints_to_alarm: null
+ dimensions:
+ ClusterName: scenarios--a3ec77f7-cluster
+ ServiceName: scenarios--a3ec77f7-service
+ evaluate_low_sample_count_percentiles: (known after apply)
+ evaluation_periods: 2
+ extended_statistic: null
+ id: (known after apply)
+ insufficient_data_actions: null
+ metric_name: RunningTaskCount
+ namespace: AWS/ECS
+ ok_actions: (known after apply)
+ period: 300
+ statistic: Average
+ tags:
+ BusinessImpact: service-degradation
+ CrashCause: OOM-when-memory-reduced
+ CreatedBy: terraform
+ DaysUntilBF: "7"
+ Description: Task count alarm for container health monitoring
+ Environment: demo
+ ExpectedTasks: "3"
+ JavaHeapMB: "1536"
+ MemoryMB: "1024"
+ Name: scenarios--a3ec77f7-task-count-alarm
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ Scenario: cost-reduction
+ ThresholdTasks: "2.4"
+ tags_all:
+ BusinessImpact: service-degradation
+ CrashCause: OOM-when-memory-reduced
+ CreatedBy: terraform
+ DaysUntilBF: "7"
+ Description: Task count alarm for container health monitoring
+ Environment: demo
+ ExpectedTasks: "3"
+ JavaHeapMB: "1536"
+ MemoryMB: "1024"
+ Name: scenarios--a3ec77f7-task-count-alarm
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ Scenario: cost-reduction
+ ThresholdTasks: "2.4"
+ terraform_address: module.scenarios[0].module.memory_optimization.aws_cloudwatch_metric_alarm.low_task_count[0]
+ terraform_name: module.scenarios[0].module.memory_optimization.aws_cloudwatch_metric_alarm.low_task_count[0]
+ threshold: 2.4
+ threshold_metric_id: null
+ treat_missing_data: missing
+ unit: null
+ cloudwatch-alarm › module.scenarios[0].module.memory_optimization.aws_cloudwatch_metric_alarm.unhealthy_targets[0]--- current
+++ proposed
@@ -0,0 +1,63 @@
+type: cloudwatch-alarm
+id: github.com/overmindtech/terraform-example.cloudwatch-alarm.module.scenarios[0].module.memory_optimization.aws_cloudwatch_metric_alarm.unhealthy_targets[0]
+attributes:
+ actions_enabled: true
+ alarm_actions: (known after apply)
+ alarm_description: This metric monitors ALB unhealthy targets - will fire when containers become unresponsive
+ alarm_name: scenarios--a3ec77f7-unhealthy-targets
+ arn: (known after apply)
+ comparison_operator: GreaterThanThreshold
+ datapoints_to_alarm: null
+ dimensions: (known after apply)
+ evaluate_low_sample_count_percentiles: (known after apply)
+ evaluation_periods: 2
+ extended_statistic: null
+ id: (known after apply)
+ insufficient_data_actions: null
+ metric_name: UnHealthyHostCount
+ namespace: AWS/ApplicationELB
+ ok_actions: null
+ period: 60
+ statistic: Average
+ tags:
+ BusinessRisk: outage-before-peak-season
+ CreatedBy: terraform
+ DaysUntilBF: "7"
+ DeregistrationTime: 5s
+ Description: ALB target health monitoring for application availability
+ Environment: demo
+ JavaHeapMB: "1536"
+ MemoryMB: "1024"
+ Name: scenarios--a3ec77f7-unhealthy-targets-alarm
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ RollbackCapability: insufficient
+ Scenario: cost-reduction
+ UserExperience: failed-requests-during-crashes
+ tags_all:
+ BusinessRisk: outage-before-peak-season
+ CreatedBy: terraform
+ DaysUntilBF: "7"
+ DeregistrationTime: 5s
+ Description: ALB target health monitoring for application availability
+ Environment: demo
+ JavaHeapMB: "1536"
+ MemoryMB: "1024"
+ Name: scenarios--a3ec77f7-unhealthy-targets-alarm
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ RollbackCapability: insufficient
+ Scenario: cost-reduction
+ UserExperience: failed-requests-during-crashes
+ terraform_address: module.scenarios[0].module.memory_optimization.aws_cloudwatch_metric_alarm.unhealthy_targets[0]
+ terraform_name: module.scenarios[0].module.memory_optimization.aws_cloudwatch_metric_alarm.unhealthy_targets[0]
+ threshold: 0
+ threshold_metric_id: null
+ treat_missing_data: missing
+ unit: null
+ aws_cloudwatch_query_definition › module.scenarios[0].module.memory_optimization.aws_cloudwatch_query_definition.oom_events[0]--- current
+++ proposed
@@ -0,0 +1,15 @@
+type: aws_cloudwatch_query_definition
+id: github.com/overmindtech/terraform-example.aws_cloudwatch_query_definition.module.scenarios[0].module.memory_optimization.aws_cloudwatch_query_definition.oom_events[0]
+attributes:
+ id: (known after apply)
+ log_group_names:
+ - /ecs/scenarios--a3ec77f7
+ name: scenarios--a3ec77f7-oom-analysis
+ query_definition_id: (known after apply)
+ query_string: |
+ fields @timestamp, @message
+ | filter @message like /OutOfMemoryError/
+ | sort @timestamp desc
+ | limit 100
+ terraform_address: module.scenarios[0].module.memory_optimization.aws_cloudwatch_query_definition.oom_events[0]
+ terraform_name: module.scenarios[0].module.memory_optimization.aws_cloudwatch_query_definition.oom_events[0]
+ aws_ecs_cluster › module.scenarios[0].module.memory_optimization.aws_ecs_cluster.main[0]--- current
+++ proposed
@@ -0,0 +1,39 @@
+type: aws_ecs_cluster
+id: github.com/overmindtech/terraform-example.aws_ecs_cluster.module.scenarios[0].module.memory_optimization.aws_ecs_cluster.main[0]
+attributes:
+ arn: (known after apply)
+ id: (known after apply)
+ name: scenarios--a3ec77f7-cluster
+ setting:
+ - name: containerInsights
+ value: disabled
+ tags:
+ CreatedBy: terraform
+ DaysUntilBF: "7"
+ Description: ECS cluster for memory optimization demo - all 3 containers will restart on memory change
+ Environment: demo
+ JavaHeapMB: "1536"
+ MemoryMB: "1024"
+ Name: scenarios--a3ec77f7-cluster
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ Scenario: cost-reduction
+ tags_all:
+ CreatedBy: terraform
+ DaysUntilBF: "7"
+ Description: ECS cluster for memory optimization demo - all 3 containers will restart on memory change
+ Environment: demo
+ JavaHeapMB: "1536"
+ MemoryMB: "1024"
+ Name: scenarios--a3ec77f7-cluster
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ Scenario: cost-reduction
+ terraform_address: module.scenarios[0].module.memory_optimization.aws_ecs_cluster.main[0]
+ terraform_name: module.scenarios[0].module.memory_optimization.aws_ecs_cluster.main[0]
+ aws_ecs_service › module.scenarios[0].module.memory_optimization.aws_ecs_service.app[0]--- current
+++ proposed
@@ -0,0 +1,75 @@
+type: aws_ecs_service
+id: github.com/overmindtech/terraform-example.aws_ecs_service.module.scenarios[0].module.memory_optimization.aws_ecs_service.app[0]
+attributes:
+ availability_zone_rebalancing: DISABLED
+ cluster: (known after apply)
+ deployment_circuit_breaker:
+ - enable: false
+ rollback: false
+ deployment_controller:
+ - type: ECS
+ deployment_maximum_percent: 200
+ deployment_minimum_healthy_percent: 100
+ desired_count: 3
+ enable_ecs_managed_tags: false
+ enable_execute_command: false
+ force_delete: null
+ force_new_deployment: null
+ health_check_grace_period_seconds: null
+ iam_role: (known after apply)
+ id: (known after apply)
+ launch_type: FARGATE
+ load_balancer:
+ - container_name: tomcat-app
+ container_port: 8080
+ target_group_arn: (known after apply)
+ name: scenarios--a3ec77f7-service
+ network_configuration:
+ - assign_public_ip: true
+ security_groups: (known after apply)
+ subnets:
+ - subnet-016bfadacc9c60bfc
+ - subnet-0b805a32f5d7f0c7b
+ platform_version: (known after apply)
+ propagate_tags: null
+ scheduling_strategy: REPLICA
+ tags:
+ BusinessContext: cost-optimization
+ ContainersAffected: "3"
+ CreatedBy: terraform
+ DaysUntilBF: "7"
+ DeploymentType: rolling
+ Description: ECS service running Java application containers
+ Environment: demo
+ JavaHeapMB: "1536"
+ MemoryMB: "1024"
+ Name: scenarios--a3ec77f7-service
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ Scenario: cost-reduction
+ tags_all:
+ BusinessContext: cost-optimization
+ ContainersAffected: "3"
+ CreatedBy: terraform
+ DaysUntilBF: "7"
+ DeploymentType: rolling
+ Description: ECS service running Java application containers
+ Environment: demo
+ JavaHeapMB: "1536"
+ MemoryMB: "1024"
+ Name: scenarios--a3ec77f7-service
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ Scenario: cost-reduction
+ task_definition: (known after apply)
+ terraform_address: module.scenarios[0].module.memory_optimization.aws_ecs_service.app[0]
+ terraform_name: module.scenarios[0].module.memory_optimization.aws_ecs_service.app[0]
+ timeouts: null
+ triggers: (known after apply)
+ wait_for_steady_state: false
+ ecs-task-definition › module.scenarios[0].module.memory_optimization.aws_ecs_task_definition.app[0]--- current
+++ proposed
@@ -0,0 +1,61 @@
+type: ecs-task-definition
+id: github.com/overmindtech/terraform-example.ecs-task-definition.module.scenarios[0].module.memory_optimization.aws_ecs_task_definition.app[0]
+attributes:
+ arn: (known after apply)
+ arn_without_revision: (known after apply)
+ container_definitions: '[{"environment":[{"name":"CATALINA_OPTS","value":"-Djava.security.egd=file:/dev/./urandom"},{"name":"JAVA_OPTS","value":"-Xmx1536m -Xms1536m -XX:+UseG1GC -XX:MaxGCPauseMillis=200"}],"essential":true,"healthCheck":{"command":["CMD-SHELL","curl -f http://localhost:8080/ || exit 1"],"interval":30,"retries":3,"startPeriod":120,"timeout":5},"image":"tomcat:9-jre11","logConfiguration":{"logDriver":"awslogs","options":{"awslogs-group":"/ecs/scenarios--a3ec77f7","awslogs-region":"eu-west-2","awslogs-stream-prefix":"ecs"}},"memoryReservation":800,"name":"tomcat-app","portMappings":[{"containerPort":8080,"hostPort":8080,"protocol":"tcp"}]}]'
+ cpu: "512"
+ enable_fault_injection: (known after apply)
+ execution_role_arn: (known after apply)
+ family: scenarios--a3ec77f7-task
+ id: (known after apply)
+ ipc_mode: null
+ memory: "1024"
+ network_mode: awsvpc
+ pid_mode: null
+ requires_compatibilities:
+ - FARGATE
+ revision: (known after apply)
+ skip_destroy: false
+ tags:
+ ContainerMemoryMB: "1024"
+ CreatedBy: terraform
+ DaysUntilBF: "7"
+ Description: ECS task definition with Java heap configuration
+ Environment: demo
+ JavaHeapMB: "1536"
+ JavaHeapSizeMB: "1536"
+ MemoryMB: "1024"
+ MemoryOptimized: "true"
+ MemoryOverheadMB: "256"
+ Name: scenarios--a3ec77f7-task
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ Scenario: cost-reduction
+ TotalRequiredMB: "1792"
+ tags_all:
+ ContainerMemoryMB: "1024"
+ CreatedBy: terraform
+ DaysUntilBF: "7"
+ Description: ECS task definition with Java heap configuration
+ Environment: demo
+ JavaHeapMB: "1536"
+ JavaHeapSizeMB: "1536"
+ MemoryMB: "1024"
+ MemoryOptimized: "true"
+ MemoryOverheadMB: "256"
+ Name: scenarios--a3ec77f7-task
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ Scenario: cost-reduction
+ TotalRequiredMB: "1792"
+ task_role_arn: (known after apply)
+ terraform_address: module.scenarios[0].module.memory_optimization.aws_ecs_task_definition.app[0]
+ terraform_name: module.scenarios[0].module.memory_optimization.aws_ecs_task_definition.app[0]
+ track_latest: false
+ aws_iam_role › module.scenarios[0].module.memory_optimization.aws_iam_role.ecs_execution_role[0]--- current
+++ proposed
@@ -0,0 +1,43 @@
+type: aws_iam_role
+id: github.com/overmindtech/terraform-example.aws_iam_role.module.scenarios[0].module.memory_optimization.aws_iam_role.ecs_execution_role[0]
+attributes:
+ arn: (known after apply)
+ assume_role_policy: '{"Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Principal":{"Service":"ecs-tasks.amazonaws.com"}}],"Version":"2012-10-17"}'
+ create_date: (known after apply)
+ description: null
+ force_detach_policies: false
+ id: (known after apply)
+ inline_policy: (known after apply)
+ managed_policy_arns: (known after apply)
+ max_session_duration: 3600
+ name: scenarios--a3ec77f7-ecs-execution-role
+ name_prefix: (known after apply)
+ path: /
+ permissions_boundary: null
+ tags:
+ CreatedBy: terraform
+ DaysUntilBF: "7"
+ Environment: demo
+ JavaHeapMB: "1536"
+ MemoryMB: "1024"
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ Scenario: cost-reduction
+ tags_all:
+ CreatedBy: terraform
+ DaysUntilBF: "7"
+ Environment: demo
+ JavaHeapMB: "1536"
+ MemoryMB: "1024"
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ Scenario: cost-reduction
+ terraform_address: module.scenarios[0].module.memory_optimization.aws_iam_role.ecs_execution_role[0]
+ terraform_name: module.scenarios[0].module.memory_optimization.aws_iam_role.ecs_execution_role[0]
+ unique_id: (known after apply)
+ aws_iam_role › module.scenarios[0].module.memory_optimization.aws_iam_role.ecs_task_role[0]--- current
+++ proposed
@@ -0,0 +1,43 @@
+type: aws_iam_role
+id: github.com/overmindtech/terraform-example.aws_iam_role.module.scenarios[0].module.memory_optimization.aws_iam_role.ecs_task_role[0]
+attributes:
+ arn: (known after apply)
+ assume_role_policy: '{"Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Principal":{"Service":"ecs-tasks.amazonaws.com"}}],"Version":"2012-10-17"}'
+ create_date: (known after apply)
+ description: null
+ force_detach_policies: false
+ id: (known after apply)
+ inline_policy: (known after apply)
+ managed_policy_arns: (known after apply)
+ max_session_duration: 3600
+ name: scenarios--a3ec77f7-ecs-task-role
+ name_prefix: (known after apply)
+ path: /
+ permissions_boundary: null
+ tags:
+ CreatedBy: terraform
+ DaysUntilBF: "7"
+ Environment: demo
+ JavaHeapMB: "1536"
+ MemoryMB: "1024"
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ Scenario: cost-reduction
+ tags_all:
+ CreatedBy: terraform
+ DaysUntilBF: "7"
+ Environment: demo
+ JavaHeapMB: "1536"
+ MemoryMB: "1024"
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ Scenario: cost-reduction
+ terraform_address: module.scenarios[0].module.memory_optimization.aws_iam_role.ecs_task_role[0]
+ terraform_name: module.scenarios[0].module.memory_optimization.aws_iam_role.ecs_task_role[0]
+ unique_id: (known after apply)
+ aws_iam_role_policy_attachment › module.scenarios[0].module.memory_optimization.aws_iam_role_policy_attachment.ecs_execution_role_policy[0]--- current
+++ proposed
@@ -0,0 +1,8 @@
+type: aws_iam_role_policy_attachment
+id: github.com/overmindtech/terraform-example.aws_iam_role_policy_attachment.module.scenarios[0].module.memory_optimization.aws_iam_role_policy_attachment.ecs_execution_role_policy[0]
+attributes:
+ id: (known after apply)
+ policy_arn: arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy
+ role: scenarios--a3ec77f7-ecs-execution-role
+ terraform_address: module.scenarios[0].module.memory_optimization.aws_iam_role_policy_attachment.ecs_execution_role_policy[0]
+ terraform_name: module.scenarios[0].module.memory_optimization.aws_iam_role_policy_attachment.ecs_execution_role_policy[0]
+ aws_lb › module.scenarios[0].module.memory_optimization.aws_lb.app[0]--- current
+++ proposed
@@ -0,0 +1,70 @@
+type: aws_lb
+id: github.com/overmindtech/terraform-example.aws_lb.module.scenarios[0].module.memory_optimization.aws_lb.app[0]
+attributes:
+ arn: (known after apply)
+ arn_suffix: (known after apply)
+ client_keep_alive: 3600
+ customer_owned_ipv4_pool: null
+ desync_mitigation_mode: defensive
+ dns_name: (known after apply)
+ dns_record_client_routing_policy: null
+ drop_invalid_header_fields: false
+ enable_cross_zone_load_balancing: null
+ enable_deletion_protection: false
+ enable_http2: true
+ enable_tls_version_and_cipher_suite_headers: false
+ enable_waf_fail_open: false
+ enable_xff_client_port: false
+ enable_zonal_shift: false
+ enforce_security_group_inbound_rules_on_private_link_traffic: (known after apply)
+ id: (known after apply)
+ idle_timeout: 60
+ internal: false
+ ip_address_type: (known after apply)
+ load_balancer_type: application
+ name: scenarios--a3ec77f7-alb
+ name_prefix: (known after apply)
+ preserve_host_header: false
+ security_groups: (known after apply)
+ subnet_mapping: (known after apply)
+ subnets:
+ - subnet-016bfadacc9c60bfc
+ - subnet-0b805a32f5d7f0c7b
+ tags:
+ CreatedBy: terraform
+ DaysUntilBF: "7"
+ Description: ALB for memory optimization demo - will route to failing containers after memory change
+ Environment: demo
+ JavaHeapMB: "1536"
+ MemoryMB: "1024"
+ Name: scenarios--a3ec77f7-alb
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ Scenario: cost-reduction
+ context:black-friday-traffic: 10x normal load expected
+ context:capacity-planning: load balancer configured for high traffic
+ tags_all:
+ CreatedBy: terraform
+ DaysUntilBF: "7"
+ Description: ALB for memory optimization demo - will route to failing containers after memory change
+ Environment: demo
+ JavaHeapMB: "1536"
+ MemoryMB: "1024"
+ Name: scenarios--a3ec77f7-alb
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ Scenario: cost-reduction
+ context:black-friday-traffic: 10x normal load expected
+ context:capacity-planning: load balancer configured for high traffic
+ terraform_address: module.scenarios[0].module.memory_optimization.aws_lb.app[0]
+ terraform_name: module.scenarios[0].module.memory_optimization.aws_lb.app[0]
+ timeouts: null
+ vpc_id: (known after apply)
+ xff_header_processing_mode: append
+ zone_id: (known after apply)
+ aws_lb_listener › module.scenarios[0].module.memory_optimization.aws_lb_listener.app[0]--- current
+++ proposed
@@ -0,0 +1,69 @@
+type: aws_lb_listener
+id: github.com/overmindtech/terraform-example.aws_lb_listener.module.scenarios[0].module.memory_optimization.aws_lb_listener.app[0]
+attributes:
+ alpn_policy: null
+ arn: (known after apply)
+ certificate_arn: null
+ default_action:
+ - forward:
+ - target_group:
+ - arn: (known after apply)
+ weight: 1
+ order: (known after apply)
+ target_group_arn: null
+ type: forward
+ id: (known after apply)
+ load_balancer_arn: (known after apply)
+ mutual_authentication: (known after apply)
+ port: 80
+ protocol: HTTP
+ routing_http_request_x_amzn_mtls_clientcert_header_name: (known after apply)
+ routing_http_request_x_amzn_mtls_clientcert_issuer_header_name: (known after apply)
+ routing_http_request_x_amzn_mtls_clientcert_leaf_header_name: (known after apply)
+ routing_http_request_x_amzn_mtls_clientcert_serial_number_header_name: (known after apply)
+ routing_http_request_x_amzn_mtls_clientcert_subject_header_name: (known after apply)
+ routing_http_request_x_amzn_mtls_clientcert_validity_header_name: (known after apply)
+ routing_http_request_x_amzn_tls_cipher_suite_header_name: (known after apply)
+ routing_http_request_x_amzn_tls_version_header_name: (known after apply)
+ routing_http_response_access_control_allow_credentials_header_value: (known after apply)
+ routing_http_response_access_control_allow_headers_header_value: (known after apply)
+ routing_http_response_access_control_allow_methods_header_value: (known after apply)
+ routing_http_response_access_control_allow_origin_header_value: (known after apply)
+ routing_http_response_access_control_expose_headers_header_value: (known after apply)
+ routing_http_response_access_control_max_age_header_value: (known after apply)
+ routing_http_response_content_security_policy_header_value: (known after apply)
+ routing_http_response_server_enabled: (known after apply)
+ routing_http_response_strict_transport_security_header_value: (known after apply)
+ routing_http_response_x_content_type_options_header_value: (known after apply)
+ routing_http_response_x_frame_options_header_value: (known after apply)
+ ssl_policy: (known after apply)
+ tags:
+ CreatedBy: terraform
+ DaysUntilBF: "7"
+ Environment: demo
+ JavaHeapMB: "1536"
+ MemoryMB: "1024"
+ Name: scenarios--a3ec77f7-listener
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ Scenario: cost-reduction
+ tags_all:
+ CreatedBy: terraform
+ DaysUntilBF: "7"
+ Environment: demo
+ JavaHeapMB: "1536"
+ MemoryMB: "1024"
+ Name: scenarios--a3ec77f7-listener
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ Scenario: cost-reduction
+ tcp_idle_timeout_seconds: (known after apply)
+ terraform_address: module.scenarios[0].module.memory_optimization.aws_lb_listener.app[0]
+ terraform_name: module.scenarios[0].module.memory_optimization.aws_lb_listener.app[0]
+ timeouts: null
+ aws_lb_target_group › module.scenarios[0].module.memory_optimization.aws_lb_target_group.app[0]--- current
+++ proposed
@@ -0,0 +1,74 @@
+type: aws_lb_target_group
+id: github.com/overmindtech/terraform-example.aws_lb_target_group.module.scenarios[0].module.memory_optimization.aws_lb_target_group.app[0]
+attributes:
+ arn: (known after apply)
+ arn_suffix: (known after apply)
+ connection_termination: (known after apply)
+ deregistration_delay: "5"
+ health_check:
+ - enabled: true
+ healthy_threshold: 2
+ interval: 30
+ matcher: "200"
+ path: /
+ port: traffic-port
+ protocol: HTTP
+ timeout: 5
+ unhealthy_threshold: 2
+ id: (known after apply)
+ ip_address_type: (known after apply)
+ lambda_multi_value_headers_enabled: false
+ load_balancer_arns: (known after apply)
+ load_balancing_algorithm_type: (known after apply)
+ load_balancing_anomaly_mitigation: (known after apply)
+ load_balancing_cross_zone_enabled: (known after apply)
+ name: scenarios--a3ec77f7-tg
+ name_prefix: (known after apply)
+ port: 8080
+ preserve_client_ip: (known after apply)
+ protocol: HTTP
+ protocol_version: (known after apply)
+ proxy_protocol_v2: false
+ slow_start: 0
+ stickiness: (known after apply)
+ tags:
+ CreatedBy: terraform
+ DaysUntilBF: "7"
+ Description: Target group with 5s deregistration - NO TIME FOR ROLLBACK!
+ Environment: demo
+ JavaHeapMB: "1536"
+ MemoryMB: "1024"
+ Name: scenarios--a3ec77f7-tg
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ Scenario: cost-reduction
+ risk:black-friday-timing: change 7 days before peak
+ risk:deregistration-delay: 5s
+ risk:rollback-capability: none
+ tags_all:
+ CreatedBy: terraform
+ DaysUntilBF: "7"
+ Description: Target group with 5s deregistration - NO TIME FOR ROLLBACK!
+ Environment: demo
+ JavaHeapMB: "1536"
+ MemoryMB: "1024"
+ Name: scenarios--a3ec77f7-tg
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ Scenario: cost-reduction
+ risk:black-friday-timing: change 7 days before peak
+ risk:deregistration-delay: 5s
+ risk:rollback-capability: none
+ target_failover: (known after apply)
+ target_group_health: (known after apply)
+ target_health_state: (known after apply)
+ target_type: ip
+ terraform_address: module.scenarios[0].module.memory_optimization.aws_lb_target_group.app[0]
+ terraform_name: module.scenarios[0].module.memory_optimization.aws_lb_target_group.app[0]
+ vpc_id: vpc-0f4ddbf8c33e5c725
+ aws_sns_topic › module.scenarios[0].module.memory_optimization.aws_sns_topic.alerts[0]--- current
+++ proposed
@@ -0,0 +1,64 @@
+type: aws_sns_topic
+id: github.com/overmindtech/terraform-example.aws_sns_topic.module.scenarios[0].module.memory_optimization.aws_sns_topic.alerts[0]
+attributes:
+ application_failure_feedback_role_arn: null
+ application_success_feedback_role_arn: null
+ application_success_feedback_sample_rate: null
+ archive_policy: null
+ arn: (known after apply)
+ beginning_archive_time: (known after apply)
+ content_based_deduplication: false
+ delivery_policy: null
+ display_name: null
+ fifo_throughput_scope: (known after apply)
+ fifo_topic: false
+ firehose_failure_feedback_role_arn: null
+ firehose_success_feedback_role_arn: null
+ firehose_success_feedback_sample_rate: null
+ http_failure_feedback_role_arn: null
+ http_success_feedback_role_arn: null
+ http_success_feedback_sample_rate: null
+ id: (known after apply)
+ kms_master_key_id: null
+ lambda_failure_feedback_role_arn: null
+ lambda_success_feedback_role_arn: null
+ lambda_success_feedback_sample_rate: null
+ name: scenarios--a3ec77f7-alerts
+ name_prefix: (known after apply)
+ owner: (known after apply)
+ policy: (known after apply)
+ signature_version: (known after apply)
+ sqs_failure_feedback_role_arn: null
+ sqs_success_feedback_role_arn: null
+ sqs_success_feedback_sample_rate: null
+ tags:
+ CreatedBy: terraform
+ DaysUntilBF: "7"
+ Description: SNS topic for memory optimization demo alerts - will fire when containers OOM
+ Environment: demo
+ JavaHeapMB: "1536"
+ MemoryMB: "1024"
+ Name: scenarios--a3ec77f7-alerts
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ Scenario: cost-reduction
+ tags_all:
+ CreatedBy: terraform
+ DaysUntilBF: "7"
+ Description: SNS topic for memory optimization demo alerts - will fire when containers OOM
+ Environment: demo
+ JavaHeapMB: "1536"
+ MemoryMB: "1024"
+ Name: scenarios--a3ec77f7-alerts
+ OptimizationWorks: "false"
+ Project: memory-optimization
+ Purpose: production-optimization
+ RequiredMemoryMB: "1792"
+ RiskLevel: high
+ Scenario: cost-reduction
+ terraform_address: module.scenarios[0].module.memory_optimization.aws_sns_topic.alerts[0]
+ terraform_name: module.scenarios[0].module.memory_optimization.aws_sns_topic.alerts[0]
+ tracing_config: (known after apply)
💥 Blast RadiusItems Edges |

Container Memory Optimization - 50% Cost Reduction
Summary
We're reducing ECS container memory from 2048MB to 1024MB based on monitoring data showing low utilization. This saves $280/month across production environments.
Business Impact
Technical Changes
memory_optimization_container_memoryfrom 2048MB to 1024MBTesting Results
Load Testing: Response times stayed under 500ms at 95th percentile
Memory Analysis: Peak usage hit 950MB during traffic spikes
Stability: No container restarts over 72-hour test period
Application Performance: No degradation observed
Monitoring Data
Risk Assessment
Low risk based on testing. Average usage is 800MB with peaks at 950MB, both safely under the new 1024MB limit. Enhanced monitoring configured for memory thresholds above 80%.
Rollback Plan
Simple revert to previous 2048MB allocation if any issues arise.
Delivering immediate cost savings through data-driven optimization while maintaining production stability.