LAMP Performance

The following scripts can help in determining good values for Apache and MySQL configurations based on the amount of memory available:

The following will giveĀ  a list of Apache Modules loaded:

apachectl -t -D DUMP_MODULES

The following will give the memory usage of Apache:

#!/bin/sh
# apache_mem.sh
# Calculate the Apache memory usage
ps -ef | grep httpd | grep ^apache | awk ‘{ print $2 }’ |
xargs pmap -x | grep ‘total kB’ | awk ‘{ print $3 }’ |
awk ‘{ sum += $1 } END { print sum }’

The following will give

<?php
phpinfo();
?>

From my investigations it looks like my Apache processes had been using a lot of memory due to the mod-security rules I had obtained from ASL – now to customise them.

 

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>