mario@h1637309:~/check-httpd-limits$ sudo ./check_httpd_limits.pl --exe=/opt/apa che2/bin/httpd
[sudo] password for mario:
OK: AllProcsTotal (263.99 MB) fits within available RAM (MemTotal 2048.00 MB).
mario@h1637309:~/check-httpd-limits$ sudo ./check_httpd_limits.pl --exe=/opt/apache2/bin/httpd --verbose
Check Apache Httpd Process Limits (Version 2.2)
by Jean-Sebastien Morisset - http://surniaulula.com/
Httpd Binary
- CONFIG : /opt/apache2/conf/httpd.conf
- EXE : /opt/apache2/bin/httpd
- MPM : event
- ROOT : /opt/apache2
- VERSION : 2.4
Httpd Processes
- PID 1405 (httpd) : 3.46 MB / 0.61 MB shared
- PID 1406 (httpd) : 3.33 MB / 0.60 MB shared
- PID 1407 (httpd) : 8.23 MB / 2.63 MB shared
- PID 1410 (httpd) : 10.35 MB / 2.70 MB shared
- PID 1412 (httpd) : 15.27 MB / 4.31 MB shared
- PID 7772 (httpd) : 7.52 MB / 4.79 MB shared [excluded from averages]
- HttpdRealAvg : 8.44 MB [excludes shared]
- HttpdSharedAvg : 3.23 MB
- HttpdRealTot : 32.51 MB [excludes shared]
Httpd Config
- MaxConnectionsPerChild: 0
- MaxRequestWorkers : 400
- MaxSpareThreads : 250
- MinSpareThreads : 75
- ServerLimit : 16
- StartServers : 3
- ThreadsPerChild : 25
Server Memory
- Cached : 0.00 MB
- MemFree : 1886.92 MB
- MemTotal : 2048.00 MB
- SwapFree : 0.00 MB
- SwapTotal : 0.00 MB
Summary
- NonHttpdProcs : 125.34 MB (MemTotal - Cached - MemFree - HttpdRealTot - HttpdSharedAvg)
- FreeWithoutHttpd : 1922.66 MB (MemFree + Cached + HttpdRealTot + HttpdSharedAvg)
- MaxHttpdProcs : 138.27 MB (HttpdRealAvg * ServerLimit + HttpdSharedAvg)
- AllProcsTotal : 263.61 MB (NonHttpdProcs + MaxHttpdProcs)
Possible Changes
MaxConnectionsPerChild 0 # (no change) Default is 0
MaxRequestWorkers 5695 # (400 -> 5695) ServerLimit * ThreadsPerChild
MaxSpareThreads 250 # (no change) Default is 250
MinSpareThreads 75 # (no change) Default is 75
ServerLimit 228 # (16 -> 228) (MemFree + Cached + HttpdRealTot + HttpdSharedAvg) / HttpdRealAvg
StartServers 3 # (no change) Default is 3
ThreadsPerChild 25 # (no change) Default is 25
Result
OK: AllProcsTotal (263.61 MB) fits within available RAM (MemTotal 2048.00 MB).
mario@h1637309:~/check-httpd-limits$ cat /opt/apache2/conf/mpm.conf
PidFile "logs/httpd.pid"
# event MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxConnectionsPerChild: maximum number of connections a server process serves
# before terminating
StartServers 3
MaxClients 320
MinSpareThreads 40
MaxSpareThreads 120
ThreadsPerChild 20
MaxConnectionsPerChild 0
# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxConnectionsPerChild: maximum number of connections a server process serves
# before terminating
StartServers 2
MaxClients 120
ThreadsPerChild 20
MinSpareThreads 20
MaxSpareThreads 100
MaxConnectionsPerChild 0
mario@h1637309:~/check-httpd-limits$