Rev 831 | Blame | Last modification | View Log | RSS feed
Phorum 5 performance notes==========================Several of Phorum's options have a tradeoff effect: enabling morefeatures can slow Phorum down. This document describes which optionsthese are and tries to explain the performance cost of each one.Which options you should turn off to improve performance dependson the way you use your Phorum installation.Table of contents:1. Global Settings1.1 DNS Lookups1.2 Count New Private Messages1.3 Enable Moderator Notifications1.4 Track User Usage2. Forum Settings2.1 Email Messages to Moderators2.2 Allow Email Notification2.3 Count Views2.4 Show New Count in Forum List2.5 Ban List2.6 Censor List2.7 Move Threads on Reply2.8 Check for duplicates1. Global Settings-------------------------------------------------------------------------------1.1 DNS Lookups---------------DNS lookups cause Phorum to display DNS entries (hostnames) insteadof IP addresses on posts. It also will enable checking if mailaddresses point to valid domains.On a forum with a lot of posts, enabling this will result in asignificant number of queries to your DNS server. Phorum's performancewill slow down while a query is running, as it will wait for the resultof the query.If your DNS server is slow, this may give the impression to your usersthat posting a message is very slow. If that is the case, you shouldturn DNS lookups off. If you have access to a fast DNS server or onlyhave a few regular posters, you should be able to leave it on.1.2 Count New Private Messages------------------------------If enabled, this option will alert users when they have new privatemessages. On every page a logged in user visits, Phorum will checkto see if they have new private messages.If you have a large number of active users at one time with a largenumber of private messages, this query can start to slow down yourdatabase. Turning it off may help performance, but will also removethe notification users get when they receive a new private message.You can also enable userdata caching under "Cache Settings" toimprove performance.1.3 Enable Moderator Notifications----------------------------------Similar to the Count New Private Messages option, this option willalert users who are also moderators when they have a new item thatrequires their attention.The performance hit of this feature is basically nothing for userswithout moderator permissions, as Phorum will never perform the checks.Moderators will suffer a small performance hit, depending on what typeof moderator they are.Administrators will suffer a larger performance hit, as they areeffectively moderators of every type, so all of the checks will beperformed.1.4 Track User Usage--------------------This option controls how often Phorum will record when a user was lastactive. Setting this to be more frequent results in more accurate lastactivity data, but also causes more database writes.The "Constantly" setting will record the users activity on every pagehit by any logged in user, resulting in a dramatic increase in the numberof database writes. In most databases, a write is much slower then aread, so this can dramatically reduce performance. This setting is notrecommended, except for installations with very few users, or verypowerful hardware.If you are using a module that actively requires this data (such as theOnline Users module), the setting "Once per 5 minutes" is the bestsetting, as the data will be too out of date if you update the dataless frequently.If you are not using such a module, "Once per day" or "Once per hour" arehighly recommended over the other options. "Never" disables this functionentirely, and is recommended if you simply don't care to know if a useris active or not.Note: the option "Cache User Data" should be disabled if you have thisfeature set to "Once per 5 minutes" or "Constantly", as the cachingwill not be of much use.2. Forum Settings-------------------------------------------------------------------------------2.1 Email Messages to Moderators--------------------------------If enabled, every post in the forum will be emailed to the forum'smoderators. Administrators are automatically moderators in every forum,and will also get the emails.This option should not directly affect Phorum's performance, but whena post is made, it will cause some emails to be created. If you have alarge number of moderators and a lot of posts being made by users, thiscan generate a significant amount of email traffic.The traffic should only be a problem on very large forums or if you havea slow mail server. In other cases, it should not cause significantperformance issues.2.2 Allow Email Notification----------------------------This option has similar issues to the Email Messages to Moderatorssetting, except the recipients of the emails are users who haveselected the option to have replies in a followed thread emailed tothem.If a large number of users is using this feature in a busy thread, itcan affect performance. If only few users are using this feature, itwill not cause significant performance issues.2.3 Count Views---------------If enabled, this feature records the number of views each post gets.For every post read, the counter will be incremented in the database.On a busy forum, this will result in a tremendous number of databasewrites, dramatically slowing down performance.Enabling this feature is not recommended for high traffic forums,unless you have very powerful hardware.2.4 Show New Count in Forum List--------------------------------If enabled, the count of new messages for each forum will appear inindex.php. While quite handy, this has to run several queries perlisted forum. If there are many forums on the index.php page, therecould be a significant performance hit.2.5 Ban List------------The ban list is a list of words that are banned when posting a message.There is a small performance penalty for searching for the banned words,but only when posting.2.6 Censor List---------------The censor list is a list of filtered words, that is checked on everypost read. Because it is checked far more often than the ban list, alarge censor list will affect performance much more.2.7 Move Threads on Reply-------------------------"Move Threads on Reply" means that a thread which gets a new reply causesthe topic to be moved to the top of the forum, hence the topics aresorted by their last reply and not by their first post in the messagelist.In Flat-mode there is no performance hit. In Threaded-mode it causesa large overhead because of the complexity of the sorting and thecounting of posts on a page.2.8 Check for duplicates------------------------"Check for duplicates" runs one additional query while posting to checkif that post has been made before. That query should be fast and justa small overhead.