Apache gives me the number of hits, but how many are static resources and how many php scripts are executed? Also, page generation time is missing. This gave us plenty of performance counters and associated graphs.īut I found that some important data was missing. Monitoring templates from Percona were a big help to get all the statistics out of mysql. We set up cacti to measure all important performance data of the server, of Apache service and Mysql daemon. In order to improve the performance of your shop, you first need to measure it. Where do we start? The tools The baseline Thousands of dynamically generated database queries. So many factors! Tens, even hundreds of configurations, giving an almost infinite possibility of combinations. Is PHP code well written? Does it have the best big-O properties, for instance an extraneous nested loop somewhere? Their execution time can vary from nanoseconds to hours, depending on your data, missing indexes or an ill formed joins. We can cache database queries by mysqld itself, or by a dedicated service (we chose memcached for practical reasons). There are many configuration options (especially in mysql server), that can have an important impact. On the software side, we run a web server ( Apache) and Mysql for the database. To begin with, the hardware has it’s obvious performance impact. Let’s focus on the server only, it’s a vast domain already.Īny server environment is complex. There are many things you can do to optimize the client part, like compression of images, choice of Javascript libraries, but this is out of scope here. While you can’t control the network connection nor what is happening on the client computer, you have full control over page generation time on your server. And page load time is an important factor. When running an e-commerce site, user experience is at the heart of the success. It summarizes the process and the tools used. This article is part of the preparation for the challenge. We have to start over the performance optimization cycle of the past few years. The new version is better in many points, but it is slower. Today we are working on an upgrade to the current version. All the work was done on an outdated version of PrestaShop. It includes working experience gathered in about five years. This article is specific about PrestaShop, a popular e-commerce platform, but it’s principles can be applied to any web application built on PHP and mysql. Let Prestashop take flight like this puffin !
0 Comments
Leave a Reply. |