DokuWiki

It's better when it's simple

User Tools

Site Tools


performance

Performance

This page give an overview on how to analyze and tweak performance should your DokuWiki be “slow”.

Debugging Performance

If you feel your Wiki is slower than it should be, you need to figure out why that is first. Only when you have an idea about what exactly causes the slowdown, you can try to address it or ask for help.

Here are a few things to look into:

  • Benchmark your server's file system. If your file system is slow, your wiki will be slow.
    • For Windows CrystalDiskMark is an easy to use tool.
    • hdparm -Tt is one of the many options on Linux systems
  • Use your browser's network tab to see how fast your requests actually are
  • Try running PHP's development server to circumvent your usual webserver setup:
    php -S 0.0.0.0:8888 index.php will start a webserver on port 8888. If this one is faster than your “normal” wiki, the problem lies outside of DokuWiki
  • Disable all plugins or run a fresh copy of DokuWiki with the devel server to see if any of your plugins is the cause
  • DokuWiki heavily relies on all kind of caches (filesystem, PHP, and it's own). So anything that messes with caching will result in performance losses. See below for details.
  • Go through the list of performance influencing settings and environments below and see what might apply

File System

DokuWiki does not use a database but stores all information in the file system. It thus relies on fast file system access and the operating system's file system caches.

  • Use fast, local storage devices like an SSD or M2, avoid running DokuWiki on network file systems
  • Make sure your host has enough free memory. Eg. RAM that is not assigned to any running process. Unused memory is used as file system cache by the OS, making access to frequently used files much faster
  • Anecdotally file system access seems to be faster on Linux than Windows, so host on Linux if you can.
  • Avoid anything that interferes with quickly accessing files. Especially anti-virus tools are know to significantly slow down file reads.

Networking

In general any slow down in your network will make access to your Wiki slower.

Some components may try to access resources on the Internet. If that's slow or impossible you may experience slowdowns related to network timeouts.

  • Allow outgoing connections to the DokuWiki server
  • Allow outgoing connections to Github for Extension Updates
  • Make sure your server is running a local mail transfer agent which DokuWiki can use to send mails
  • Make sure DNS resolves are fast, a local DNS cache might be useful

Alternatively:

Note that plugins or templates may require additional external ressources.

PHP Settings

PHP Version

PHP 7 was significantly faster than PHP 5. PHP 8 is still faster than PHP 7. Future PHP releases will probably be even faster. So upgrading is worth it.

open_basedir

The open_basedir setting will disable PHP's realpath cache. The larger your open_basedir list is, the more checks have to be done for each file system access.

It is highly recommended to not use open_basedir but use other ways to secure your setup.

See also:

implicit_flush

This option should not be enabled. Buffers will be flushed as needed by DokuWiki.

Op-Cache

The use of PHP's opcache module is highly recommended.

DokuWiki Caching

A larger cachetime might give some relief to busy/large wikis overall but will probably not have much influence on individual requests.

Tuning the readdir cache can help on very busy/large wikis by reducing the need for file system scans.

performance.txt · Last modified: 2024-02-21 15:47 by michaelsy

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki