25
Sample Title Developers Paradise 2016 / Opatija / Croatia Magento 2 performance comparison in different environments

Magento 2 performance comparison in different environments by Yaroslav Rogoza from Atwix

  • Upload
    atwix

  • View
    529

  • Download
    2

Embed Size (px)

Citation preview

Page 1: Magento 2 performance comparison in different environments by Yaroslav Rogoza from Atwix

Sample Title

DevelopersParadise2016 / Opatija / Croatia

Magento 2 performance comparison in different environments

Page 2: Magento 2 performance comparison in different environments by Yaroslav Rogoza from Atwix

DevelopersParadise2016 / Opatija / Croatia

Hardware configuration and software

• Gatling• Docker• M2 Custom Sample Data generator

Tools used in benchmark:

Hardware configuration:

• Intel® Core™ i7-6700, 64 GB DDR4 RAM, 2 x 250 GB SATA 6 Gb/s SSD

• Intel® Core™ i7-6700, 64 GB DDR4 RAM, 2 TB SATA 4 Gb/s Enterprise Hard Drive

Page 3: Magento 2 performance comparison in different environments by Yaroslav Rogoza from Atwix

DevelopersParadise2016 / Opatija / Croatia

Yaroslav RogozaCTO - Atwix

Page 4: Magento 2 performance comparison in different environments by Yaroslav Rogoza from Atwix

DevelopersParadise2016 / Opatija / Croatia

Fixing a bad (slow) code

Software tweaks

Hardware changes

Page 5: Magento 2 performance comparison in different environments by Yaroslav Rogoza from Atwix

DevelopersParadise2016 / Opatija / Croatia

Bad code <?php $giftcardProducts = Mage::getModel("catalog/product")->getCollection(); foreach ($giftcardProducts as $giftProduct) { $product = Mage::getModel("catalog/product")->load($giftProduct->getId()); ?>. . .

Page 6: Magento 2 performance comparison in different environments by Yaroslav Rogoza from Atwix

DevelopersParadise2016 / Opatija / Croatia

Software Tweaks

[Here should be some funny picture]

Page 7: Magento 2 performance comparison in different environments by Yaroslav Rogoza from Atwix

DevelopersParadise2016 / Opatija / Croatia

Emulation steps

1. Visit Home Page ->2. Visit Woman Pants category ->3. Visit Overnight Duffle product ->4. Add to cart Overnight Duffle product ->5. Search for “band” keyword ->6. Go to login page -> 7. Log in ->8. Go to My Account page

Page 8: Magento 2 performance comparison in different environments by Yaroslav Rogoza from Atwix

DevelopersParadise2016 / Opatija / Croatia

Standard sample data, SSDStandard sample data:1 customer, 2k products, 40 categories

Home Page

Woman Pants category

Overnight Duffle product

Add to cart request

Search for 'Band'

User log in page

User log in process

My Account page

Loading time (ms.)

0.00 1000.00 2000.00 3000.00 4000.00

12751207

4183257

453829

38341928

Page 9: Magento 2 performance comparison in different environments by Yaroslav Rogoza from Atwix

DevelopersParadise2016 / Opatija / Croatia

Bottlenecks

• Configurable::getUsedProducts

• Configurable::getConfigurableAttributes

• Configurable\Attribute\Collection::_afterLoad

Page 10: Magento 2 performance comparison in different environments by Yaroslav Rogoza from Atwix

DevelopersParadise2016 / Opatija / Croatia

Standard sample data, SSDStandard sample data:1 customer, 2k products, 40 categories

Home Page

Woman Pants category

Overnight Duffle product

Add to cart request

Search for 'Band'

User log in page

User log in process

My Account page

Loading time (ms.)

0.00 1000.00 2000.00 3000.00 4000.00

12751207

4183257

453829

38341928

Page 11: Magento 2 performance comparison in different environments by Yaroslav Rogoza from Atwix

DevelopersParadise2016 / Opatija / Croatia

Standard sample data, HDDStandard sample data:1 customer, 2k products, 40 categories

Home Page

Woman Pants category

Overnight Duffle product

Add to cart request

Search for 'Band'

User log in page

User log in process

My Account page

Loading Time (ms.)

0 1250 2500 3750 50001275

1207418

3257453

8293834

1928

12931489

4703618

5991278

44461970

HDD SSD

Page 12: Magento 2 performance comparison in different environments by Yaroslav Rogoza from Atwix

DevelopersParadise2016 / Opatija / Croatia

Standard sample data, SSDStandard sample data:1 customer, 2k products, 40 categories

Home Page

Woman Pants category

Overnight Duffle product

Add to cart request

Search for 'Band'

User log in page

User log in process

My Account page

Loading time (ms.)

0.00 1000.00 2000.00 3000.00 4000.00

12751207

4183257

453829

38341928

Page 13: Magento 2 performance comparison in different environments by Yaroslav Rogoza from Atwix

DevelopersParadise2016 / Opatija / Croatia

Standard sample data + additional customers2k products, 40 categories, 400k customers

Home Page

Woman Pants category

Overnight Duffle product

Add to cart request

Search for 'Band'

User log in page

User log in process

My Account page

Loading Time (ms.)

0 1000 2000 3000 40001275

1207418

3257453

8293834

1928

13921350

4223260

470830

38371933

400k customers 1 customer

Page 14: Magento 2 performance comparison in different environments by Yaroslav Rogoza from Atwix

DevelopersParadise2016 / Opatija / Croatia

Many customers + Redis backend cache2k products, 40 categories, 400k customers +Redis as backend cache storage

Home Page

Woman Pants category

Overnight Duffle product

Add to cart request

Search for 'Band'

User log in page

User log in process

My Account page

Loading Time (ms.)

0 1000 2000 3000 400013961349

4213477

469956

39551915

13921350

4223475

470953

39701933

Disk Redis

Page 15: Magento 2 performance comparison in different environments by Yaroslav Rogoza from Atwix

DevelopersParadise2016 / Opatija / Croatia

Many customers + many products600k products, 40 categories, 400k customers

Home Page

Woman Pants category

Overnight Duffle product

Add to cart request

Search for 'Band'

User log in page

User log in process

My Account page

Loading Time (ms.)

0 1250 2500 3750 500013921350

4223475

470953

39701933

13961347

4264132

5211002

49432013

400k customers 1 customer

Page 16: Magento 2 performance comparison in different environments by Yaroslav Rogoza from Atwix

DevelopersParadise2016 / Opatija / Croatia

Many customers and products + Redis600k products, 40 categories, 400k customers +Redis as backend cache storage

Home Page

Woman Pants category

Overnight Duffle product

Add to cart request

Search for 'Band'

User log in page

User log in process

My Account page

Loading Time (ms.)

0 1250 2500 3750 500013921349

4224129

524996

49511997

13961347

4264132

5211002

49432013

Disk Redis

Page 17: Magento 2 performance comparison in different environments by Yaroslav Rogoza from Atwix

DevelopersParadise2016 / Opatija / Croatia

Many customers and products, disk cache600k products, 40 categories, 400k customers +disk cache clean and warmed up

Home Page

Woman Pants category

Overnight Duffle product

Add to cart request

Search for 'Band'

User log in page

User log in process

My Account page

Loading Time (ms.)

0 1500 3000 4500 600013921349

4224129

524996

49511997

14361355

4484218

5221194

51612107

Warmed Up Clean

Page 18: Magento 2 performance comparison in different environments by Yaroslav Rogoza from Atwix

DevelopersParadise2016 / Opatija / Croatia

Many customers and products, Redis cache600k products, 40 categories, 400k customers +Redis and disc cache warmed up

Home Page

Woman Pants category

Overnight Duffle product

Add to cart request

Search for 'Band'

User log in page

User log in process

My Account page

Loading Time (ms.)

0 1500 3000 4500 600013911352

4214127

523998

49511998

14361355

4484218

5221194

51612107

Disk Redis

Page 19: Magento 2 performance comparison in different environments by Yaroslav Rogoza from Atwix

DevelopersParadise2016 / Opatija / Croatia

Many customers and products, MariaDB600k products, 40 categories, 400k customers +MariaDB as DB engine

Home Page

Woman Pants category

Overnight Duffle product

Add to cart request

Search for 'Band'

User log in page

User log in process

My Account page

Loading Time (ms.)

0 1250 2500 3750 500013911352

4214127

523998

49511998

13911362

4224120

511987

31121994

MariaDB MySQL

Page 20: Magento 2 performance comparison in different environments by Yaroslav Rogoza from Atwix

DevelopersParadise2016 / Opatija / Croatia

What else?

Page 21: Magento 2 performance comparison in different environments by Yaroslav Rogoza from Atwix

DevelopersParadise2016 / Opatija / Croatia

Many customers and products, DB replication600k products, 40 categories, 400k customers +database replication

Home Page

Woman Pants category

Overnight Duffle product

Add to cart request

Search for 'Band'

User log in page

User log in process

My Account page

Loading Time (ms.)

0 1250 2500 3750 500013911352

4214127

523998

49511998

13831339

4214133

5091001

49461996

Replication No Replication

Page 22: Magento 2 performance comparison in different environments by Yaroslav Rogoza from Atwix

DevelopersParadise2016 / Opatija / Croatia

What else?PHP7!

Page 23: Magento 2 performance comparison in different environments by Yaroslav Rogoza from Atwix

DevelopersParadise2016 / Opatija / Croatia

Many customers and products, PHP 7.0

Home Page

Woman Pants category

Overnight Duffle product

Add to cart request

Search for 'Band'

User log in page

User log in process

My Account page

Loading Time (ms.)

0 1250 2500 3750 500013911352

4214127

523998

49511998

803816

2882984

313560

41921515

PHP 7 PHP 5.6

Page 24: Magento 2 performance comparison in different environments by Yaroslav Rogoza from Atwix

DevelopersParadise2016 / Opatija / Croatia

Links

• Gatling scenario https://github.com/Atwix/gatling-m2-benchmark

• M2 sample data generator https://github.com/Atwix/m2-sampledata-generator

Page 25: Magento 2 performance comparison in different environments by Yaroslav Rogoza from Atwix

DevelopersParadise2016 / Opatija / Croatia

Thank You!

@rogyar [email protected]