A lot of things have been improved on PrestaShop 1.6.1.0 :
Design
Invoices
Search
Performance : we have done a lot of work to improve the overall performances of PrestaShop, and reached in some cases a whooping 10x improvement.
Let's now dig into the optimizations we have put in place, and do some benchmarks.
II) Which parts of PrestaShop are faster?
1) Faster single-threaded performances
Thanks to our internal tools (to be publicly released soon!), we quickly identified the bottlenecks of PrestaShop which were impacting directly the generation time of the pages, and hence the SEO and the user satisfaction.
At the PHP level, without the cache activated, after launching a crawl on a real shop, we collected all the datas we needed in a few minutes :
Same at the SQL level :
Thanks to these findings, we have rewritten a large amount of SQL queries to improve their efficiency, and we improved the PHP core to remove the detected bottlenecks.
2) Faster multi-threaded performances
Beside the huge work on the query performances, we have worked a lot on the SQL queries to make sure to efficiently use the MySQL query cache, and we fixed a few nasty issues in the PrestaShop cache. Actually most of the time, the use of the PrestaShop cache was decreasing the performance. This is not the case anymore!
3) Specific optimizations for multi-front / cloud environment
Prestashop is using Smarty to handle the templates. If you are using several front servers, the out of the box Smarty implementation forces you to centralize its cache on a shared filesystem (NFS).
To remove this limitation, we added a custom smarty module which makes it work perfectly with a local smarty cache (no more NFS needed!). Moreover our implementation sped up a lot the cases where the cache had to be invalidated : instead of flushing all the files at once, each template is flushed asynchronously.
This sped up a lot all the back-office operations!
4) Better backoffice performances
We removed the most frustrating bottleneck in the PrestaShop backoffice :
Faster imports
We worked hard to improve the import speed. The more you import products, the more you'll see the speed up!
Better search indexing
We improved both the memory usage and the search indexing speed.
No more issue with huge cart rules or categories
Cart rules and categories are now loaded asynchronously.
III) Let's bench!
1) The configuration
To do this benchmark, we chose to use a dedicated Mini HG server from OVH, which offers high performances for a fairly decent price :
CPU : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz (8 cores, 16 threads)
Memory : 64GB
Disk : 2x SSD 600GB
RAID Controller : LSI MegaRAID SAS 9271-4i CacheVault 1G FastPath
We used a Debian Jessie, with the standard packages, and a properly optimized configuration :
Apache 2.4.10, with mpm_event and the following configuration :
When memcached is used, it's configured locally, with 128MB of memory.
The single-threaded and multi-threaded benchmarks results are the average of 5 "siege -i -b -t 20S" (20s benchmark), on representative pages which have a direct impact on users navigation and SEO :
category pages
product pages
home pages
cart pages
best sales pages
tag search pages
manufacturer pages
new product pages
price drop pages
supplier pages
search pages
2) The results
a) Front performances
First, the single-threaded performances :
It looks promising : up to 10x improvement when Memcached is On!
Let's take a look at how the new 1.6.1.0 scales :
Even without any cache, 1.6.1.0 scales much better than 1.6.0.14, and is up to 65% faster with 15 concurrent connections.
If we enable the query cache, the 1.6.1.0 is still up to 50% faster with 10 concurrent connections.
Well, we definitely fixed the PrestaShop cache issue. We reach almost a 10x improvement with 10 concurrent connections!
Here are the performances side by side, at 10 concurrent connections :
b) Backoffice performances
Here are a few results from the backoffice.
Full search reindexing :
On the performance side, when memcached is enable, 1.6.0.14 timeout after 900s, and eat more than 128MB memory. When memcached is disabled, 1.6.1.0 is 2,3x faster than 1.6.0.14, eat 1,7x less memory, and fix a bug with multi attributes. Not bad!
Import speed :
Although those result were not computed on the same machine, I decided to include this as well to show you the potential speed you could expect with the import in 1.6.1.0 (here almost a 5x speed up).
Now let's mesure the time to load some backoffice pages.
Product edit :
In our case, with 1827 categories, 1.6.1.0 is 1.7x faster.
Cart rules :
With 10843 cart rules, once again 1.6.1.0 is 1.7x faster.
III) Conclusion
1.6.1.0 is a major release in term of performances, with up to 10x speed up in some cases.
To achieve those results we have worked really closely with the PrestaShop team, modifying about 6600 lines of code in a few months. We hope you'll be happy with this version, and don't hesitate to report any performance issues on forge.prestashop.com.
Note whereas in 1.6.0.14 we recommend to not enable the PrestaShop cache, in 1.6.1.0 we recommend you to enable it, with a local memcached server or even better, an APC cache.
To be sure to get the best performances, we also recommend you to run an ANALYZE TABLE on your Prestashop database after upgrading to 1.6.1.0 (the MySQL command is : mysqlcheck -a)