Loading presentation...

Present Remotely

Send the link below via email or IM


Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.


Going beyond Magento speed limits without HHVM and Varnish MeetMagento CH

No description

Ivan Chepurnyi

on 8 November 2015

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Going beyond Magento speed limits without HHVM and Varnish MeetMagento CH

Going Beyond
Magento speed limits

* - without HHVM and Varnish
Why without HHVM and Varnish?
Compiles your code
Caches its output
Both does not solve a source of the issue
The issue is always in the code
Just take a look at this simple example...
Layout caches its structure based on current page handles
So almost every page has a cache footprint
Most of the developers treat Magento Core as a Holy Grail, that must never be touched...
But it MUST be touched for a good reason!
But what if layout is constructed
from pre-assembled parts?
So I've touched that Magento Core part!
... and covered that with tests
Layout handles are compiled into PHP files
Process of parsing XML is separated from building a page
You can create now your own layout file nodes
Lets see how it compares in numbers...
Gatling tool
Hypernode Vagrant box from @Byte_NL
Official Magento Sample Data
Redis Cache Backend
3 runs each for 60 seconds
Each 1st run is a warm up
First Run (Standard Layout)
First Run (Compiler Layout)
Mean time: 599ms
Standard Deviation: 302ms
Mean time: 488ms
Standard Deviation: 244ms
Second Run (Standard Layout)
Second Run (Compiler Layout)
Mean time: 566ms
Standard Deviation: 304ms
Mean time: 395ms
Standard Deviation: 177ms
Third Run (Standard Layout)
Third Run (Compiler Layout)
Mean time: 473ms
Standard Deviation: 237ms
Mean time: 460ms
Standard Deviation: 231ms
So I decided to experiment more with Magento core!
... for every filter there is a cache entry for every option combination?
Did you know that on category page...
... every filter loads data separately, even if data comes from the same table?
... terrible SQL queries are executed when you click on filters?
... everything is so tightly coupled, that you cannot separate filtration from option retrieval?
But what if...
... facets would be separated from attributes
... all options would be retrieved at once and only for available combinations
... product collection would not be used for those calculations and loaded at the latest stage
So I decided to experiment...
... and cheated a little bit ...
... by using Sphinx for all of that
Lets see how it affects the numbers...
All Catalog Pages (Sphinx)
All Catalog Pages (Magento)
Mean time: 232ms
Standard Deviation: 86ms
Mean time: 395ms
Standard Deviation: 177ms
Category Pages (Sphinx)
Category Pages (Magento)
Mean time: 223ms
Standard Deviation: 51ms
Mean time: 463ms
Standard Deviation: 150ms
Magento still have huge amount of places to improve its performance...
Layout Compiler Module
Would be happy to provide you a quote for Sphinx integration
For open source lovers, there is a layered navigation framework planned!
Load Test Results
Vagrant Box from ByteInternet
But that is not real life situation...
Sample data is too small...
So I created such database:
22,000 total SKU
~ 500 items in each category
3 Store Views
And loaded it with 150 visitors.
They visit:
Home Page
Category Page
Category Page with applied filter
Search Page
Filtered Category Page (Magento) Run #1
Category Page (Magento) Run #1
Mean time: 524ms
Standard Deviation: 219ms
Mean time: 529ms
Standard Deviation: 222ms
Flat products and categories
Search Page (Magento) Run #1
Mean time: 461ms
Standard Deviation: 211ms
Filtered Category Page (Magento) Run #2
Category Page (Magento) Run #2
Mean time: 493ms
Standard Deviation: 221ms
Mean time: 473ms
Standard Deviation: 219ms
Search Page (Magento) Run #2
Mean time: 441ms
Standard Deviation: 221ms
Filtered Category Page (Sphinx) Run #1
Category Page (Sphinx) Run #1
Mean time: 245ms
Standard Deviation: 41ms
Mean time: 236ms
Standard Deviation: 47ms
Search Page (Sphinx) Run #1
Mean time: 212ms
Standard Deviation: 49ms
Filtered Category Page (Sphinx) Run #2
Category Page (Sphinx) Run #2
Mean time: 233ms
Standard Deviation: 36ms
Mean time: 224ms
Standard Deviation: 36ms
Search Page (Sphinx) Run #2
Mean time: 209ms
Standard Deviation: 51ms
Full transcript