ok, you've just got your new dedicated server running plesk, and you're ready to start making changes to boost your server's performance a little bit. Here is a quick (but not dirty) quide to do this:
- enable output compression
- increase number of apache processes
- find out possible slow sql queries
enable output compression:
make sure that mod_deflate is enabled, linking deflate.* from /etc/apache2/mods-available/ to /etc/apache2/mods-enabled/ and have a soft reload. Syntax options could be found here
monitor changes: make sure that it worked telnet-ing port 80 of your server, and requesting a web page using:
GET / HTTP/1.1
Host: www.some_site_of_yours.com
Accept-Encoding: gzip,deflate
you should see a line containing:
Content-Encoding: gzip
increase number of apache processes:
depending on your site(s)' traffic, increasing the maximum number of apache server processes and simultaneous client connections could be a good performance tip. Use MaxClients on mpm_preform_module and mpm_worker_module sections, in /etc/apache2/apache2.conf and soft reload. A good number to deal with this is MaxClients 150, tested on a hundred low-traffic sites plesk installation.
monitor changes:
enable extended status report, in /etc/apache2/apache2.conf. do this appending the following code inside mod_status.c:
ExtendedStatus On
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 12.34.56.78 # make sure that you'll enable only YOUR home pc static ip!
</Location>
find out possible slow sql queries:
some developers can't feel anything about server performance issues, so they might write some sql queries that are really slow. Monitor these appending the following line under mysqld section of your /etc/mysql/my.cnf file:
log_slow_queries = /var/log/mysql/mysql-slow.log
reload mysql and tail the log file after a few browsing in your hosted sites. Contact developers and send them their slow queries found, in order to make changes. Some of them may be fine and you may need to create a table index for some fields, in order to optimize the performance. Do this using CREATE INDEX statement. More information could be found here