If you're experiencing slow page loads, there are several layers you need to look at to identify the cause. Take a look at performance troubleshooting guide to go through each of the layers and identify your culprits.
Using caching to improve API performance
MindTouch has several built in caching mechanisms you can take advantage of to speed up page loads if you notice that the MindTouch's page execution speed is your problem. Enable profiling (described in the troubleshooting guide) and take a look at the overall and API time. Note that overall execution time = API time + PHP time. If your API time is over .1 seconds or so, you may want to consider enabling some of these cache settings.
To enable these, login to the wiki as an administrator. Go to control panel -> configuration. Add the follow key/value pairs:
- cache/roles bool
- Enable caching of permission roles to reduce database calls. (default: false)
- cache/services bool
- Enable caching of authentication providers and extensions to reduce database calls. (default: false)
- cache/users bool
- Enable caching of user data to reduce database calls. (default: false)
cache/bans bool - Enable caching of bans to reduce database calls. (default: false)
cache/anonymous-output bool - Enable caching of generated output for the anonymous user for several API calls. This will greatly improve performance for anonymous users at the cost of their data being slightly out of date. This is very useful for internet sites experiencing a burst of anonymous users. (default: false)
cache/anonymous-output-short integer - If cache/anonymous-output is enabled, this is the time in seconds to cache the shorter ttl calls described below(default: 300)
cache/anonymous-output-long integer - If cache/anonymous-output is enabled, this is the time in seconds to cache the longer ttl calls described below(default: 3600)
Misc settings to improve API performance
stats/page-hit-counter bool - Controls updates to each page's hit counter. Setting to false will reduce load on the DB by being able to more effectively use the query cache at the cost of the popular pages feature. (default: true)
Improve UI performance by installing a PHP accelerator
We've had good results with eAccelerator but any of them should work.
Improve overall performance with a caching reverse proxy
Setting up Varnish or Squid will allow you to serve a huge amount of anonymous traffic very quickly.
Performance related bugs
MindTouch API
reference to undefined name 'mantis' Exception of type 'MindTouch.Deki.Script.Runtime.DekiScriptUndefinedNameException' was thrown. (click for details)Callstack:
at User:deprecated/*_Archive/Caching_and_Performance
MindTouch.Deki.Script.Runtime.DekiScriptUndefinedNameException: reference to undefined name 'mantis' Exception of type 'MindTouch.Deki.Script.Runtime.DekiScriptUndefinedNameException' was thrown.
at MindTouch.Deki.Script.Compiler.DekiScriptExpressionEvaluation.Visit (MindTouch.Deki.Script.Expr.DekiScriptVar expr, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Expr.DekiScriptVar.VisitWith[DekiScriptExpressionEvaluationState,Range] (IDekiScriptExpressionVisitor`2 visitor, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Compiler.DekiScriptExpressionEvaluation.Evaluate (MindTouch.Deki.Script.Expr.DekiScriptAccess expr, DekiScriptExpressionEvaluationState state, Boolean evaluateProperties) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Compiler.DekiScriptExpressionEvaluation.Visit (MindTouch.Deki.Script.Expr.DekiScriptAccess expr, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Expr.DekiScriptAccess.VisitWith[DekiScriptExpressionEvaluationState,Range] (IDekiScriptExpressionVisitor`2 visitor, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Compiler.DekiScriptExpressionEvaluation.Visit (MindTouch.Deki.Script.Expr.DekiScriptCall expr, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Expr.DekiScriptCall.VisitWith[DekiScriptExpressionEvaluationState,Range] (IDekiScriptExpressionVisitor`2 visitor, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Compiler.DekiScriptExpressionEvaluation.Visit (MindTouch.Deki.Script.Expr.DekiScriptReturnScope expr, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0
MindTouch UI
reference to undefined name 'mantis' Exception of type 'MindTouch.Deki.Script.Runtime.DekiScriptUndefinedNameException' was thrown. (click for details)Callstack:
at User:deprecated/*_Archive/Caching_and_Performance
MindTouch.Deki.Script.Runtime.DekiScriptUndefinedNameException: reference to undefined name 'mantis' Exception of type 'MindTouch.Deki.Script.Runtime.DekiScriptUndefinedNameException' was thrown.
at MindTouch.Deki.Script.Compiler.DekiScriptExpressionEvaluation.Visit (MindTouch.Deki.Script.Expr.DekiScriptVar expr, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Expr.DekiScriptVar.VisitWith[DekiScriptExpressionEvaluationState,Range] (IDekiScriptExpressionVisitor`2 visitor, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Compiler.DekiScriptExpressionEvaluation.Evaluate (MindTouch.Deki.Script.Expr.DekiScriptAccess expr, DekiScriptExpressionEvaluationState state, Boolean evaluateProperties) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Compiler.DekiScriptExpressionEvaluation.Visit (MindTouch.Deki.Script.Expr.DekiScriptAccess expr, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Expr.DekiScriptAccess.VisitWith[DekiScriptExpressionEvaluationState,Range] (IDekiScriptExpressionVisitor`2 visitor, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Compiler.DekiScriptExpressionEvaluation.Visit (MindTouch.Deki.Script.Expr.DekiScriptCall expr, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Expr.DekiScriptCall.VisitWith[DekiScriptExpressionEvaluationState,Range] (IDekiScriptExpressionVisitor`2 visitor, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Compiler.DekiScriptExpressionEvaluation.Visit (MindTouch.Deki.Script.Expr.DekiScriptReturnScope expr, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0
You can check your MySQL cache settings with the following command while in MySQL command mode:
mysql> show variables like 'query%';
edited 16:58, 11 Jun 2008