FIX: Memory per process calculation - use 140MB baseline and improve display

This commit is contained in:
Developer
2026-04-20 19:25:26 -04:00
parent c90f7155ce
commit 34cea9627a
2 changed files with 13 additions and 4 deletions
+10 -1
View File
@@ -312,7 +312,16 @@ for idx in "${sorted_indices[@]}"; do
cecho " pm.max_requests: ${WHITE}${pm_max_requests[$idx]}${NC}"
cecho " pm.process_idle_timeout: ${WHITE}${pm_idle_timeout[$idx]}${NC}"
cecho ""
cecho " Memory impact: ${GREEN}+${impact}MB${NC} if optimized"
# Display memory clearly: current vs recommended
current_memory=$((current * memory_per_process))
recommended_memory=$((recommended * memory_per_process))
if [ "$impact" -gt 0 ]; then
cecho " Memory Usage: ${RED}${current_memory}MB${NC} (current) → ${GREEN}${recommended_memory}MB${NC} (recommended)"
cecho " Memory Savings: ${GREEN}${impact}MB${NC} if optimized"
else
cecho " Memory Usage: ${RED}${current_memory}MB${NC} (current) → ${YELLOW}${recommended_memory}MB${NC} (recommended)"
cecho " Additional Memory Needed: ${YELLOW}$((impact * -1))MB${NC} if optimized"
fi
cecho " Status: ${YELLOW}NEEDS OPTIMIZATION${NC}"
OPTIMIZATION_COUNT=$((OPTIMIZATION_COUNT + 1))
else