VuFind Performance Optimizations

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

VuFind Performance Optimizations

Cornelius Amzar

Hello list,

 

I’ve optimized VuFinds performance and want to share my results here, as they could be rather useful for others.

 

What I did is

 

Changes need to be done on the PHP side

·         Minify all the JS files

·         Merge and minify all css files. There remains only one compressed file

·         If you use custom modules, generate a autoload_classmap.php

·         For custom config classes use Zend/Config/Config. This is much better for caching

… on the server side

·         Activate GZIP compression for js, css, html,xml, json, text…NOT for images

·         Use PHP OPcache, 50 MB is enough

·         Use cover caching and a huge cover cache (2 GB here).

·         Not yet tested: PHP 7 and HTTP/2. The later

·         You can try to improve Apache’s number of processes. But I’m not sure if this really changed anything. Defaults seems to be good and it depends on your server.

·         Disable any Apache module you do not need. Anybody who recently upgraded from PHP 5.4 to 5.6: Disable APC cache module. This module was still enabled hereand costs a lot of performance. PHP5.6 uses Opcache.

·         Compress/optimize your images (jpegoptim)

 

An instance of our installation can be seen here:

 

https://htwg.boss2.bsz-bw.de or https://phhd.boss2.bsz-bw.de/ (we’ve 12 different libraries at the moment) on the detail page you can switch records by using the left/right arrow keys. This indicates the speed very good J

 

Result list is around 700ms, detail page around 400ms.

 

 

Regards,

Cornelius

 

--

Cornelius Amzar, M.Sc.

Bibliotheksservice-Zentrum Baden-Württemberg (BSZ)

78457 Konstanz / Germany

E-Mail: [hidden email]

http://www.bsz-bw.de

 


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech
Reply | Threaded
Open this post in threaded view
|

Re: VuFind Performance Optimizations

Günter Hipler
Hi Cornelius

thanks for sharing you results and experiences  - these are really helpful!

At the moment we are in the process of upgrading our infrastructure. From RedHat to Ubuntu 16.04. I have the idea to start with PHP 5.6 in production (if all works as expected in summer) There  we can follow your suggestions.

In parallel I make my first steps with PHP7 on a local virtual box for VuFind - will see how it works.

Günter
 

On 18.03.2016 09:40, Amzar, Cornelius wrote:

Hello list,

 

I’ve optimized VuFinds performance and want to share my results here, as they could be rather useful for others.

 

What I did is

 

Changes need to be done on the PHP side

·         Minify all the JS files

·         Merge and minify all css files. There remains only one compressed file

·         If you use custom modules, generate a autoload_classmap.php

·         For custom config classes use Zend/Config/Config. This is much better for caching

… on the server side

·         Activate GZIP compression for js, css, html,xml, json, text…NOT for images

·         Use PHP OPcache, 50 MB is enough

·         Use cover caching and a huge cover cache (2 GB here).

·         Not yet tested: PHP 7 and HTTP/2. The later

·         You can try to improve Apache’s number of processes. But I’m not sure if this really changed anything. Defaults seems to be good and it depends on your server.

·         Disable any Apache module you do not need. Anybody who recently upgraded from PHP 5.4 to 5.6: Disable APC cache module. This module was still enabled hereand costs a lot of performance. PHP5.6 uses Opcache.

·         Compress/optimize your images (jpegoptim)

 

An instance of our installation can be seen here:

 

https://htwg.boss2.bsz-bw.de or https://phhd.boss2.bsz-bw.de/ (we’ve 12 different libraries at the moment) on the detail page you can switch records by using the left/right arrow keys. This indicates the speed very good J

 

Result list is around 700ms, detail page around 400ms.

 

 

Regards,

Cornelius

 

--

Cornelius Amzar, M.Sc.

Bibliotheksservice-Zentrum Baden-Württemberg (BSZ)

78457 Konstanz / Germany

E-Mail: [hidden email]

http://www.bsz-bw.de

 



------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140


_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech

-- 
Universität Basel
Universitätsbibliothek
Günter Hipler
Projekt SwissBib
Schoenbeinstrasse 18-20
4056 Basel, Schweiz
Tel.: + 41 (0)61 267 31 12 Fax: ++41 61 267 3103
E-Mail [hidden email]
URL: www.swissbib.org  / http://www.ub.unibas.ch/ 

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech
Reply | Threaded
Open this post in threaded view
|

Re: VuFind Performance Optimizations

Demian Katz
In reply to this post by Cornelius Amzar
Cornelius,

Thanks for sharing this!

Regarding PHP-side changes, if you have suggestions for incorporating some of these improvements into core code, please feel free to open a pull request. In some cases, there may be some things that we can turn on either by configuration or based on whether we're in dev vs. production mode. A pull request for image optimization might also be worth considering!

Regarding server-side changes, might you consider adding a "PHP/Apache Tuning" section to this wiki page [ https://vufind.org/wiki/administration:performance ] to share some of your suggestions? At least some of these things are probably pretty straightforward to document. Perhaps some changes (such as GZIP compression) could even be incorporated into the httpd-vufind.conf by default (assuming that they can be enabled at that scope, and that there are appropriate conditionals to test so that we don't turn on compression if the required Apache module is missing).

In any case, congratulations on your improved performance! Have you tried this with the recent changes to improve session performance? If not, that may help shave off even more time.

- Demian

From: Amzar, Cornelius [[hidden email]]
Sent: Friday, March 18, 2016 4:40 AM
To: [hidden email]
Cc: Heymans, Wolfgang
Subject: [VuFind-Tech] VuFind Performance Optimizations

Hello list,

 

I’ve optimized VuFinds performance and want to share my results here, as they could be rather useful for others.

 

What I did is

 

Changes need to be done on the PHP side

·         Minify all the JS files

·         Merge and minify all css files. There remains only one compressed file

·         If you use custom modules, generate a autoload_classmap.php

·         For custom config classes use Zend/Config/Config. This is much better for caching

… on the server side

·         Activate GZIP compression for js, css, html,xml, json, text…NOT for images

·         Use PHP OPcache, 50 MB is enough

·         Use cover caching and a huge cover cache (2 GB here).

·         Not yet tested: PHP 7 and HTTP/2. The later

·         You can try to improve Apache’s number of processes. But I’m not sure if this really changed anything. Defaults seems to be good and it depends on your server.

·         Disable any Apache module you do not need. Anybody who recently upgraded from PHP 5.4 to 5.6: Disable APC cache module. This module was still enabled hereand costs a lot of performance. PHP5.6 uses Opcache.

·         Compress/optimize your images (jpegoptim)

 

An instance of our installation can be seen here:

 

https://htwg.boss2.bsz-bw.de or https://phhd.boss2.bsz-bw.de/ (we’ve 12 different libraries at the moment) on the detail page you can switch records by using the left/right arrow keys. This indicates the speed very good J

 

Result list is around 700ms, detail page around 400ms.

 

 

Regards,

Cornelius

 

--

Cornelius Amzar, M.Sc.

Bibliotheksservice-Zentrum Baden-Württemberg (BSZ)

78457 Konstanz / Germany

E-Mail: [hidden email]

http://www.bsz-bw.de

 


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech