magento 2 seminar - daniel genis - magento 2 benchmarks

16
How to configure Magento 2 for max performance (based on 1 benchmark :) Daniel Genis

Upload: yireo

Post on 06-Jan-2017

561 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Magento 2 Seminar - Daniel Genis - Magento 2 benchmarks

How to configure Magento 2for max performance(based on 1 benchmark :)

Daniel Genis

Page 2: Magento 2 Seminar - Daniel Genis - Magento 2 benchmarks

Difficulties when benchmarkingNot representative for every shop

Easy to make mistakes

Many choices:

1. various benchmarking methods

2. various ways of measuring

3. cold or hot caches

Complexity

Page 3: Magento 2 Seminar - Daniel Genis - Magento 2 benchmarks

The shopSample data magento 2.0

not that many products

no extensions

about 3000 unique frontend URLs

Benchmarking frontend only

Page 4: Magento 2 Seminar - Daniel Genis - Magento 2 benchmarks

The benchmark toolsJMeter test plan, 20 threads doing:

Request a frontend page + all static content

upon completion wait 2 seconds

Request a different frontend page + static content

Each thread has a pre-generated list of urls

Each thread makes 50 requests per default

A warming run was done before actual benchmark

Page 5: Magento 2 Seminar - Daniel Genis - Magento 2 benchmarks

The test server Hypernode - Magento Grow

2 cpu cores

2 gb ram

SSD storage

Small test server

Easier to push to its limits

And to show off our Hypernode setup :)

Page 6: Magento 2 Seminar - Daniel Genis - Magento 2 benchmarks

no redis, no varnish: 378 ms median

ms

20 threads 50 req / thread

Page 7: Magento 2 Seminar - Daniel Genis - Magento 2 benchmarks

redis caching, no varnish: 372 ms median

20 threads 50 req / thread

Page 8: Magento 2 Seminar - Daniel Genis - Magento 2 benchmarks

Redis caching 10 threads: 263 ms!

10 threads 100 req / thread

Page 9: Magento 2 Seminar - Daniel Genis - Magento 2 benchmarks

varnish caching: 116 ms !! :)

20 threads 50 req / thread

Page 10: Magento 2 Seminar - Daniel Genis - Magento 2 benchmarks

Statistical summary

clean install redis cache redis 10thr varnish cache

Average 412 ms 403 ms 278 ms 125 ms

Median 378 ms 372 ms 263 ms 116 ms

95th percentile 727 ms 710 ms 423 ms 187 ms

CPU util 100% 100% 50% 20%

Relative 324% 321% 226% 100%

Nice!

Page 11: Magento 2 Seminar - Daniel Genis - Magento 2 benchmarks

Conclusions1. Varnish is obviously the fastest setup

2. Redis gives no measurable improvement(when local file cache fits in RAM)

3. Magento 2 is awesome

4. Cold cache: Magento 2 is still Magento :)

Page 12: Magento 2 Seminar - Daniel Genis - Magento 2 benchmarks

ObservationsCaching is easy to setup (compared to Mag1)

Varnish cache built-in

Redis cache built-in

No plugins needed

These benchmarks were very bandwidth sensitive

Static content!

html: ~10kb

total incl static: ~1mb

Page 13: Magento 2 Seminar - Daniel Genis - Magento 2 benchmarks

Bonus: disk cache vs Redis cacheCache entries are stored in 'core_cache_tag' table

On multistore environment this table can grow very large

SELECTS are fine

but UPDATE/INSERTS become more work (scalability issue)

Redis is more efficient (than memcached or default cache)

For various query/update scenarios

Has high availability (i.e. master/slave replication)

Page 14: Magento 2 Seminar - Daniel Genis - Magento 2 benchmarks

See it in action!

http://mag2demo.hypernode.com/

For backend login details are available at the bottom!

Page 15: Magento 2 Seminar - Daniel Genis - Magento 2 benchmarks

Try your own benchmark!

1. go to byte.nl

2. get your free Hypernode Trial

3. install Magento 2 or install your own site

4. https://github.com/ByteInternet/m2benchmark

5. profit!

Page 16: Magento 2 Seminar - Daniel Genis - Magento 2 benchmarks

Bedankt!

Blijf op de hoogte van de laatste ontwikkelingen op hosting-gebied. Volg ons op twitter: @Byte_NL