0

Good afternoon everyone, I'm still a beginner magento developer and I'm planning to put my first store online, but I was using the default mode, and when I set it to production mode everything was extremely slow. When researching most tutorials it says that the production mode is faster than the rest. How is this possible ? is extremely slow, is there any important configuration that should be done?

1
  • Additional information request, please. Any SSD or NVME devices on MySQL Host server? Post on pastebin.com and share the links. From your SSH login root, Text results of: A) SELECT COUNT(*) FROM information_schema.tables; B) SHOW GLOBAL STATUS; after minimum 24 hours UPTIME C) SHOW GLOBAL VARIABLES; D) SHOW FULL PROCESSLIST; AND very helpful information, includes - htop OR top for most active apps, ulimit -a for a Linux/Unix list of limits, iostat -xm 5 3 for IOPS by device and core/cpu count, for server workload tuning analysis to provide suggestions. Nov 15, 2021 at 1:57

4 Answers 4

0

Make sure that all the caches are enabled:

php bin/magento cache:enable

If some caches are disabled (especially config cache), then Magento may be working extremly slow even in production mode.

1
  • is already active, I never deactivate it.
    – lucas
    Nov 12, 2021 at 13:09
0

Make sure you have Merged/Minified JS and CSS

And Enabled JS Bubndling

also please check speed.

0

there are two aspects to a site speed:

  1. Server side execution time.
  2. Browser side download time.

For Server side :

  1. Install and use Varnish and make sure that most of the pages are delivered from Varnish cache. There are few other things too that should be done. But this is the most recommended and easiest of all implementation.

  2. Browser side : i) Advance Bundle JS ii) Minimize css and JS load above fold. iii) Optmized images iv) Minimize render blockers. v) Focus on design for above fold. vi) CDN vii) Expire header viii) Reduce payload ix) Alternate fonts.

Specially for Mobile score : you should target JS payload.

0

Here is what I would do:

  • Try a code profiler (new relic, tideways or similar, just google for it). It will show what code is slowing the site. enter image description here
  • Do a 3rd-party extension audit. From my experience, in about 90% cases it's a custom extension that breaks performance. Turn all custom modules off and see if it makes any difference. If it does, turn them on one by one and see which one slows the site. Simple trick but it does magic.
  • Switch to Luma theme. Is the speed better? If it is, then you know it's your custom theme and you need to investigate it further. Code profiler will help you with that.
  • Nothing works so far - it could be that you don't have enough server resources. Are you running on SSD or HDD. Make sure it's SSD as Magento does lots of reads and writes and i/o speed is important.
  • Is php opcache on? Make sure you have that php extension enabled as it helps.
  • What is your Full Page Cache Application at Stores > Configuration > Advanced > System > Full Page Cache > Caching Application? enter image description here Is it set to Varnish but you don't have varnish running? I've seen stores experiencing performance issues with Caching Application mismatch.
  • Are you running with php-fpm? It could be that you don't have enough php-fpm workers. Switch to pm = dynamic in php-fpm.conf and set pm.max_children = [number of CPU cores your server have].

Report back what helped or not.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.