Improve performance of koha LMS

Is your Koha server slow? Is it taking a long time to perform the various operations e.g check-in/check-out, cataloging, and item searching? Try out the following tips to improve the performance of the koha server.

1. Enable plack

Plack is an interface between Perl web applications and web servers. Plack enhances the performance of the koha server in various operations and makes koha work faster and reduced the load on the server.

Although Plack is included in Koha by default, but sometimes you may need to enable it.

Apply the following commands to enable plack

sudo koha-plack --enable library

sudo koha-plack --start library

sudo systemctl restart apache2.service

Note:- Before enabling the plack Make sure that you have sufficient RAM in your koha machine

2. Enable caching with Memcached

Memcached stores the information in the server's RAM as cached memory and serves requests from the cached memory rather than passing on queries to your database server.  In this way, Memcached reduces the number of direct requests to your koha SQL databases

Go to Home ➤ About Koha page ➤ Server Information

If Memcached is installed and configured correctly, you will see the following line highlighted in the green line 

Memcached: Servers: 127.0.0.1:11211 | Namespace: koha_demo | Status: running. | Config read from: koha-conf.xml

By default, Memcached is already configured with the koha but sometimes you need to do configure it manually. If you find that Memcached is already installed then you can skip the installation. But if not installed then follow the below steps to install and configure Memcached. 

Install Memcached

sudo apt update

sudo apt upgrade

sudo apt install memcached

Configure Memcached in koha-conf.xml

sudo gedit /etc/koha/sites/library/koha-conf.xml

(In the above command, library is the name of the Koha instance) 

Around line 300 you will find the following line

 <!-- <zebra_loglevels>none,fatal,warn</zebra_loglevels> -->.

 Add the following lines below the above line if these are missing 

<memcached_servers>127.0.0.1:11211</memcached_servers>
<memcached_namespace>koha_library</memcached_namespace>
<template_cache_dir>/var/cache/koha/library/templates</template_cache_dir>

(Replace ‘library’ with your Koha instance name in the above lines)

Enable and start Memcached

sudo systemctl start memcached.service

NB:- Take the backup of your koha database to safety purpose

References:- https://wiki.koha-community.org/wiki/Plack

https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-memcached-on-ubuntu-20-04

https://kohasupport.com/koha-hacks-4-tricks-to-supercharge-koha-library-system/

Post a Comment

0 Comments