Linux Apache2 内存优化实操指南
一 基线评估与上限计算
二 MPM 关键参数建议
三 连接与会话优化
四 模块精简与内核网络调优
五 快速配置示例
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxRequestWorkers 90
MaxConnectionsPerChild 1000
</IfModule>
KeepAlive On
KeepAliveTimeout 5
MaxKeepAliveRequests 75
HostnameLookups Off
<IfModule mpm_event_module>
StartServers 2
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 25
MaxRequestWorkers 256
MaxConnectionsPerChild 1000
</IfModule>
KeepAlive On
KeepAliveTimeout 5
MaxKeepAliveRequests 75
HostnameLookups Off