Opened 9 years ago

Closed 7 years ago

#63 closed defect (fixed)

Mapbender performance issue

Reported by: Jeff McKenna Owned by: Jeff McKenna
Priority: major Milestone: 3.2.2 release
Component: MS4W - Packages Version: 3.1.4
Keywords: Cc: thokosch@…
Blocked By: Blocking:

Description

  • the packaged demos load extremely slow on first load (1.5 minutes +)
  • I just discovered that this issue was supposed to be fixed in the February release of Mapbender
  • it was obviously not fixed
  • I've reported this to the Mapbender team: https://github.com/mapbender/mapbender/issues/388

Change History (8)

comment:1 by Jeff McKenna, 8 years ago

Milestone: 4.0 release4.1 release

comment:2 by Axel Schaefer, 8 years ago

Coming from the discussion on Github, I comment on your Trac here to help you with the deployment.

Documentation for Windows: https://github.com/mapbender/mapbender-documentation/blob/release/3.0.6/en/book/installation/installation_windows.rst

We adjusted it with the Tools and Cache plugins that might help, especially WinCachePHP. The project is on Sourceforge (https://github.com/mapbender/mapbender-documentation/blob/release/3.0.6/de/book/installation/installation_windows.rst). We used the binaries of Wincache 1.3.7 which are packed in a MSI file, that we unpacked.

File Download depends on PHP Version, Thread-Safe and VC environment, but you want to compile it, IIRC.

PHP.INI Params (I missed some in the MB issues discussion):

  • max_execution_time = 150 (should help for starting first time)
  • extension = php_wincache
  • session.save_handler = wincache
  • zend_extension=C:/bin/php/5630/ext/php_opcache.dll
  • opcache.enable=1
  • opcache.memory_consumption=64
  • opcache.interned_strings_buffer=4
  • opcache.max_accelerated_files=2000
  • opcache.max_wasted_percentage=5

comment:3 by Jeff McKenna, 8 years ago

thank you so much for filing these instructions here; very helpful, I will follow your advice on the php.ini changes. Will dive in :)

comment:4 by plorence, 8 years ago

Cc: thokosch@… added

I did all the changes before - except the max_execution_time = 150. Its still the same slow. The path to the zend_enxtension in my case is C:/ms4w/Apache/php/ext/php_opcache.dll. Is that wrong? Do I need to install php aside from ms4w ?

comment:5 by Axel Schaefer, 8 years ago

I checked the installation with MS4W again on a Windows machine.

Wincache is not available for TS (thread-safe) Version of PHP, so I only enabled Opcache.

Second are the parameters of the FCGID configuration in httpd.conf. Fastest results are with this parameters (as described in: http://doc.mapbender3.org/en/book/installation/installation_windows.html)

# FCGI
FcgidInitialEnv PHPRC "c:/PathToPhp.Ini.Directory"
AddHandler fcgid-script .php
FcgidWrapper "yourpath/php-cgi.exe" .php

The important change is the AddHandler instead of SetHandler. I commented out the part:

<Location "/fcgi-bin">

I uploaded the changed httpd.conf (for diff) at: https://github.com/mapbender/mapbender/issues/388#issuecomment-303460853

comment:6 by Jeff McKenna, 8 years ago

Milestone: 4.1 release3.2.2 release

comment:7 by Jeff McKenna, 7 years ago

@axel thanks for all the tips. It is working well, very fast! I enabled OPcache, as well as PHP as FastCGI, in today's MS4W 3.2.2 release, and I have packaged Mapbender 3.0.6.1 inside the setup.exe installer. http://ms4w.com

(note that much of the Apache config for Mapbender lives in C:\ms4w\httpd.d\httpd_mapbender.conf)

comment:8 by Jeff McKenna, 7 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.