Performance tuning

From FUDforum Wiki
Jump to: navigation, search

This article discusses means of tuning and improving the performance and throughput of a FUDforum system. FUDforum is written to be extremely fast and scalable. However, it is the forum administrator's responsibility to ensure that the components FUDforum depends on are performing optimally.

Contents

CPU tuning

FUDforum is very CPU efficient forum and doesn't require powerful hardware to run. However, some of the advanced features like spell checking and full text search may require bit more resources to run. If you have high forum traffic and are beginning to lack CPU power you might want to disable some of these features.

PHP tuning

The use of an opcode cache is an absolute must if you want any kind of serious performance. PHP scripts are normally compiled every time they are called. To prevent this, one should install a PHP caching product. These products will typically increase performance by 25-100% by reducing compilation overhead. Several PHP op-code cache/accelerators are available to achieve this, for example:

Note that APC's default apc.max_file_size of 1M is too small for FUDforum. Increase this parameter to at least 2M in your php.ini file.

Database tuning

Ensure your database is well tuned. Usually tweaking MySQL buffers will give you significant improvements in speed. MySQL users may find this script helpful: http://wiki.mysqltuner.com/

If you experience high CPU load on your forum server and you see many locks on the fud30_ses table (using the SHOW PROCESSLIST command), consider converting it to InnoDB. The default storage engine, MyISAM is generally faster, but does table-level locking. InnoDB does row-level locking, thus eliminating the bottleneck. Here is an example.

mysql> ALTER TABLE fud26_ses ENGINE = InnoDB;

Web Server tuning

Configure mod_deflate to compress pages (or mod_gzip if you are still using Apache v1). Add the following to your webserver's httpd.conf file:

AddOutputFilterByType DEFLATE text/html text/plain text/xml

Forums typically show avatars, smilies and other images. As a result, several images may have to be downloaded simultaneously. To speed-up page loads, configure your webserver's keepalive function to prevent successive reconnects. For example, for Apache, include the following in your httpd.conf file:

KeepAlive On
KeepAliveTimeout 2  ; use a very, very low value (1 or 2 seconds max)!

Other tips

  • Use appropriately sized dedicated servers to host extremely busy forums.
  • Regularly monitor your site to see who is accessing it (access_log) and block users and bots abusing the system (add a "Deny from" line to .htaccess file).
Languages
Personal tools