magento 2 performance comparison in different …...magento 2 performance comparison in different...

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

Upload: others

Post on 14-Mar-2020

36 views

Category:

Documents


0 download

TRANSCRIPT

Sample Title

DevelopersParadise2016 / Opatija / Croatia

Magento 2 performance comparison in different environments

DevelopersParadise2016 / Opatija / Croatia

Yaroslav RogozaCTO - Atwix

DevelopersParadise2016 / Opatija / Croatia

Fixing a bad (slow) code

Software tweaks

Hardware changes

DevelopersParadise2016 / Opatija / Croatia

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

DevelopersParadise2016 / Opatija / Croatia

Software Tweaks

[Here should be some funny picture]

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

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

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

DevelopersParadise2016 / Opatija / Croatia

Bottlenecks

• Configurable::getUsedProducts

• Configurable::getConfigurableAttributes

• Configurable\Attribute\Collection::_afterLoad

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

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

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

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

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

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

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

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

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

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

DevelopersParadise2016 / Opatija / Croatia

What else?

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

DevelopersParadise2016 / Opatija / Croatia

What else?

PHP7!

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

DevelopersParadise2016 / Opatija / Croatia

Links

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

benchmark

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

sampledata-generator

DevelopersParadise2016 / Opatija / Croatia

Thank You!

@rogyar [email protected]