Install ApacheBench (AB)
apt-get install apache2-utils
Run ApacheBench (AB)
ab -c 100 -n 2000 http://website.com:80/
This test will analyze how website.com handles 2000 requests, with a maximum of 100 requests running concurrently.
Benchmarking website.com (be patient)
Completed 200 requests… Read the rest
Use PHP5-FPM via tcp/ip and not socket for more than 300+ concurrent connections. Unix sockets are faster but tcp/ip is more stable in high load.
Type crontab -e and put the following lines to the end of file:
*/10 * … Read the rest
grep is your friend!
- Go to public_html/library/core/
- Open class.controller.php
- Find “X-Garden-Version” and comment out the line (number 352) by placing “//” before it.
// ‘X-Garden-Version’ => APPLICATION.’ ‘.APPLICATION_VERSION,… Read the rest
sudo netstat -plnt
In my case, I got an output like:n my case, I got an output like:
[email protected]:~# sudo netstat -plnt… Read the rest
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0
Minify JS and CSS in Nginx
Pull the latest version of Minify library from https://github.com/mrclay/minify
Copy the “min” directory to the document root (generally www or public_html)
Add the following variables to min/config.php if you planned to keep “min” folder … Read the rest
Embed without Iframe
Iframes should not be used if alternatives are widely available. Create a php file called external.php and paste the below code into it.
Now include the above file in your page using the include() function of php.… Read the rest
Optimize and Repair Corrupt MYSQL Databases
mysqlcheck -uUSER -p --auto-repair --check --optimize --all-databases
Note: The code will check > repair > optimize all the databases under the given USER.
While playing with multiple cache plugins and memcached, don’t know how, … Read the rest