35

Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

  • Upload
    copious

  • View
    70

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking
Page 2: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking
Page 3: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

Easy path to better performance: up to 20% increase with PHP 5.4

Page 4: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

Evgeniy KulishTechnical Solution Architect (Magento ECG)

Reid ParhamLead Systems Engineer (Copious, Gold Magento Solution Partner )

Page 5: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

Legal DisclaimerCopyright © 2014 Magento, Inc. All Rights Reserved.

Magento®, eBay Enterprise™ and their respective logos are trademarks, service marks, registered trademarks, or registered service marks of eBay, Inc. or its subsidiaries. Other trademarks or service marks contained in this presentation are the property of the respective companies with which they are associated.

This presentation is for informational and discussion purposes only and should not be construed as a commitment of Magento, Inc. or GSI Commerce, Inc. d/b/a eBay Enterprise (“eBay Enterprise”) or of any of their subsidiaries or affiliates. While we attempt to ensure the accuracy, completeness and adequacy of this presentation, neither Magento, Inc., eBay Enterprise nor any of their subsidiaries or affiliates are responsible for any errors or will be liable for the use of, or reliance upon, this presentation or any of the information contained in it. Unauthorized use, disclosure or dissemination of this information is expressly prohibited.

Page 6: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

PHP 5.3 vs PHP 5.401

Page 7: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

What’s wrong with PHP 5.3?

• End of Life• “Old-school” language capabilities ☺• Limited performance

Page 8: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

Why PHP 5.4?

• Active support and development• New language features• Performance increase• Optimized memory usage• Magento officially supports PHP 5.4 for CE

1.6-1.8+ and EE 1.11-1.13+

Page 9: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

Testing methodology02

Page 10: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

Test Database

• 2,000,000 products• 198 categories (depth of 5)• 171 EAV attributes• 100,001 customers• 7 CMS blocks• 9 CMS pages• 1 tax rule• 1 catalog rule

Page 11: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

Cluster Configuration

Web Server• CPU: 2 Intel Xeon x3460 2.80GHz• RAM: 32GB• OS: Ubuntu 12.04 LTS 64-bit• Storage: HDD, no RAID

Page 12: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

Cluster Configuration

Database Server• CPUs: 4 Intel Xeon x5645 2.40GHz• RAM: 32GB• OS: Ubuntu 12.04 LTS 64-bit• Storage: HDD, Raid10

Page 13: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

Software

Magento• Version: 1.13.1 with recommended patches• All Enterprise Edition default features enabled• Flat catalog enabled• All caches enabled and Redis is used• CSS and JS compiled• Magento Cron set to 5 minutes intervals

Page 14: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

Software

PHP• 5.3.10-1ubuntu3.11 (20090626)• 5.4.26-1+deb.sury.org~precise+1 (20100525)• 5.5.11+dfsg-3+deb.sury.org~precise+ (20121113)nginx• version: 1.1.19DB• MariaDB 10.0.10 (flavour of MySQL)

Page 15: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

Test tools and scenariosTools:• Siege 2.70• ApacheBench, Version 2.3• cURL 7.22.0• GNU bash 4.2.25Scenarios:• 5 products per cart• No third-party integrations• HTTPS disabled

Page 16: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

Results03

Page 17: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

Home Page Response Time

Page 18: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

Home Page Throughput

+14%

+20%+18%

18930 rpm

Page 19: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

Category Page Response

-13%-17% -15%

Page 20: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

Category Page Throughput

+15%

+20%+18%

Page 21: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

Product Page Response Time

-10%

-14%-12%

2939 ms

Page 22: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

Product Page Throughput

+11%

+16%+14%

Page 23: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

Product Page (Promo) Response Time

-13%-18%

-15%

Page 24: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

Product Page (Promo) Throughput

+15%

+23%+18%

Page 25: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

Orders Throughput (100 users)

+19%

+27% +26%

Page 26: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

Orders Scaling Profile

Page 27: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

Risks and Tips04

Page 28: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

Risks

• Custom code and extensions compatibility • APC is not always stable on PHP 5.4• PHP 5.4 is not widely supported by hosting

providers

Page 29: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

Tips

• Magento PHP 5.4 Patch: http://www.magentocommerce.com/knowledge-base/entry/php54-patch

• Official PHP migration guides• PHP Compatibility: https://github.

com/wimg/PHPCompatibility

• Zend OPcache instead of APC

Page 30: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

Conclusion05

Page 31: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

Hardware utilization

PHP 5.4/5.5• Web server:

▪ +25% Net Tx▪ +25% disk I/O▪ -16% CPU utilization▪ -12% RAM consumption

• DB server:▪ +20% NetTx▪ +30% disk I/O

• Redis/MySQL: difference can be negligible

Page 32: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

Pros

• PHP 5.4 is free ☺• PHP 5.4 is stable• Visible performance increase

▪ Up to 20% general performance improvement▪ Up to 25% orders throughput increase

• Easy to upgrade infrastructure• Magento officially supports PHP 5.4 for the last

three major releases

Page 33: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

Cons

• Efforts to make the custom code compatible• Support by extensions developers

Page 34: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

Q&A

Evgeniy Kulishemail [email protected]

Reid Parhamemail [email protected]

Page 35: Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking