Edit .htaccess in your forum root
Codify compression of all HTML, PHP, JavaScript, CSS, images, and pretty much everything using deflate (turn gzip off in the vBulletin options):
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/atom_xml
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/x-httpd-php
AddOutputFilterByType DEFLATE application/x-httpd-fastphp
AddOutputFilterByType DEFLATE application/x-httpd-eruby
Codify a genuine cache of files for your members
<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType text/html "access plus 1 seconds"
ExpiresByType image/gif "access plus 259200000 seconds"
ExpiresByType image/jpeg "access plus 259200000 seconds"
ExpiresByType image/png "access plus 259200000 seconds"
ExpiresByType text/css "access plus 60480000 seconds"
ExpiresByType text/javascript "access plus 21600000 seconds"
ExpiresByType application/x-javascript "access plus 21600000 seconds"
</ifModule>
<ifModule mod_headers.c>
<filesMatch "\\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$">
Header set Cache-Control "max-age=25920000, public"
</filesMatch>
<filesMatch "\\.(css)$">
Header set Cache-Control "max-age=6048000, public"
</filesMatch>
<filesMatch "\\.(js)$">
Header set Cache-Control "max-age=2160000, private"
</filesMatch>
<filesMatch "\\.(xml|txt)$">
Header set Cache-Control "max-age=2160000, public, must-revalidate"
</filesMatch>
<filesMatch "\\.(html|htm|php)$">
Header set Cache-Control "max-age=1, private, must-revalidate"
</filesMatch>
</ifModule>
<ifModule mod_headers.c>
Header unset ETag
</ifModule>
FileETag None
<ifModule mod_headers.c>
Header unset Last-Modified
</ifModule>
Alter Apache Configuration:
ExpiresActive On
ExpiresByType image/jpeg "access plus 1 hour"
ExpiresByType image/gif "access plus 1 hour"
ExpiresByType image/png "access plus 1 hour"
ExpiresByType application/x-shockwave-flash "access plus 1 hour"
ExpiresByType application/x-javascript "access plus 1 hour"
ExpiresByType text/css "access plus 1 hour"
Optimize MySQL Server to Consume Less Resources (We reduced MySQL usage from 100% to 40-50% on a board with 50K+ users)
It appears that the MyISAM key_cache is being completely utilized. The key_buffer_size is a buffer that stores referenced MyISAM indexes. The more MySQL can operate from within RAM the more efficient it is. Currently the key_buffer_size is set to 64 MB, and there are over 206 MB of MyISAM specific indexes being stored on the server.
Change buffer_size to 256MB in /etc/my.cnf
In /etc/my.cnf
Log slow queries:
log-slow-queries
log-queries-not-using-indexes
If this table exists in your database index this:
create index idx_termval on seoqueries_terms(term_value(50));
This table is being written to constantly and delaying other queries.
Consider using the Sphinx search engine or applying a protocol called Varnish to your server.
These are suggestions from expert system administrators at RackSpace.com. Special thanks to them for turning our forum into a workhorse and reducing average pageload from 8 seconds to 1.25.