MindTouch Developer Center > Deki > FAQ > Troubleshooting > How do I...Troubleshoot performance issues?

Note: very much a work in progress -- Please add your tips and troublshooting info here!

Browser to Apache/PHP

//TODO: DNS resolution speed

Enable GZip compression for Apache and IIS

Enable eAccelerator (another guide) for huge improvements to speed of PHP execution.

HOWTO: Inspect requests to Deki Wiki with Fiddler2

(Another using Fiddler guide)

Fiddler acts as a proxy that captures the details of all requests made by the browser--it's very handy for identifying slow calls and finding requests that are behaving unexpectedly.

After downloading/installing/running it, you'll need to set your firefox up to use Fiddler as a proxy. Do this by going to Tools -> Options -> Advanced -> Network -> Settings. Select Manual proxy configuration and use localhost with port 8888 for all protocols.

In Fiddler go to Rules -> Performance and select Show time to last byte as well as show response timestamp.

Point your browser over to Deki Wiki and take a look the requests that were made. Look for certain requests being slow or error statuses like 404's, 500's, server not found.

A good way to save a log of the requests is by first ensuring that you only have one wiki page worth of requests, selecting them, go to edit-> copy -> full summary. You can paste this output as a txt attachment on the forums for others to look at.

API Performance

Determining API call execution times

There are two ways to do this: take a look at the logs located in bin/logs -- for every request from the browser you should see several requests and an execution time for each.

Another way is to add this line of code to LocalSettings.php:

$wgProfileApi = true; 

Once you do this, right click and do a "View HTML Source" from your browser; somewhere near the bottom of the page you'll get the total times it took to process the API requests.

Memory usage

Check Deki API's memory use by running top or ps -ef|grep mindtouch. If memory use is over 500mb, restart dekiwiki (sudo /etc/init.d/dekiwiki restart). There are some known memory leaks in mono that may cause memory use to go up gradually. If this happens for you, you may want to restart deki as part of a weekly cron job.

Database Performance

//TODO: info on enabling slow call logging

For MySql ensure that the query cache is enabled.

Make sure to run a recent version of MySql as there've been many performance improvements.

Mono/MS .Net performance

If your api calls are taking too long to execute such as these results here from wgProfileApi = true in the html source

<!-- /@api/deki/site/settings: 0.54991722106934-->
<!-- /@api/deki/users/1: 0.59500002861023-->
<!-- /@api/deki/users/=OCIO: 0.94317698478699-->
<!-- /@api/deki/site/services/1: 0.95052313804626-->
<!-- /@api/deki/users/1: 0.49446105957031-->
<!-- /@api/deki/pages/33/contents: 0.83522915840149-->
<!-- /@api/deki/pages/33: 3.4048399925232-->
<!-- /@api/deki/site/nav/=About/full: 1.0060489177704-->

You can try benchmarking your server and Mono/MS.Net performance to get a rough idea of where the performance of your machine stands.

You'll want to download linpack.cs from here and compile it with the command

mcs linpack.cs

then run it with

mono linpack.exe 1000 

Run it a few times to get a steady average.

Put your performance numbers here for others to compare

User / Server name Performance Machine specs
 MindTouch: wiki.opengarden.org  Mflop/s: 422.173  Time: 1.58 secs  Dual Xeon @ 2.4ghz Ram: 2g
 MindTouch: dev2 (vm)  Mflop/s: 149.424  Time: 4.47 secs  (will find out)
 Pablos  Mflop/s: 141.454  Time: 4.73 secs  Athlon 64 3200, 2GB RAM
 TimHunt (1.8.3 vm)  Mflop/s: 384.266  Time: 1.74 secs  Intel(R) Xeon(R) @ 3.00GHz / 256MB ram
Matt Closson (Deki Wiki 1.9.0a (rev. 8655) running on: Linux 2.6.22-14-server, PHP 5.2.3-1ubuntu6.3, mySQL 14.12 distribution 5.0.45, and Mono 1.2.4. Mflop/s: 181.308  Time: 3.69 secs Intel(R) Celeron(R) CPU 2.50GHz / 1GB DDR RAM

     

To get the CPU for a linux machine: cat /proc/cpuinfo

Tools

Tag page
You must login to post a comment.
Powered by MindTouch Deki v.8.08.1a