Jump to content

Init very slow


KishlorN

Recommended Posts

Hello,

 

I've installed this version of prestashop on CentOS 7 with Percona MySQL...

 

I've tried with both Apache and nginx, result is quite the same (init is insanely slow):

 
Load Time 3481 ms - You'd better run your shop on a toaster
Querying Time 90 ms
Queries 237
Memory Peak Usage 43.6 Mb
Included Files 374 files - 5.89 Mb
PrestaShop Cache - Mb
Global vars 0.11 Mb
PrestaShop Version 1.7.1.1
PHP Version 5.4.16 (OK)
MySQL Version 5.7.17-13 (OK)
Memory Limit 128M
Max Execution Time 30s
Smarty Cache enabled
Smarty Compilation never recompile
  Time Cumulated Time Memory Usage Memory Peak Usage
config 104 ms 104 ms 16.79 Mb 16.87 Mb
__construct 13 ms 117 ms 2.30 Mb 21.05 Mb
init 3291 ms 3408 ms 18.77 Mb 38.13 Mb
checkAccess 0 ms 3408 ms - Mb 38.13 Mb
setMedia 0 ms 3408 ms 0.01 Mb 38.13 Mb
postProcess 0 ms 3408 ms - Mb 38.13 Mb
initHeader 0 ms 3408 ms - Mb 38.13 Mb
initContent 23 ms 3431 ms 1.89 Mb 39.87 Mb
initFooter 0 ms 3431 ms - Mb 39.87 Mb
display 50 ms 3481 ms 3.41 Mb 43.56 Mb
Time Cumulated Time Memory Usage Memory Peak Usage
config 104 ms 104 ms 16.79 Mb 16.87 Mb
__construct 13 ms 117 ms 2.30 Mb 21.05 Mb
init 3291 ms 3408 ms 18.77 Mb 38.13 Mb
checkAccess 0 ms 3408 ms - Mb 38.13 Mb
setMedia 0 ms 3408 ms 0.01 Mb 38.13 Mb
postProcess 0 ms 3408 ms - Mb 38.13 Mb
initHeader 0 ms 3408 ms - Mb 38.13 Mb
initContent 23 ms 3431 ms 1.89 Mb 39.87 Mb
initFooter 0 ms 3431 ms - Mb 39.87 Mb
display 50 ms 3481 ms 3.41 Mb 43.56 Mb
 
 

Any insight on what's happening?

 

Thanks in advance!

Edited by KishlorN (see edit history)
Link to comment
Share on other sites

With ngnix over apache (ngnix as webserver) you should note more speed.

 

Try with the following server configuration:

 

  • magic_quotes_gpc = off
  • memory_limit = 512M
  • max_execution_time = 300
  • max_input_time = 300
  • upload_max_filesize = 20M
  • post_max_size = 20M
  • max_input_vars = 10000
  • allow_url_fopen = on
  • safe_mode = off
  • PHP 5.6.30 + php-fpm + some tuning in opcache as below:
    opcache.revalidate_freq=0
    opcache.validate_timestamps=0 (comment this out in your dev environment)
    opcache.max_accelerated_files=7963
    opcache.memory_consumption=192
    opcache.interned_strings_buffer=16
    opcache.fast_shutdown=1
  • OR BETTER php 7
  • JSON = ON
  • ctype = ON
  • SQL engine = INNODB

With this configuration and using php 5.6.30 I'm having bottlenecks only on modules site in this case. Front-office is speedy, about 0,3 seconds. For back-office bottle neck see my report on bug tracker: http://forge.prestashop.com/browse/BOOM-2921.

BTW I'm using Ubuntu.

Link to comment
Share on other sites

Thanks for the quick answer, I'll give it a try with this setup and an updated version of PHP.

 

Basically, I didn't bother and I only installed the yum epel (I'm under CentOS) version of PHP... Apart from opcache, what modules would you recommand? I currently have the ones mentioned here.

 

I've also tried installing eaccelerator as recommanded in the doc but under this version of PHP it seems quite buggy: is this the reasn why you're using opcache instead?

Link to comment
Share on other sites

php-fpm, nginx over apache.

 

eaccelerator is not recommended anymore, if you are using php-versions over 5.4.5.

opcache (available in the php-package since php 5.4. versions) replaced all old php-modules like apc, xcache, etc. If you can use php7 it would be better in speed. If not, its my case (running other custoner software which is not copatible with php7), than stay with php 5.6. latest stable version and install php-fpm and the ngnix over apache. For to distribute traffic (load balancing) you can also install memcache, but this is not really necessary, only if you are not using load balancers on your network on a VPS. If your server is 100% dedicated, so memcache could be an option to balance your traffic.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...