際際滷

際際滷Share a Scribd company logo
Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking
Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking
Easy path to better
performance: up to 20%
increase with PHP 5.4
Evgeniy Kulish
Technical Solution Architect
(Magento ECG)
Reid Parham
Lead Systems Engineer
(Copious, Gold Magento Solution Partner )
Legal Disclaimer
Copyright 息 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.
PHP 5.3 vs PHP 5.401
Whats wrong with PHP 5.3?
 End of Life
 Old-school language capabilities 
 Limited performance
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+
Testing methodology02
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
Cluster Configuration
Web Server
 CPU: 2 Intel Xeon x3460 2.80GHz
 RAM: 32GB
 OS: Ubuntu 12.04 LTS 64-bit
 Storage: HDD, no RAID
Cluster Configuration
Database Server
 CPUs: 4 Intel Xeon x5645 2.40GHz
 RAM: 32GB
 OS: Ubuntu 12.04 LTS 64-bit
 Storage: HDD, Raid10
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
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.19
DB
 MariaDB 10.0.10 (flavour of MySQL)
Test tools and scenarios
Tools:
 Siege 2.70
 ApacheBench, Version 2.3
 cURL 7.22.0
 GNU bash 4.2.25
Scenarios:
 5 products per cart
 No third-party integrations
 HTTPS disabled
Results03
Home Page Response Time
Home Page Throughput
+14%
+20%
+18%
18930
rpm
Category Page Response
-13%
-17%
-15%
Category Page Throughput
+15%
+20%
+18%
Product Page Response Time
-10%
-14%
-12%
2939 ms
Product Page Throughput
+11%
+16%
+14%
Product Page (Promo) Response Time
-13%
-18%
-15%
Product Page (Promo) Throughput
+15%
+23%
+18%
Orders Throughput (100 users)
+19%
+27% +26%
Orders Scaling Profile
Risks and Tips04
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
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
Conclusion05
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
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
Cons
 Efforts to make the custom code compatible
 Support by extensions developers
Q&A
Evgeniy Kulish
email ekulish@ebay.com
Reid Parham
email reid@copiousinc.com
Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

More Related Content

Magento Imagine 2014: Barcamp PHP 5.4 Performance Benchmarking

  • 3. Easy path to better performance: up to 20% increase with PHP 5.4
  • 4. Evgeniy Kulish Technical Solution Architect (Magento ECG) Reid Parham Lead Systems Engineer (Copious, Gold Magento Solution Partner )
  • 5. Legal Disclaimer Copyright 息 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.
  • 6. PHP 5.3 vs PHP 5.401
  • 7. Whats wrong with PHP 5.3? End of Life Old-school language capabilities Limited performance
  • 8. 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+
  • 10. 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
  • 11. Cluster Configuration Web Server CPU: 2 Intel Xeon x3460 2.80GHz RAM: 32GB OS: Ubuntu 12.04 LTS 64-bit Storage: HDD, no RAID
  • 12. Cluster Configuration Database Server CPUs: 4 Intel Xeon x5645 2.40GHz RAM: 32GB OS: Ubuntu 12.04 LTS 64-bit Storage: HDD, Raid10
  • 13. 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
  • 14. 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.19 DB MariaDB 10.0.10 (flavour of MySQL)
  • 15. Test tools and scenarios Tools: Siege 2.70 ApacheBench, Version 2.3 cURL 7.22.0 GNU bash 4.2.25 Scenarios: 5 products per cart No third-party integrations HTTPS disabled
  • 21. Product Page Response Time -10% -14% -12% 2939 ms
  • 23. Product Page (Promo) Response Time -13% -18% -15%
  • 24. Product Page (Promo) Throughput +15% +23% +18%
  • 25. Orders Throughput (100 users) +19% +27% +26%
  • 28. 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
  • 29. 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
  • 31. 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
  • 32. 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
  • 33. Cons Efforts to make the custom code compatible Support by extensions developers
  • 34. Q&A Evgeniy Kulish email ekulish@ebay.com Reid Parham email reid@copiousinc.com