FIX: Memory per process calculation - use 140MB baseline and improve display
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user